add read-only UI contentOffset property

This commit is contained in:
MihailRis
2024-10-15 05:56:15 +03:00
parent fbca439b2d
commit 08ebfa15db
7 changed files with 86 additions and 79 deletions
+5
View File
@@ -292,6 +292,10 @@ static int p_set_interval(UINode* node, lua::State* L) {
return 0;
}
static int p_get_content_offset(UINode* node, lua::State* L) {
return lua::pushvec(L, node->getContentOffset());
}
static int p_get_color(UINode* node, lua::State* L) {
return lua::pushcolor(L, node->getColor());
}
@@ -344,6 +348,7 @@ static int l_gui_getattr(lua::State* L) {
{"color", p_get_color},
{"hoverColor", p_get_hover_color},
{"pressedColor", p_get_pressed_color},
{"contentOffset", p_get_content_offset},
{"tooltip", p_get_tooltip},
{"tooltipDelay", p_get_tooltip_delay},
{"pos", p_get_pos},