Class: Rooibos::Welcome::Model

Inherits:
Data
  • Object
show all
Defined in:
lib/rooibos/welcome.rb

Overview

focused: keyboard focus (persists until Tab/Shift+Tab) hovered: mouse hover (clears on mouse-out)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#button_areasObject (readonly)

Returns the value of attribute button_areas

Returns:

  • (Object)

    the current value of button_areas



183
184
185
# File 'lib/rooibos/welcome.rb', line 183

def button_areas
  @button_areas
end

#focusedObject (readonly)

Returns the value of attribute focused

Returns:

  • (Object)

    the current value of focused



183
184
185
# File 'lib/rooibos/welcome.rb', line 183

def focused
  @focused
end

#hoveredObject (readonly)

Returns the value of attribute hovered

Returns:

  • (Object)

    the current value of hovered



183
184
185
# File 'lib/rooibos/welcome.rb', line 183

def hovered
  @hovered
end

Instance Method Details

#active_buttonObject

Returns the “active” button for activation (keyboard takes precedence)



187
# File 'lib/rooibos/welcome.rb', line 187

def active_button = focused || hovered

#treeObject



184
# File 'lib/rooibos/welcome.rb', line 184

def tree = UI.frame(focused:, hovered:)