mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Resolve #36: Get default druid text value from node
This commit is contained in:
parent
017138b5ff
commit
7821c031dd
@ -85,10 +85,10 @@ function M.init(self, node, value, no_adjust)
|
|||||||
self.color = gui.get_color(self.node)
|
self.color = gui.get_color(self.node)
|
||||||
|
|
||||||
self.on_set_text = Event()
|
self.on_set_text = Event()
|
||||||
self.on_update_text_scale = Event()
|
|
||||||
self.on_set_pivot = Event()
|
self.on_set_pivot = Event()
|
||||||
|
self.on_update_text_scale = Event()
|
||||||
|
|
||||||
self:set_to(value or 0)
|
self:set_to(value or gui.get_text(self.node))
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3518,7 +3518,7 @@ nodes {
|
|||||||
}
|
}
|
||||||
type: TYPE_TEXT
|
type: TYPE_TEXT
|
||||||
blend_mode: BLEND_MODE_ALPHA
|
blend_mode: BLEND_MODE_ALPHA
|
||||||
text: "Inline:"
|
text: "Simple inline text"
|
||||||
font: "game"
|
font: "game"
|
||||||
id: "text_inline"
|
id: "text_inline"
|
||||||
xanchor: XANCHOR_NONE
|
xanchor: XANCHOR_NONE
|
||||||
@ -3581,7 +3581,7 @@ nodes {
|
|||||||
}
|
}
|
||||||
type: TYPE_TEXT
|
type: TYPE_TEXT
|
||||||
blend_mode: BLEND_MODE_ALPHA
|
blend_mode: BLEND_MODE_ALPHA
|
||||||
text: "Multiline"
|
text: "Simple multiline text with smth"
|
||||||
font: "game"
|
font: "game"
|
||||||
id: "text_multiline"
|
id: "text_multiline"
|
||||||
xanchor: XANCHOR_NONE
|
xanchor: XANCHOR_NONE
|
||||||
@ -3699,7 +3699,7 @@ nodes {
|
|||||||
}
|
}
|
||||||
type: TYPE_TEXT
|
type: TYPE_TEXT
|
||||||
blend_mode: BLEND_MODE_ALPHA
|
blend_mode: BLEND_MODE_ALPHA
|
||||||
text: "Anchoring:"
|
text: "Anchoring"
|
||||||
font: "game"
|
font: "game"
|
||||||
id: "text_anchoring"
|
id: "text_anchoring"
|
||||||
xanchor: XANCHOR_NONE
|
xanchor: XANCHOR_NONE
|
||||||
|
@ -13,9 +13,9 @@ local pivots = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function setup_texts(self)
|
local function setup_texts(self)
|
||||||
self.druid:new_text("text_inline", "Simple inline text")
|
self.druid:new_text("text_inline")
|
||||||
self.druid:new_text("text_multiline", "Simple multiline text with smth")
|
self.druid:new_text("text_multiline")
|
||||||
local anchoring = self.druid:new_text("text_anchoring", "Anchoring")
|
local anchoring = self.druid:new_text("text_anchoring")
|
||||||
self.druid:new_text("text_no_adjust", "Without adjust size", true)
|
self.druid:new_text("text_no_adjust", "Without adjust size", true)
|
||||||
self.druid:new_lang_text("text_locale", "ui_text_example")
|
self.druid:new_lang_text("text_locale", "ui_text_example")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user