Class: Gtk::Chess::ChessPiece
- Inherits:
-
Button
- Object
- Button
- Gtk::Chess::ChessPiece
- Includes:
- BaseModule
- Defined in:
- lib/games_paradise/gui/gtk3/chess/chess_piece.rb
Overview
Gtk::Chess::ChessPiece
Constant Summary collapse
- NAMESPACE =
#
NAMESPACE
#
inspect
Class Method Summary collapse
-
.run ⇒ Object
# === Gtk::ChessPiece.run ========================================================================= #.
Instance Method Summary collapse
-
#favicon? ⇒ Boolean
# === favicon? ========================================================================= #.
-
#initialize ⇒ ChessPiece
constructor
# === initialize ========================================================================= #.
-
#padding? ⇒ Boolean
# === padding? ========================================================================= #.
-
#reset ⇒ Object
# === reset ========================================================================= #.
Constructor Details
#initialize ⇒ ChessPiece
#
initialize
#
31 32 33 34 35 36 |
# File 'lib/games_paradise/gui/gtk3/chess/chess_piece.rb', line 31 def initialize super() _ = Roebe.unicode_chess_symbols?.first set_text(_) reset end |
Class Method Details
.run ⇒ Object
#
Gtk::ChessPiece.run
#
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/games_paradise/gui/gtk3/chess/chess_piece.rb', line 69 def self.run require 'gtk_paradise/run' r = Gtk.run( 250, 250 ) r.modify_background(:normal, :grey) r << ::Gtk::Chess::ChessPiece.new r.top_left r.show_then_run end |
Instance Method Details
#favicon? ⇒ Boolean
#
favicon?
#
62 63 64 |
# File 'lib/games_paradise/gui/gtk3/chess/chess_piece.rb', line 62 def favicon? '/home/x/DATA/images/PC/TASKS.jpg' end |
#padding? ⇒ Boolean
#
padding?
#
55 56 57 |
# File 'lib/games_paradise/gui/gtk3/chess/chess_piece.rb', line 55 def padding? 12 end |
#reset ⇒ Object
#
reset
#
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/games_paradise/gui/gtk3/chess/chess_piece.rb', line 41 def reset # ======================================================================= # # === @configuration # ======================================================================= # @configuration = [true, __dir__, NAMESPACE] # ======================================================================= # # === @title # ======================================================================= # @title = 'Chess-Piece' end |