mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Added flags to use ffi-gosu optionally instead of always trying, made tooltip affected by theme (the last set theme in setup will be used to style the tooltip)
This commit is contained in:
@@ -26,12 +26,15 @@ module CyberarmEngine
|
||||
@dragging_element = nil
|
||||
@pending_recalculate_request = false
|
||||
|
||||
@tip = Element::ToolTip.new("", parent: @root_container, z: Float::INFINITY)
|
||||
@menu = nil
|
||||
@min_drag_distance = 0
|
||||
@mouse_pos = Vector.new
|
||||
end
|
||||
|
||||
def post_setup
|
||||
@tip = Element::ToolTip.new("", parent: @root_container, z: Float::INFINITY, theme: current_theme)
|
||||
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)
|
||||
@@ -103,7 +106,7 @@ module CyberarmEngine
|
||||
@tip.x = window.mouse_x - @tip.width / 2
|
||||
@tip.x = 0 if @tip.x < 0
|
||||
@tip.x = window.width - @tip.width if @tip.x + @tip.width > window.width
|
||||
@tip.y = window.mouse_y - @tip.height
|
||||
@tip.y = window.mouse_y - (@tip.height + 5)
|
||||
@tip.y = 0 if @tip.y < 0
|
||||
@tip.y = window.height - @tip.height if @tip.y + @tip.height > window.height
|
||||
@tip.update
|
||||
|
||||
Reference in New Issue
Block a user