- Joined
- Aug 5, 2020
- Posts
- 1
Hi. I've tried to replace the status icons with coloured borders which go around the Pokémon icons but I can't get the positioning right. I've tried a few different ways but nothing seems to be working.
I think it would help to better understand the below, especially what the values in the method represent.
I believe Rect.new is Rect.new(x, y, width, height)
The original line of what I've changed was
From what I can figure, the 8 and 48 are the width and height of the graphic, but I've no idea about the rest. Any help would be appreciated.
I think it would help to better understand the below, especially what the values in the method represent.
Ruby:
status -= 1
if status >= 0
statusrect = Rect.new(0,64*status,64,64)
@sprites["overlay"].bitmap.blt(spacing + (Graphics.width/64) + 384, Graphics.height/2, @status.bitmap, statusrect)
end
I believe Rect.new is Rect.new(x, y, width, height)
The original line of what I've changed was
Ruby:
@sprites["overlay"].bitmap.blt(spacing + (Graphics.width/8) + 48, Graphics.height/2 - 106, @status.bitmap, statusrect)
From what I can figure, the 8 and 48 are the width and height of the graphic, but I've no idea about the rest. Any help would be appreciated.