Class: Window

Inherits:
Object
  • Object
show all
Includes:
RGSS3::Container
Defined in:
lib/rgss3/window.rb

Instance Attribute Summary collapse

Attributes included from RGSS3::Container

#ox, #oy, #tone, #viewport, #z

Instance Method Summary collapse

Methods included from RGSS3::Container

#dispose, #disposed?, #initialize_copy

Constructor Details

#initialize(*args) ⇒ Window

Returns a new instance of Window.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/rgss3/window.rb', line 25

def initialize(*args)
  case args.size
  when 0
    @x = 0
    @y = 0
    @width = 0
    @height = 0
  when 4
    @x, @y, @width, @height = args
  end
  @contents = Bitmap.new(1, 1)
  @cursor_rect = Rect.new
  @padding = 12
  @padding_bottom = 8
  @pause = false
  @arrows_visible = true
  @active = true
  @openness = 255
  super()
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



10
11
12
# File 'lib/rgss3/window.rb', line 10

def active
  @active
end

#arrows_visibleObject

Returns the value of attribute arrows_visible.



12
13
14
# File 'lib/rgss3/window.rb', line 12

def arrows_visible
  @arrows_visible
end

#back_opacityObject

Returns the value of attribute back_opacity.



21
22
23
# File 'lib/rgss3/window.rb', line 21

def back_opacity
  @back_opacity
end

#contentsObject

Returns the value of attribute contents.



8
9
10
# File 'lib/rgss3/window.rb', line 8

def contents
  @contents
end

#contents_opacityObject

Returns the value of attribute contents_opacity.



22
23
24
# File 'lib/rgss3/window.rb', line 22

def contents_opacity
  @contents_opacity
end

#cursor_rectObject

Returns the value of attribute cursor_rect.



9
10
11
# File 'lib/rgss3/window.rb', line 9

def cursor_rect
  @cursor_rect
end

#heightObject

Returns the value of attribute height.



17
18
19
# File 'lib/rgss3/window.rb', line 17

def height
  @height
end

#opacityObject

Returns the value of attribute opacity.



20
21
22
# File 'lib/rgss3/window.rb', line 20

def opacity
  @opacity
end

#opennessObject

Returns the value of attribute openness.



23
24
25
# File 'lib/rgss3/window.rb', line 23

def openness
  @openness
end

#paddingObject

Returns the value of attribute padding.



18
19
20
# File 'lib/rgss3/window.rb', line 18

def padding
  @padding
end

#padding_bottomObject

Returns the value of attribute padding_bottom.



19
20
21
# File 'lib/rgss3/window.rb', line 19

def padding_bottom
  @padding_bottom
end

#pauseObject

Returns the value of attribute pause.



13
14
15
# File 'lib/rgss3/window.rb', line 13

def pause
  @pause
end

#visibleObject

Returns the value of attribute visible.



11
12
13
# File 'lib/rgss3/window.rb', line 11

def visible
  @visible
end

#widthObject

Returns the value of attribute width.



16
17
18
# File 'lib/rgss3/window.rb', line 16

def width
  @width
end

#windowskinObject

Returns the value of attribute windowskin.



7
8
9
# File 'lib/rgss3/window.rb', line 7

def windowskin
  @windowskin
end

#xObject

Returns the value of attribute x.



14
15
16
# File 'lib/rgss3/window.rb', line 14

def x
  @x
end

#yObject

Returns the value of attribute y.



15
16
17
# File 'lib/rgss3/window.rb', line 15

def y
  @y
end

Instance Method Details

#close?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/rgss3/window.rb', line 60

def close?
  @openness == 0
end

#drawObject



68
69
70
# File 'lib/rgss3/window.rb', line 68

def draw
  # TODO
end

#move(x, y, width, height) ⇒ Object



49
50
51
52
53
54
# File 'lib/rgss3/window.rb', line 49

def move(x, y, width, height)
  @x = x
  @y = y
  @width = width
  @height = height
end

#open?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/rgss3/window.rb', line 56

def open?
  @openness == 255
end

#updateObject



46
47
# File 'lib/rgss3/window.rb', line 46

def update
end