Class: GamesAndRpgParadise::GUI::Gtk::Wall
- Inherits:
-
Object
- Object
- GamesAndRpgParadise::GUI::Gtk::Wall
- Defined in:
- lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb
Instance Attribute Summary collapse
-
#width ⇒ Object
Returns the value of attribute width.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#draw ⇒ Object
# === draw ========================================================================= #.
-
#height=(i) ⇒ Object
# === height= ========================================================================= #.
-
#height? ⇒ Boolean
(also: #height)
# === height? ========================================================================= #.
-
#initialize(x, y, width, height, color) ⇒ Wall
constructor
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset ========================================================================= #.
-
#update ⇒ Object
# === update ========================================================================= #.
Constructor Details
#initialize(x, y, width, height, color) ⇒ Wall
#
initialize
#
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 26 def initialize( x, y, width, height, color ) @x = x @y = y @width = width @height = height @color = color reset end |
Instance Attribute Details
#width ⇒ Object
Returns the value of attribute width.
21 22 23 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 21 def width @width end |
#x ⇒ Object
Returns the value of attribute x.
19 20 21 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 19 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
20 21 22 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 20 def y @y end |
Instance Method Details
#draw ⇒ Object
#
draw
#
56 57 58 59 60 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 56 def draw Nyle.draw_rect( @x, @y, @width, @height, **{color: @color, fill: true} ) end |
#height=(i) ⇒ Object
#
height=
#
72 73 74 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 72 def height=(i) @height = i end |
#height? ⇒ Boolean Also known as: height
#
height?
#
65 66 67 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 65 def height? @height end |
#reset ⇒ Object
#
reset
#
40 41 42 43 44 45 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 40 def reset # ======================================================================= # # === @configuration # ======================================================================= # @configuration = [true, __dir__, inspect] end |
#update ⇒ Object
#
update
#
50 51 |
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/wall.rb', line 50 def update end |