class ChoixTailleUI
Auteur:: Brabant Mano Version:: 0.1 Date:: 09/04/2020
Permet de choisir une taille
Attributes
Public Class Methods
new(menu)
click to toggle source
Calls superclass method
# File UI/ChoixTailleUI.rb, line 15 def initialize(menu) super(:vertical, 0) @menu = 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 |widget, event| @menu.taille=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("Taille de la grille"), :expand => true, :fill => true) temp.pack_start(@boutons, :expand => true, :fill => true) pack_start(temp, :expand => true, :fill => true) end