Class: Aniview::View::ScheduleMenu
- Includes:
- Util
- Defined in:
- lib/aniview/view/schedulemenu.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 24 25 |
# File 'lib/aniview/view/schedulemenu.rb', line 9 def customControl(key, sel) item = @items.values[sel["out"]].attributes["t"] if key == @pref.get("keybindings")["schedule_add_item"] newval = Util.readline(@term, "new item:") @interface.addItem newval elsif key == @pref.get("keybindings")["schedule_delete_item"] @interface.removeItem sel["out"] elsif key == @pref.get("keybindings")["schedule_edit_item"] newval = Util.readline(@term, "edit item:", item) @interface.editItem sel["out"], newval end end |