Class: FinUI
- Inherits:
-
Gtk::Box
- Object
- Gtk::Box
- FinUI
- Defined in:
- lib/Hashiparmentier/UI/FinUI.rb
Overview
PAS UTILISE DANS LE VERSION FINALE
- Auteur
-
Brabant Mano
- Version
-
0.1
- Date
-
09/04/2020
Montre l’ecran de victoire
Instance Method Summary collapse
-
#initialize(racine) ⇒ FinUI
constructor
A new instance of FinUI.
- #reussi(taille, difficulte) ⇒ Object
Constructor Details
#initialize(racine) ⇒ FinUI
Returns a new instance of FinUI.
17 18 19 20 21 22 23 |
# File 'lib/Hashiparmentier/UI/FinUI.rb', line 17 def initialize(racine) super(:vertical, 10) @racine = racine end |
Instance Method Details
#reussi(taille, difficulte) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/Hashiparmentier/UI/FinUI.rb', line 25 def reussi(taille, difficulte) each_all do |c| remove(c) end add(Gtk::Label.new("Bravo vous avez gagné !!!")) #puts "OSCOUR !!! : " , taille.inspect, difficulte.inspect if(difficulte == 0) if(taille == 7) #puts "JEANNE !!!!!!" add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Pont Gaulois.jpg")) elsif(taille == 10) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Pont Gaulois.jpg")) elsif(taille == 15) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Pont Gaulois.jpg")) end elsif(difficulte == 1) if(taille == 7) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Zubi Zuri.jpg")) elsif(taille == 10) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Zubi Zuri.jpg")) elsif(taille == 15) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Zubi Zuri.jpg")) end elsif(difficulte == 2) if(taille == 7) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Golden Bridge.jpg")) elsif(taille == 10) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Golden Bridge.jpg")) elsif(taille == 15) add(Gtk::Image.new(:file => "lib/Hashiparmentier/Data/Golden Bridge.jpg")) end end show_all end |