mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-05 23:52:16 +03:00
feat(ui): add CSimpleFrame::GetAttribute
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run
This commit is contained in:
parent
ae64833a5c
commit
c099226cd2
@ -522,6 +522,18 @@ void CSimpleFrame::PreLoadXML(XMLNode* node, CStatus* status) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CSimpleFrame::GetAttribute(const char* name, int32_t& luaRef) {
|
||||||
|
auto attr = this->m_attributes.Ptr(name);
|
||||||
|
|
||||||
|
if (!attr || attr->luaRef == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
luaRef = attr->luaRef;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t CSimpleFrame::GetBoundsRect(CRect& bounds) {
|
int32_t CSimpleFrame::GetBoundsRect(CRect& bounds) {
|
||||||
if (this->IsResizePending()) {
|
if (this->IsResizePending()) {
|
||||||
this->Resize(1);
|
this->Resize(1);
|
||||||
|
|||||||
@ -132,6 +132,7 @@ class CSimpleFrame : public CScriptRegion {
|
|||||||
void DisableEvent(CSimpleEventType eventType);
|
void DisableEvent(CSimpleEventType eventType);
|
||||||
void EnableDrawLayer(uint32_t drawlayer);
|
void EnableDrawLayer(uint32_t drawlayer);
|
||||||
void EnableEvent(CSimpleEventType eventType, int32_t priority);
|
void EnableEvent(CSimpleEventType eventType, int32_t priority);
|
||||||
|
bool GetAttribute(const char* name, int32_t& luaRef);
|
||||||
int32_t GetHitRect(CRect& rect);
|
int32_t GetHitRect(CRect& rect);
|
||||||
void Hide();
|
void Hide();
|
||||||
void LoadXML_Attributes(const XMLNode* node, CStatus* status);
|
void LoadXML_Attributes(const XMLNode* node, CStatus* status);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user