Sha256: 91c23acb6c160351d9a9b3ddf045858b3749d28ca815af8b491c9504c257e4dd

Contents?: true

Size: 443 Bytes

Versions: 3

Compression:

Stored size: 443 Bytes

Contents

module PPCurses


  class ChoiceMenu < Menu

    attr_reader :selection
    attr_reader :pressed_enter

    def menu_selection
      while 1
        c = @win.getch

        if c == ESCAPE
          @pressed_enter = false
          self.hide
          break
        end

        if c == ENTER
          @pressed_enter = true
          self.hide
          break
        end

        self.handle_menu_selection(c)

      end
    end


  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ppcurses-0.1.2 lib/ppcurses/menu/choice_menu.rb
ppcurses-0.1.1 lib/ppcurses/menu/choice_menu.rb
ppcurses-0.1.0 lib/ppcurses/menu/choice_menu.rb