Class: Window
- Inherits:
-
Object
- Object
- Window
- Defined in:
- lib/rgss3/window.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#arrows_visible ⇒ Object
Returns the value of attribute arrows_visible.
-
#back_opacity ⇒ Object
Returns the value of attribute back_opacity.
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#contents_opacity ⇒ Object
Returns the value of attribute contents_opacity.
-
#cursor_rect ⇒ Object
Returns the value of attribute cursor_rect.
-
#height ⇒ Object
Returns the value of attribute height.
-
#opacity ⇒ Object
Returns the value of attribute opacity.
-
#openness ⇒ Object
Returns the value of attribute openness.
-
#ox ⇒ Object
Returns the value of attribute ox.
-
#oy ⇒ Object
Returns the value of attribute oy.
-
#padding ⇒ Object
Returns the value of attribute padding.
-
#padding_bottom ⇒ Object
Returns the value of attribute padding_bottom.
-
#pause ⇒ Object
Returns the value of attribute pause.
-
#tone ⇒ Object
Returns the value of attribute tone.
-
#viewport ⇒ Object
Returns the value of attribute viewport.
-
#visible ⇒ Object
Returns the value of attribute visible.
-
#width ⇒ Object
Returns the value of attribute width.
-
#windowskin ⇒ Object
Returns the value of attribute windowskin.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
-
#z ⇒ Object
Returns the value of attribute z.
Instance Method Summary collapse
- #close? ⇒ Boolean
- #dispose ⇒ Object
- #disposed? ⇒ Boolean
-
#initialize(*args) ⇒ Window
constructor
A new instance of Window.
- #move(x, y, width, height) ⇒ Object
- #open? ⇒ Boolean
- #update ⇒ Object
Constructor Details
#initialize(*args) ⇒ Window
Returns a new instance of Window.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rgss3/window.rb', line 26 def initialize(*args) @contents_sprite = Sprite.new self.contents = Bitmap.new(1, 1) @opacity = 255 @cursor_rect = Rect.new @padding = 8 @padding_bottom = 8 @pause = false @arrows_visible = true @active = true @openness = 255 @visible = true @z = 100 @ox = 0 @oy = 0 @tone = Tone.new @back_opacity = 192 @contents_opacity = 255 case args.size when 0 self.x = 0 self.y = 0 @width = 0 @height = 0 when 4 self.x, self.y, @width, @height = args end end |
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
11 12 13 |
# File 'lib/rgss3/window.rb', line 11 def active @active end |
#arrows_visible ⇒ Object
Returns the value of attribute arrows_visible.
13 14 15 |
# File 'lib/rgss3/window.rb', line 13 def arrows_visible @arrows_visible end |
#back_opacity ⇒ Object
Returns the value of attribute back_opacity.
21 22 23 |
# File 'lib/rgss3/window.rb', line 21 def back_opacity @back_opacity end |
#contents ⇒ Object
Returns the value of attribute contents.
9 10 11 |
# File 'lib/rgss3/window.rb', line 9 def contents @contents end |
#contents_opacity ⇒ Object
Returns the value of attribute contents_opacity.
22 23 24 |
# File 'lib/rgss3/window.rb', line 22 def contents_opacity @contents_opacity end |
#cursor_rect ⇒ Object
Returns the value of attribute cursor_rect.
10 11 12 |
# File 'lib/rgss3/window.rb', line 10 def cursor_rect @cursor_rect end |
#height ⇒ Object
Returns the value of attribute height.
18 19 20 |
# File 'lib/rgss3/window.rb', line 18 def height @height end |
#opacity ⇒ Object
Returns the value of attribute opacity.
24 25 26 |
# File 'lib/rgss3/window.rb', line 24 def opacity @opacity end |
#openness ⇒ Object
Returns the value of attribute openness.
23 24 25 |
# File 'lib/rgss3/window.rb', line 23 def openness @openness end |
#ox ⇒ Object
Returns the value of attribute ox.
4 5 6 |
# File 'lib/rgss3/window.rb', line 4 def ox @ox end |
#oy ⇒ Object
Returns the value of attribute oy.
4 5 6 |
# File 'lib/rgss3/window.rb', line 4 def oy @oy end |
#padding ⇒ Object
Returns the value of attribute padding.
19 20 21 |
# File 'lib/rgss3/window.rb', line 19 def padding @padding end |
#padding_bottom ⇒ Object
Returns the value of attribute padding_bottom.
20 21 22 |
# File 'lib/rgss3/window.rb', line 20 def padding_bottom @padding_bottom end |
#pause ⇒ Object
Returns the value of attribute pause.
14 15 16 |
# File 'lib/rgss3/window.rb', line 14 def pause @pause end |
#tone ⇒ Object
Returns the value of attribute tone.
7 8 9 |
# File 'lib/rgss3/window.rb', line 7 def tone @tone end |
#viewport ⇒ Object
Returns the value of attribute viewport.
5 6 7 |
# File 'lib/rgss3/window.rb', line 5 def @viewport end |
#visible ⇒ Object
Returns the value of attribute visible.
6 7 8 |
# File 'lib/rgss3/window.rb', line 6 def visible @visible end |
#width ⇒ Object
Returns the value of attribute width.
17 18 19 |
# File 'lib/rgss3/window.rb', line 17 def width @width end |
#windowskin ⇒ Object
Returns the value of attribute windowskin.
8 9 10 |
# File 'lib/rgss3/window.rb', line 8 def windowskin @windowskin end |
#x ⇒ Object
Returns the value of attribute x.
15 16 17 |
# File 'lib/rgss3/window.rb', line 15 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
16 17 18 |
# File 'lib/rgss3/window.rb', line 16 def y @y end |
#z ⇒ Object
Returns the value of attribute z.
4 5 6 |
# File 'lib/rgss3/window.rb', line 4 def z @z end |
Instance Method Details
#close? ⇒ Boolean
73 74 75 |
# File 'lib/rgss3/window.rb', line 73 def close? @openness == 0 end |
#dispose ⇒ Object
136 137 138 139 |
# File 'lib/rgss3/window.rb', line 136 def dispose each_internal_sprite(&:dispose) @disposed = true end |
#disposed? ⇒ Boolean
141 142 143 |
# File 'lib/rgss3/window.rb', line 141 def disposed? @disposed end |
#move(x, y, width, height) ⇒ Object
58 59 60 61 62 63 |
# File 'lib/rgss3/window.rb', line 58 def move(x, y, width, height) self.x = x self.y = y @width = width @height = height end |
#open? ⇒ Boolean
69 70 71 |
# File 'lib/rgss3/window.rb', line 69 def open? @openness == 255 end |
#update ⇒ Object
55 56 |
# File 'lib/rgss3/window.rb', line 55 def update end |