smalruby 0.0.11-x86-mingw32 → 0.0.12-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of smalruby might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97f67453d379aa35debc94a5001717b9a9d5462a
4
- data.tar.gz: 8e61b50a286045a95f1d17990ff7a67d0140dab1
3
+ metadata.gz: 893936bc5774fe45d4eaad40b553947745e83497
4
+ data.tar.gz: cec60036e1569da08d723ee4bb1e72100f7028b1
5
5
  SHA512:
6
- metadata.gz: 48b3df938441ce028b9ef79d59769e035d33b07bba8e7ab412192e038d97bc9e16f13de77f4f39b5a5cec4a419e68dce8fb6aa0f1f198f3c79ace11864fac967
7
- data.tar.gz: 4947ebb00dc75b53992c386ac1007bd622dd81bcdf65f62cae0051d1d503520aa365bb62faa4cc263ace67e4bf479877c40c34b597134dffbee1a6bb2a8e4502
6
+ metadata.gz: efa9ed19fac900c24a682354daf39e2ed947bce61cc6221b9f9d07a975105cdc35d55610793c3fb681bc7a082d3ffdc11879da47508fab239fcf7e0e999f56a9
7
+ data.tar.gz: b56dc272f8fd0792117cff9acfab679c63b61e8c59c6e0958d1f0b34be9d761f0a36424a913b286083dff69aa0d265d879334889df4a4bd0b15e6658b4187dc9
@@ -125,9 +125,10 @@ module Smalruby
125
125
  @balloon = nil
126
126
  end
127
127
 
128
- return if opts[:message].empty?
128
+ message = opts[:message].to_s
129
+ return if message.empty?
129
130
 
130
- lines = opts[:message].to_s.lines.map { |l| l.scan(/.{1,10}/) }.flatten
131
+ lines = message.to_s.lines.map { |l| l.scan(/.{1,10}/) }.flatten
131
132
  font = new_font(16)
132
133
  width = lines.map { |l| font.get_width(l) }.max
133
134
  height = lines.length * (font.size + 1)
@@ -145,9 +146,11 @@ module Smalruby
145
146
  width + (frame_size + margin_size) + margin_size - 1,
146
147
  height + (frame_size + margin_size) + margin_size - 1,
147
148
  [255, 255, 255])
148
- image.draw_font(frame_size + margin_size,
149
- frame_size + margin_size,
150
- lines.join("\n"), font, [0, 0, 0])
149
+ lines.each.with_index do |line, row|
150
+ image.draw_font(frame_size + margin_size,
151
+ frame_size + margin_size + (font.size + 1) * row,
152
+ line, font, [0, 0, 0])
153
+ end
151
154
  @balloon = Sprite.new(self.x, self.y, image)
152
155
  end
153
156
 
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module Smalruby
4
- VERSION = '0.0.11'
4
+ VERSION = '0.0.12'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smalruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Kouji Takao