Added Link element which is basically a button without a border or background, WIP: Element border, margin, padding, and other styles are now easily changable; work is needed to make style changes survive a recalculation

This commit is contained in:
2021-03-22 21:10:06 -05:00
committed by Cyberarm
parent f662fabc56
commit a70c106387
8 changed files with 140 additions and 233 deletions

View File

@@ -5,8 +5,11 @@ module CyberarmEngine
super(options, block)
options[:toggled] = options[:checked]
options[:parent] = self
@toggle_button = ToggleButton.new(options)
@label = TextBlock.new(text, options)
options[:parent] = self
@label = TextBlock.new(text, options)
@label.subscribe(:holding_left_mouse_button) do |sender, x, y|
@toggle_button.left_mouse_button(sender, x, y)