mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Script: Fix that some meter related operations (e.g. !HideMeterGroup) did not work in Initialize()
This commit is contained in:
parent
f54970e2d7
commit
13ebeccfd7
@ -54,6 +54,16 @@ void MeasureScript::UninitializeLuaScript()
|
|||||||
m_HasGetStringFunction = false;
|
m_HasGetStringFunction = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MeasureScript::Initialize()
|
||||||
|
{
|
||||||
|
Measure::Initialize();
|
||||||
|
|
||||||
|
if (m_LuaScript.IsFunction(g_InitializeFunctionName))
|
||||||
|
{
|
||||||
|
m_LuaScript.RunFunction(g_InitializeFunctionName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Runs the function "Update()" in the script.
|
** Runs the function "Update()" in the script.
|
||||||
**
|
**
|
||||||
@ -155,9 +165,11 @@ void MeasureScript::ReadOptions(ConfigParser& parser, const WCHAR* section)
|
|||||||
// Pop PROPERTIES table and our table
|
// Pop PROPERTIES table and our table
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
|
|
||||||
if (hasInitializeFunction)
|
if (m_Initialized)
|
||||||
{
|
{
|
||||||
m_LuaScript.RunFunction(g_InitializeFunctionName);
|
// If the measure is already initialized and the script has changed, we need to
|
||||||
|
// manually call Initialize().
|
||||||
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid script.
|
// Valid script.
|
||||||
|
@ -35,6 +35,7 @@ public:
|
|||||||
void UninitializeLuaScript();
|
void UninitializeLuaScript();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void Initialize();
|
||||||
virtual void ReadOptions(ConfigParser& parser, const WCHAR* section);
|
virtual void ReadOptions(ConfigParser& parser, const WCHAR* section);
|
||||||
virtual void UpdateValue();
|
virtual void UpdateValue();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user