mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-16 08:02:36 +00:00
Fixed multiple text y positioning
This commit is contained in:
@@ -5,7 +5,6 @@ class MultiLineText
|
||||
@texts = []
|
||||
text.split("\n").each_with_index do |line, i|
|
||||
_options = options
|
||||
_options[:y]+=_options[:size]
|
||||
@texts << Text.new(line, _options)
|
||||
end
|
||||
@options = options
|
||||
@@ -46,12 +45,13 @@ class MultiLineText
|
||||
|
||||
def y=(int)
|
||||
@y = int
|
||||
puts "Hi, #{int}"
|
||||
@texts.each_with_index {|t, i| t.y=int+(i*t.size)}
|
||||
end
|
||||
|
||||
def calculate_stack
|
||||
@texts.each_with_index do |text, index|
|
||||
text.y = text.size*index
|
||||
text.y = (text.size*index)+@options[:y]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user