Class: GamesAndRpgParadise::Gtk::Chess::ChessPiece

Inherits:
Gtk::Button
  • Object
show all
Includes:
Gtk::BaseModule
Defined in:
lib/games_and_rpg_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

#


33
34
35
36
37
38
# File 'lib/games_and_rpg_paradise/gui/gtk3/chess/chess_piece.rb', line 33

def initialize
  super()
  _ = Roebe.unicode_chess_symbols?.first
  set_text(_)
  reset
end

Class Method Details

.runObject

#

Gtk::ChessPiece.run

#


71
72
73
74
75
76
77
78
79
80
# File 'lib/games_and_rpg_paradise/gui/gtk3/chess/chess_piece.rb', line 71

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)


64
65
66
# File 'lib/games_and_rpg_paradise/gui/gtk3/chess/chess_piece.rb', line 64

def favicon?
  '/home/x/DATA/images/PC/TASKS.jpg'
end

#padding?Boolean

#

padding?

#

Returns:

  • (Boolean)


57
58
59
# File 'lib/games_and_rpg_paradise/gui/gtk3/chess/chess_piece.rb', line 57

def padding?
  12
end

#resetObject

#

reset

#


43
44
45
46
47
48
49
50
51
52
# File 'lib/games_and_rpg_paradise/gui/gtk3/chess/chess_piece.rb', line 43

def reset
  # ======================================================================= #
  # === @configuration
  # ======================================================================= #
  @configuration = [true, __dir__, NAMESPACE]
  # ======================================================================= #
  # === @title
  # ======================================================================= #
  @title = 'Chess-Piece'
end