module Canis::FocusManager

Attributes

focusables[R]

Public Instance Methods

add(component) click to toggle source

add a component to this list so it can be made focusable later

# File lib/canis/core/util/focusmanager.rb, line 16
def add component
  @focusables ||= []
  @focusables << component
  self
end
make_focusable(bool=true) click to toggle source
# File lib/canis/core/util/focusmanager.rb, line 21
def make_focusable bool=true
  @focusing = bool
  @focusables.each { |e| e.focusable(bool) }
end
toggle_focusable() click to toggle source
# File lib/canis/core/util/focusmanager.rb, line 25
def toggle_focusable
  return unless @focusables
  alert "FocusManager Making #{@focusables.length} objects #{!@focusing} "
  make_focusable !@focusing
end