forked from bionickatana/number_factory
Added font file and changed font to be monospace
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@ class DialougeBox
|
||||
attr_accessor :show
|
||||
def initialize(parent_x, parent_y, screen_width, screen_height, text)
|
||||
@text = text
|
||||
@longest_line = ((@text.split("\n").map { |ss| ss.length}.max) / 3).to_i
|
||||
@longest_line = ((@text.split("\n").map { |ss| ss.length}.max) / 2.25).to_i
|
||||
@line_count = @text.split("\n").length
|
||||
|
||||
@x = parent_x
|
||||
@@ -24,7 +24,7 @@ class DialougeBox
|
||||
Gosu::Color.new(0xC0, 0xFF, 0xFF, 0xFF),
|
||||
0,
|
||||
)
|
||||
Gosu::Image.from_text(text, TEXT_SIZE).draw(TEXT_MARGIN, TEXT_MARGIN)
|
||||
Gosu::Image.from_text(text, TEXT_SIZE, font: FONT_PATH).draw(TEXT_MARGIN, TEXT_MARGIN)
|
||||
}
|
||||
end
|
||||
|
||||
@@ -43,7 +43,7 @@ class DialougeBox
|
||||
Gosu::Color.new(0xC0, 0xFF, 0xFF, 0xFF),
|
||||
0,
|
||||
)
|
||||
Gosu::Image.from_text(newtext, TEXT_SIZE).draw(TEXT_MARGIN, TEXT_MARGIN)
|
||||
Gosu::Image.from_text(newtext, TEXT_SIZE, font: FONT_PATH).draw(TEXT_MARGIN, TEXT_MARGIN)
|
||||
}
|
||||
end
|
||||
@camera_zoom = camera_zoom
|
||||
|
||||
Reference in New Issue
Block a user