Class: ViewBase
Instance Method Summary
collapse
Methods inherited from AkaneSound
#run, #set_status
Constructor Details
#initialize(x, y, w, h, col) ⇒ ViewBase
Returns a new instance of ViewBase.
2
3
4
5
|
# File 'lib/akane_sound/class.view_base.rb', line 2
def initialize(x, y, w, h, col)
@view_base = SDL2::Rect[x, y, w, h]
@col = col
end
|
Instance Method Details
#draw ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/akane_sound/class.view_base.rb', line 14
def draw
@@renderer.viewport = @view_base
@@renderer.draw_color = [@col[:red],
@col[:green],
@col[:blue],
@col[:alpha]]
end
|
#update ⇒ Object
7
8
|
# File 'lib/akane_sound/class.view_base.rb', line 7
def update
end
|
#update_size(x, y, w, h) ⇒ Object
10
11
12
|
# File 'lib/akane_sound/class.view_base.rb', line 10
def update_size(x, y, w, h)
@view_base = SDL2::Rect[x, y, w, h]
end
|