Module: TestSpeechBalloon::SpeechModule
- Defined in:
- lib/test_speech_balloon.rb
Instance Method Summary collapse
- #new_speech(params = {}) ⇒ Object
- #parsed_settings ⇒ Object
- #speech_extend ⇒ Object
- #speech_extend=(params) ⇒ Object
- #supply_default(parsed_settings) ⇒ Object
Instance Method Details
#new_speech(params = {}) ⇒ Object
88 89 90 91 |
# File 'lib/test_speech_balloon.rb', line 88 def new_speech params = {} @speech_extend = TestSpeechBalloon::Speech.new params @speech_extend.supply_default end |
#parsed_settings ⇒ Object
93 94 95 |
# File 'lib/test_speech_balloon.rb', line 93 def parsed_settings @parsed_settings ||= self.speech_balloon_template.parsed_settings end |
#speech_extend ⇒ Object
79 80 81 82 |
# File 'lib/test_speech_balloon.rb', line 79 def speech_extend self.new_speech unless @speech_extend @speech_extend end |
#speech_extend=(params) ⇒ Object
84 85 86 |
# File 'lib/test_speech_balloon.rb', line 84 def speech_extend= params @speech_extend = TestSpeechBalloon::Speech.new params end |
#supply_default(parsed_settings) ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/test_speech_balloon.rb', line 68 def supply_default parsed_settings s = self.parsed_settings['all']['speech'] self.x = s['x_rate'] self.y = s['y_rate'] self.width = s['width_rate'] self.height = s['height_rate'] self.font_size = self.parsed_settings['speech_balloon']['default_font_size'] self.text_align = self.parsed_settings['speech_balloon']['default_text_align'] self.fore_color = self.parsed_settings['speech_balloon']['default_fore_color'] end |