Exemplo n.º 1
0
static int GetName(lua_State* L)
{
	CMeasure* self = GetSelf(L);
	LuaManager::PushWide(L, self->GetName());

	return 1;
}
Exemplo n.º 2
0
static int GetNumberOption(lua_State* L)
{
	CMeasure* self = GetSelf(L);
	CMeterWindow* meterWindow = self->GetMeterWindow();
	CConfigParser& parser = meterWindow->GetParser();

	std::wstring strTmp = LuaManager::ToWide(L, 2);
	double value = parser.ReadFormula(self->GetName(), strTmp.c_str(), lua_tonumber(L, 3));

	lua_pushnumber(L, value);
	return 1;
}
Exemplo n.º 3
0
static int GetOption(lua_State* L)
{
	CMeasure* self = GetSelf(L);
	CMeterWindow* meterWindow = self->GetMeterWindow();
	CConfigParser& parser = meterWindow->GetParser();

	std::wstring strTmp = LuaManager::ToWide(L, 2);
	strTmp = parser.ReadString(self->GetName(), strTmp.c_str(), LuaManager::ToWide(L, 3).c_str());

	LuaManager::PushWide(L, strTmp.c_str());
	return 1;
}