Module: UI::Message::Draw
- Included in:
- Window
- Defined in:
- scripts/01450 Systems/00004 Message/00002 UI/00005 Draw.rb,
scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb
Overview
Module defining the drawing methods of messages
Instance Method Summary collapse
-
#process_big_text_marker(marker)
(also: #process_marker4)
Process the big text marker.
-
#process_color_marker(marker)
(also: #process_marker1)
Process the color marker.
-
#process_marker
Function that process the markers of the message (property modifier).
-
#process_picture_marker(marker)
(also: #process_marker15)
Process the picture marker.
-
#process_speed_marker(marker)
(also: #process_marker5)
Process the speed marker.
-
#process_style_marker(marker)
(also: #process_marker3)
Process the style marker.
-
#process_wait_marker(marker)
(also: #process_marker2)
Process the wait marker.
Instance Method Details
#process_big_text_marker(marker) Also known as: process_marker4
Process the big text marker
38 39 40 |
# File 'scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb', line 38 def process_big_text_marker(marker) @style |= 0x04 end |
#process_color_marker(marker) Also known as: process_marker1
Process the color marker
15 16 17 |
# File 'scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb', line 15 def process_color_marker(marker) @color = translate_color(marker.data.to_i) end |
#process_marker
Function that process the markers of the message (property modifier)
5 6 7 8 9 10 11 |
# File 'scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb', line 5 def process_marker # @type [PFM::Message::Instructions::Marker] marker = current_instruction marker_method = :"process_marker#{marker.id}" send(marker_method, marker) if respond_to?(marker_method) @text_x += marker.width end |
#process_picture_marker(marker) Also known as: process_marker15
Process the picture marker
52 53 54 55 56 57 58 |
# File 'scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb', line 52 def process_picture_marker(marker) filename, cache, dx, dy = marker.data.split(',') sprite = Sprite.new(self) sprite.set_position(@text_x + dx.to_i, @text_y + dy.to_i) sprite.load(filename, cache.to_sym) text_stack.push_sprite(sprite) end |
#process_speed_marker(marker) Also known as: process_marker5
Process the speed marker
45 46 47 |
# File 'scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb', line 45 def process_speed_marker(marker) @current_speed = marker.data.to_i end |
#process_style_marker(marker) Also known as: process_marker3
Process the style marker
30 31 32 33 |
# File 'scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb', line 30 def process_style_marker(marker) style = marker.data.to_i @style = @style & 0x04 | style end |
#process_wait_marker(marker) Also known as: process_marker2
Process the wait marker
22 23 24 25 |
# File 'scripts/01450 Systems/00004 Message/00002 UI/00007 Markers.rb', line 22 def process_wait_marker(marker) @wait_animation = Yuki::Animation.wait(marker.data.to_f / 60) @wait_animation.start end |