mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-05 15:42:17 +03:00
feat(ui): implement CSimpleStatusBar_GetMinMaxValues
This commit is contained in:
parent
98103db5ee
commit
3713a7ee89
@ -54,6 +54,14 @@ int32_t CSimpleStatusBar::GetScriptMetaTable() {
|
|||||||
return CSimpleStatusBar::s_metatable;
|
return CSimpleStatusBar::s_metatable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float CSimpleStatusBar::GetMaxValue() const {
|
||||||
|
return this->m_maxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
float CSimpleStatusBar::GetMinValue() const {
|
||||||
|
return this->m_minValue;
|
||||||
|
}
|
||||||
|
|
||||||
float CSimpleStatusBar::GetValue() const {
|
float CSimpleStatusBar::GetValue() const {
|
||||||
return this->m_value;
|
return this->m_value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,8 @@ class CSimpleStatusBar : public CSimpleFrame {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CSimpleStatusBar(CSimpleFrame* parent);
|
CSimpleStatusBar(CSimpleFrame* parent);
|
||||||
|
float GetMaxValue() const;
|
||||||
|
float GetMinValue() const;
|
||||||
float GetValue() const;
|
float GetValue() const;
|
||||||
void RunOnMinMaxChangedScript();
|
void RunOnMinMaxChangedScript();
|
||||||
void RunOnValueChangedScript();
|
void RunOnValueChangedScript();
|
||||||
|
|||||||
@ -15,7 +15,13 @@ int32_t CSimpleStatusBar_SetOrientation(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleStatusBar_GetMinMaxValues(lua_State* L) {
|
int32_t CSimpleStatusBar_GetMinMaxValues(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
auto type = CSimpleStatusBar::GetObjectType();
|
||||||
|
auto statusBar = static_cast<CSimpleStatusBar*>(FrameScript_GetObjectThis(L, type));
|
||||||
|
|
||||||
|
lua_pushnumber(L, statusBar->GetMinValue());
|
||||||
|
lua_pushnumber(L, statusBar->GetMaxValue());
|
||||||
|
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleStatusBar_SetMinMaxValues(lua_State* L) {
|
int32_t CSimpleStatusBar_SetMinMaxValues(lua_State* L) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user