mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
UX improvements for Button:active handling, added Style stub, Default element width/height is now window width/height instead of 0,0; may need tweaking.
This commit is contained in:
@@ -21,11 +21,17 @@ module CyberarmEngine
|
||||
setup
|
||||
end
|
||||
|
||||
# throws :blur event to focused element and sets GuiState focused element
|
||||
# Does NOT throw :focus event at element or set element as focused
|
||||
def focus=(element)
|
||||
@focus.publish(:blur) if @focus and element
|
||||
@focus.publish(:blur) if @focus and element && @focus != element
|
||||
@focus = element
|
||||
end
|
||||
|
||||
def focused
|
||||
@focus
|
||||
end
|
||||
|
||||
def update
|
||||
super
|
||||
|
||||
|
||||
Reference in New Issue
Block a user