lib/ppcurses/menu/RadioMenu.rb in ppcurses-0.0.25 vs lib/ppcurses/menu/RadioMenu.rb in ppcurses-0.1.0

- old
+ new

@@ -1,14 +1,11 @@ - -require_relative 'BaseMenu.rb' - module PPCurses #noinspection RubyResolve class RadioMenu < BaseMenu # TODO - duplicate code from Menu ... - def initialize( menu_items, action_items ) + def initialize( menu_items, action_items=nil ) @items = Array.new @actions = Array.new @menu_length = 0 @@ -26,10 +23,10 @@ end end w_width = @menu_length + 4 - @win = Window.new(3, w_width ,0, (cols - w_width) / 2) + @win = Window.new(3, w_width ,0, (Curses.cols - w_width) / 2) @win.timeout=-1 # Enables reading arrow keys in getch @win.keypad(true) end