mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Add set_pivot to text component
This commit is contained in:
@@ -840,7 +840,7 @@ nodes {
|
||||
}
|
||||
type: TYPE_TEXT
|
||||
blend_mode: BLEND_MODE_ALPHA
|
||||
text: "SImple"
|
||||
text: "Simple"
|
||||
font: "game"
|
||||
id: "text_simple"
|
||||
xanchor: XANCHOR_NONE
|
||||
|
@@ -12,12 +12,13 @@ end
|
||||
local function init_top_panel(self)
|
||||
self.druid:new_button("button_left/button", on_control_button, "left")
|
||||
self.druid:new_button("button_right/button", on_control_button, "right")
|
||||
self.header = self.druid:new_text("text_header", "main_page", true)
|
||||
self.header = self.druid:new_locale("text_header", "main_page")
|
||||
end
|
||||
|
||||
|
||||
function init(self)
|
||||
druid.set_default_style(empty_style)
|
||||
druid.set_default_style(bounce_style)
|
||||
self.druid = druid.new(self)
|
||||
|
||||
init_top_panel(self)
|
||||
|
@@ -26,17 +26,17 @@ end
|
||||
|
||||
|
||||
local function setup_texts(self)
|
||||
self.druid:new_text("text_button", "ui_section_button", true)
|
||||
self.druid:new_text("text_text", "ui_section_text", true)
|
||||
self.druid:new_text("text_timer", "ui_section_timer", true)
|
||||
self.druid:new_text("text_progress", "ui_section_progress", true)
|
||||
self.druid:new_text("text_slider", "ui_section_slider", true)
|
||||
self.druid:new_text("text_radio", "ui_section_radio", true)
|
||||
self.druid:new_text("text_checkbox", "ui_section_checkbox", true)
|
||||
self.druid:new_locale("text_button", "ui_section_button")
|
||||
self.druid:new_locale("text_text", "ui_section_text")
|
||||
self.druid:new_locale("text_timer", "ui_section_timer")
|
||||
self.druid:new_locale("text_progress", "ui_section_progress")
|
||||
self.druid:new_locale("text_slider", "ui_section_slider")
|
||||
self.druid:new_locale("text_radio", "ui_section_radio")
|
||||
self.druid:new_locale("text_checkbox", "ui_section_checkbox")
|
||||
|
||||
self.druid:new_locale("text_translated", "ui_text_example")
|
||||
self.druid:new_locale("text_button_lang", "ui_text_change_lang")
|
||||
self.druid:new_text("text_simple", "Simple")
|
||||
self.druid:new_text("text_translated", "ui_text_example", true)
|
||||
self.druid:new_text("text_button_lang", "ui_text_change_lang", true, 150 * 0.7)
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user