mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-18 14:02:33 +00:00
Sliders work better, fixed CheckBox not passing along options hash, Text width/height now accept a string, changed EditLine text selection color, temporary back to back gui recalculations to fix positioning errors until Container#layout can safely be called after determining element width and height.
This commit is contained in:
@@ -9,7 +9,7 @@ module CyberarmEngine
|
||||
@text = text.to_s || ""
|
||||
@options = options
|
||||
@size = options[:size] || 18
|
||||
@font = options[:font] || "sans-serif"#Gosu.default_font_name
|
||||
@font = options[:font] || Gosu.default_font_name
|
||||
@x = options[:x] || 0
|
||||
@y = options[:y] || 0
|
||||
@z = options[:z] || 1025
|
||||
@@ -98,12 +98,12 @@ module CyberarmEngine
|
||||
@shadow_color = n
|
||||
end
|
||||
|
||||
def width
|
||||
textobject.text_width(@text)
|
||||
def width(text = @text)
|
||||
textobject.text_width(text)
|
||||
end
|
||||
|
||||
def height
|
||||
@text.lines.count > 0 ? (@text.lines.count) * textobject.height : @textobject.height
|
||||
def height(text = @text)
|
||||
text.lines.count > 0 ? (text.lines.count) * textobject.height : @textobject.height
|
||||
end
|
||||
|
||||
def draw
|
||||
|
||||
Reference in New Issue
Block a user