class MenuUI
- Auteur
-
Brabant Mano
- Version
-
0.1
- Date
-
09/04/2020
Attributes
choixDifficulte[R]
choixNom[R]
choixTaille[R]
difficulte[RW]
racine[R]
taille[RW]
Public Class Methods
new(racine)
click to toggle source
Calls superclass method
# File UI/MenuUI.rb, line 26 def initialize(racine) super(:vertical, 0) @racine = racine @titre = Gtk::Label.new("Bienvenue dans le Hashiparmentier") @choixNom = ChoixNomUI.new(self) @choixTaille = ChoixTailleUI.new(self) @taille = 7 @choixDifficulte = ChoixDifficulteUI.new(self) @difficulte = 0 @regles = Gtk::Button.new(:label => "Règles") @regles.signal_connect "clicked" do afficheRegles() end @valide = Gtk::Button.new(:label => "Valider") @valide.signal_connect "clicked" do valide(@choixNom.entry.text(), @taille, @difficulte) end @fenetreRegles = FenetreReglesUI.new() @boxValide = Gtk::Box.new(:horizontal) @surBoxValide = Gtk::Box.new(:vertical) @boxValide.pack_start(@regles, :expand => true, :fill => true) @boxValide.pack_start(@valide) @boxValide.pack_start(Gtk::Alignment.new(0,0,0,0), :expand => true, :fill => true) @surBoxValide.pack_start(@boxValide, :expand => true) end
Public Instance Methods
afficheLabel(label)
click to toggle source
# File UI/MenuUI.rb, line 92 def afficheLabel(label) pack_start(@label = Gtk::Label.new(label), :expand => true, :fill => true) show_all end
afficheRegles()
click to toggle source
# File UI/MenuUI.rb, line 100 def afficheRegles @fenetreRegles.show_all end
retourMenu()
click to toggle source
# File UI/MenuUI.rb, line 62 def retourMenu() each_all do |c| remove(c) end pack_start(@titre, :expand => true, :fill => true) pack_start(@choixNom, :expand => true, :fill => true) pack_start(@choixTaille, :expand => true, :fill => true) pack_start(@choixDifficulte, :expand => true, :fill => true) pack_start(@surBoxValide, :expand => true, :fill => true) end