Class: ChoixTailleUI
- Inherits:
-
Gtk::Box
- Object
- Gtk::Box
- ChoixTailleUI
- Defined in:
- lib/Hashiparmentier/UI/ChoixTailleUI.rb
Overview
PAS UTILISE DANS LE VERSION FINALE
- Auteur
-
Brabant Mano
- Version
-
0.1
- Date
-
09/04/2020
Permet de choisir une taille
Instance Attribute Summary collapse
-
#menu ⇒ Object
readonly
Returns the value of attribute menu.
Instance Method Summary collapse
-
#initialize(menu) ⇒ ChoixTailleUI
constructor
A new instance of ChoixTailleUI.
Constructor Details
#initialize(menu) ⇒ ChoixTailleUI
Returns a new instance of ChoixTailleUI.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/Hashiparmentier/UI/ChoixTailleUI.rb', line 16 def initialize() super(:vertical, 0) @menu = @boutons = Gtk::Box.new(:horizontal, 0) for i in [7, 10, 15] temp = Gtk::Button.new(:label => "#{i}*#{i}") temp.name=i.to_s() temp.signal_connect "clicked" do |, event| @menu.taille=.name.to_i() end @boutons.pack_start(temp, :expand => true, :fill => true) end temp = Gtk::Box.new(:vertical, 0) temp.pack_start(Gtk::Label.new("Taille de la grille"), :expand => true, :fill => true) temp.pack_start(@boutons, :expand => true, :fill => true) pack_start(temp, :expand => true, :fill => true) end |
Instance Attribute Details
#menu ⇒ Object (readonly)
Returns the value of attribute menu.
14 15 16 |
# File 'lib/Hashiparmentier/UI/ChoixTailleUI.rb', line 14 def @menu end |