Added header variant of Label control, makde DropdownList control

This commit is contained in:
Maruno17
2023-11-04 23:12:25 +00:00
parent 64890f3c9e
commit ab2d2c1356
12 changed files with 209 additions and 10 deletions

View File

@@ -46,6 +46,16 @@ class UIControls::BaseControl < BitmapSprite
@interactions = {}
end
def mouse_in_control?
return false if !@interactions || @interactions.empty?
mouse_x, mouse_y = mouse_pos
return false if !mouse_x || !mouse_y
@interactions.each_pair do |area, rect|
return true if rect.contains?(mouse_x, mouse_y)
end
return false
end
#-----------------------------------------------------------------------------
def invalid?