Added padding and margin left,right,top,bottom, changed CheckBox to ToggleButton, added new CheckBox which uses a Flow with ToggleButton and Label.

This commit is contained in:
2019-03-01 15:57:22 -06:00
parent 21904ae6fe
commit 478c8498f3
16 changed files with 162 additions and 103 deletions

View File

@@ -32,7 +32,7 @@ module CyberarmEngine
new_mouse_over = @root_container.hit_element?(window.mouse_x, window.mouse_y)
if new_mouse_over
new_mouse_over.publish(:enter) if new_mouse_over != @mouse_over
new_mouse_over.publish(:hover, window.mouse_x, window.mouse_y)
new_mouse_over.publish(:hover)
end
@mouse_over.publish(:leave) if @mouse_over && new_mouse_over != @mouse_over
@mouse_over = new_mouse_over
@@ -93,8 +93,6 @@ module CyberarmEngine
@mouse_over.publish(:"released_#{button}_mouse_button", window.mouse_x, window.mouse_y) if @mouse_over
@mouse_over.publish(:"clicked_#{button}_mouse_button", window.mouse_x, window.mouse_y) if @mouse_over == @mouse_down_on[button]
p @mouse_over.class, @mouse_down_on[button].class
@mouse_down_position[button] = nil
@mouse_down_on[button] = nil
end