Sha256: aa66601825e24b3f99c98f965b32e2219875d6bbc1f36d85641c091b44cca578

Contents?: true

Size: 855 Bytes

Versions: 1

Compression:

Stored size: 855 Bytes

Contents


require 'gtk3'

##
# PAS UTILISE DANS LE VERSION FINALE
# Auteur:: Brabant Mano
# Version:: 0.1
# Date:: 09/04/2020
#
#Permet de choisir une taille
class ChoixTailleUI < Gtk::Box

  attr_reader :menu

  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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Hashiparmentier-0.4.0 lib/Hashiparmentier/UI/ChoixTailleUI.rb