mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Fixed ListBox sometimes returning self in callback instead of self.value
This commit is contained in:
@@ -46,6 +46,12 @@ module CyberarmEngine
|
|||||||
:handled
|
:handled
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def clicked_left_mouse_button(_sender, _x, _y)
|
||||||
|
@block&.call(self.value) if @enabled
|
||||||
|
|
||||||
|
:handled
|
||||||
|
end
|
||||||
|
|
||||||
def show_menu
|
def show_menu
|
||||||
@menu.clear
|
@menu.clear
|
||||||
|
|
||||||
@@ -61,7 +67,7 @@ module CyberarmEngine
|
|||||||
},
|
},
|
||||||
proc do
|
proc do
|
||||||
self.choose = item
|
self.choose = item
|
||||||
@block&.call(item)
|
@block&.call(self.value)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user