mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 08:12:44 +03:00
feat(ui): implement CSimpleFrame_SetBackdropColor
This commit is contained in:
parent
568db50717
commit
e9ef44c008
@ -383,3 +383,11 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||||||
bottomRightTexture->SetBlendMode(this->m_blend);
|
bottomRightTexture->SetBlendMode(this->m_blend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CBackdropGenerator::SetVertexColor(const CImVector& color) {
|
||||||
|
this->m_color = color;
|
||||||
|
|
||||||
|
if (this->m_backgroundTexture) {
|
||||||
|
this->m_backgroundTexture->SetVertexColor(this->m_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -44,6 +44,7 @@ class CBackdropGenerator {
|
|||||||
void LoadXML(XMLNode* node, CStatus* status);
|
void LoadXML(XMLNode* node, CStatus* status);
|
||||||
void SetBorderVertexColor(const CImVector& borderColor);
|
void SetBorderVertexColor(const CImVector& borderColor);
|
||||||
void SetOutput(CSimpleFrame* frame);
|
void SetOutput(CSimpleFrame* frame);
|
||||||
|
void SetVertexColor(const CImVector& color);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "ui/CSimpleFrameScript.hpp"
|
#include "ui/CSimpleFrameScript.hpp"
|
||||||
#include "gx/Coordinate.hpp"
|
#include "gx/Coordinate.hpp"
|
||||||
|
#include "ui/CBackdropGenerator.hpp"
|
||||||
#include "ui/CSimpleFrame.hpp"
|
#include "ui/CSimpleFrame.hpp"
|
||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
@ -460,7 +461,17 @@ int32_t CSimpleFrame_GetBackdropColor(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFrame_SetBackdropColor(lua_State* L) {
|
int32_t CSimpleFrame_SetBackdropColor(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
auto type = CSimpleFrame::GetObjectType();
|
||||||
|
auto frame = static_cast<CSimpleFrame*>(FrameScript_GetObjectThis(L, type));
|
||||||
|
|
||||||
|
CImVector color = { 0x00 };
|
||||||
|
FrameScript_GetColor(L, 2, color);
|
||||||
|
|
||||||
|
if (frame->m_backdrop) {
|
||||||
|
frame->m_backdrop->SetVertexColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFrame_GetBackdropBorderColor(lua_State* L) {
|
int32_t CSimpleFrame_GetBackdropBorderColor(lua_State* L) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user