lib/cyberarm_engine/ui/elements/button.rb in cyberarm_engine-0.10.2 vs lib/cyberarm_engine/ui/elements/button.rb in cyberarm_engine-0.11.0
- old
+ new
@@ -23,33 +23,45 @@
@text.color = default(:active, :color)
else
@style.background_canvas.background = default(:hover, :background)
@text.color = default(:hover, :color)
end
+
+ return :handled
end
def left_mouse_button(sender, x, y)
@focus = true
@style.background_canvas.background = default(:active, :background)
window.current_state.focus = self
@text.color = default(:active, :color)
+
+ return :handled
end
def released_left_mouse_button(sender,x, y)
enter(sender)
+
+ return :handled
end
def clicked_left_mouse_button(sender, x, y)
@block.call(self) if @block
+
+ return :handled
end
def leave(sender)
@style.background_canvas.background = default(:background)
@text.color = default(:color)
+
+ return :handled
end
def blur(sender)
@focus = false
+
+ return :handled
end
end
end
end
\ No newline at end of file