Sha256: bbb7c5c541ecaa9c90ffa2112617ddeda046e4bd9c1fc468a0c16357a934c4f2
Contents?: true
Size: 954 Bytes
Versions: 1
Compression:
Stored size: 954 Bytes
Contents
require 'gtk3' ## # PAS UTILISE DANS LE VERSION FINALE # Auteur:: Brabant Mano # Version:: 0.1 # Date:: 09/04/2020 # #Cette classe permet à l'utilisateur de choisir entre plusieurs difficulté class ChoixDifficulteUI < Gtk::Box attr_reader :menu def initialize(menu) super(:vertical, 0) @menu = menu @boutons = Gtk::Box.new(:horizontal, 0) for i in [[0, 'Facile'], [1, 'Normal'], [2, 'Difficile']] temp = Gtk::Button.new(:label => "#{i[1]}") temp.name=i[0].to_s() temp.signal_connect "clicked" do |widget, event| @menu.difficulte=widget.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("Difficulté de la grille"), :expand => true, :fill => true) temp.pack_start(@boutons, :expand => true, :fill => true) pack_start(temp, :expand => true, :fill => true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
Hashiparmentier-0.4.0 | lib/Hashiparmentier/UI/ChoixDifficulteUI.rb |