mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-27 08:13:50 +03:00
feat(ui): implement CSimpleFontString_SetVertexColor
This commit is contained in:
1 file changed
+17
-1
@@ -22,7 +22,23 @@ int32_t CSimpleFontString_SetDrawLayer(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFontString_SetVertexColor(lua_State* L) {
|
int32_t CSimpleFontString_SetVertexColor(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
auto type = CSimpleFontString::GetObjectType();
|
||||||
|
auto string = static_cast<CSimpleFontString*>(FrameScript_GetObjectThis(L, type));
|
||||||
|
|
||||||
|
CImVector currentColor = {};
|
||||||
|
string->GetVertexColor(currentColor);
|
||||||
|
|
||||||
|
CImVector newColor = {};
|
||||||
|
FrameScript_GetColor(L, 2, newColor);
|
||||||
|
|
||||||
|
if (!lua_isnumber(L, 5)) {
|
||||||
|
newColor.a = currentColor.a;
|
||||||
|
}
|
||||||
|
|
||||||
|
string->SetVertexColor(newColor);
|
||||||
|
string->m_fontableFlags &= ~FLAG_COLOR_UPDATE;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFontString_GetAlpha(lua_State* L) {
|
int32_t CSimpleFontString_GetAlpha(lua_State* L) {
|
||||||
|
|||||||
Reference in new issue
Block a user