06-10-2017, 07:52 PM
Know what? My bad. The 'self.width-32' is taking the width of the whole window (640 across). The 'h' (or height) should be 32 . And the very last value ( ,2) ) assumes the text is on the right-most area. In essence, it is drawing the threat on the very edge at the right ... if not off the screen. Change the 'self.width-32' into 160, and the very last '2' into a '1'.
Draw text commands are like this
( X-position, Y-position, width-area, height-of-area, the text, [optional alignment] )
or
( [defined rectangle value], the text, [optional alignment] )
** The '160' is the width of the screen (or 640) divided by 4 (your party size).
** The '32' is the normal height used in a draw-text line. Set it to 16, and you'd likely just see the top half of the text.
** The '1' is the alignment (0 is left justified by default, 1 is centered, 2 is right justified)
Of course, I'm assuming you made the 'threat window stretch across the whole battlesystem screen for this to fit.
Code:
self.contents.draw_text(a.screen_x, 0, 160, 32, @threats[i].to_s, 1)
Draw text commands are like this
( X-position, Y-position, width-area, height-of-area, the text, [optional alignment] )
or
( [defined rectangle value], the text, [optional alignment] )
** The '160' is the width of the screen (or 640) divided by 4 (your party size).
** The '32' is the normal height used in a draw-text line. Set it to 16, and you'd likely just see the top half of the text.
** The '1' is the alignment (0 is left justified by default, 1 is centered, 2 is right justified)
Of course, I'm assuming you made the 'threat window stretch across the whole battlesystem screen for this to fit.