Fixed ConfigFile not storing values deeper then one level, added markup_width to Text

This commit is contained in:
2020-09-24 10:47:55 -05:00
parent 695c77b183
commit 3ba635f157
2 changed files with 5 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ module CyberarmEngine
hash = @data[keys.shift] ||= {}
keys.each do |key|
hash[key] ||= {}
hash = hash[key] ||= {}
end
end

View File

@@ -103,6 +103,10 @@ module CyberarmEngine
textobject.text_width(text)
end
def markup_width(text = @text)
textobject.markup_width(text)
end
def height(text = @text)
text.lines.count > 0 ? (text.lines.count) * textobject.height : @textobject.height
end