mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Fixed ConfigFile not storing values deeper then one level, added markup_width to Text
This commit is contained in:
@@ -20,7 +20,7 @@ module CyberarmEngine
|
|||||||
hash = @data[keys.shift] ||= {}
|
hash = @data[keys.shift] ||= {}
|
||||||
|
|
||||||
keys.each do |key|
|
keys.each do |key|
|
||||||
hash[key] ||= {}
|
hash = hash[key] ||= {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ module CyberarmEngine
|
|||||||
textobject.text_width(text)
|
textobject.text_width(text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def markup_width(text = @text)
|
||||||
|
textobject.markup_width(text)
|
||||||
|
end
|
||||||
|
|
||||||
def height(text = @text)
|
def height(text = @text)
|
||||||
text.lines.count > 0 ? (text.lines.count) * textobject.height : @textobject.height
|
text.lines.count > 0 ? (text.lines.count) * textobject.height : @textobject.height
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user