Class: Aniview::View::PrefMenu
- Includes:
- Util
- Defined in:
- lib/aniview/view/prefmenu.rb
Instance Attribute Summary
Attributes inherited from Menu
Instance Method Summary collapse
Methods included from Util
decode_object, encode_object, error_message, format_duration, format_progress, format_size, mounted_filesystem?, parse_format, readline
Methods inherited from Menu
#adjustView, #auto_update, #change_screen_size, #color, #control, #draw, #expand, #fixCursor, #getLen, #initialize, #interface, #moveCursor, #pause, #refresh, #refreshFormats, #refresh_attributes, #resolve_selected, #rfunc=, #unpause, #updated!, #updated?
Constructor Details
This class inherits a constructor from Aniview::View::Menu
Instance Method Details
#customControl(key, sel) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/aniview/view/prefmenu.rb', line 9 def customControl(key, sel) path = @items[sel["out"]].path title = @items[sel["out"]].attributes["t"] value = @items[sel["out"]].attributes["v"] if key == "enter" case @interface.pref_type(path) when "boolean" @interface.set(path, (not @interface.get_pref(path))) else newval = Util.readline(@term, title + ":", value) @interface.set(path, newval) end refresh end end |