mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-05 15:42:17 +03:00
feat(ui): implement CSimpleStatusBar_GetValue
This commit is contained in:
parent
977a3051db
commit
dc22db2f18
@ -49,6 +49,10 @@ int32_t CSimpleStatusBar::GetScriptMetaTable() {
|
|||||||
return CSimpleStatusBar::s_metatable;
|
return CSimpleStatusBar::s_metatable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float CSimpleStatusBar::GetValue() const {
|
||||||
|
return this->m_value;
|
||||||
|
}
|
||||||
|
|
||||||
void CSimpleStatusBar::RunOnMinMaxChangedScript() {
|
void CSimpleStatusBar::RunOnMinMaxChangedScript() {
|
||||||
if (!this->m_onMinMaxChanged.luaRef) {
|
if (!this->m_onMinMaxChanged.luaRef) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class CSimpleStatusBar : public CSimpleFrame {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CSimpleStatusBar(CSimpleFrame* parent);
|
CSimpleStatusBar(CSimpleFrame* parent);
|
||||||
|
float GetValue() const;
|
||||||
void RunOnMinMaxChangedScript();
|
void RunOnMinMaxChangedScript();
|
||||||
void RunOnValueChangedScript();
|
void RunOnValueChangedScript();
|
||||||
void SetMinMaxValues(float min, float max);
|
void SetMinMaxValues(float min, float max);
|
||||||
|
|||||||
@ -46,7 +46,12 @@ int32_t CSimpleStatusBar_SetMinMaxValues(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleStatusBar_GetValue(lua_State* L) {
|
int32_t CSimpleStatusBar_GetValue(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
auto type = CSimpleStatusBar::GetObjectType();
|
||||||
|
auto statusBar = static_cast<CSimpleStatusBar*>(FrameScript_GetObjectThis(L, type));
|
||||||
|
|
||||||
|
lua_pushnumber(L, statusBar->GetValue());
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleStatusBar_SetValue(lua_State* L) {
|
int32_t CSimpleStatusBar_SetValue(lua_State* L) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user