mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(ui): implement CSimpleFrame::LoadXML_Attributes
This commit is contained in:
parent
b76a9fed82
commit
88f2cb7e5f
9 changed files with 123 additions and 7 deletions
|
|
@ -37,3 +37,23 @@ bool CSimpleStatusBar::IsA(int32_t type) {
|
|||
int32_t CSimpleStatusBar::GetScriptMetaTable() {
|
||||
return CSimpleStatusBar::s_metatable;
|
||||
}
|
||||
|
||||
FrameScript_Object::ScriptIx* CSimpleStatusBar::GetScriptByName(const char* name, ScriptData& data) {
|
||||
auto parentScript = CSimpleFrame::GetScriptByName(name, data);
|
||||
|
||||
if (parentScript) {
|
||||
return parentScript;
|
||||
}
|
||||
|
||||
if (!SStrCmpI(name, "OnValueChanged", STORM_MAX_STR)) {
|
||||
data.wrapper = "return function(self,value) %s end";
|
||||
return &this->m_onValueChanged;
|
||||
}
|
||||
|
||||
if (!SStrCmpI(name, "OnMinMaxChanged", STORM_MAX_STR)) {
|
||||
data.wrapper = "return function(self,min,max) %s end";
|
||||
return &this->m_onMinMaxChanged;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue