Class: Gtk::Chess::ChessPiece

Inherits:
Button
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeChessPiece

#

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

.runObject

#

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?

#

Returns:

  • (Boolean)


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?

#

Returns:

  • (Boolean)


55
56
57
# File 'lib/games_paradise/gui/gtk3/chess/chess_piece.rb', line 55

def padding?
  12
end

#resetObject

#

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