Skip to content

Commit

Permalink
Fixed display bug of already existing sprite
Browse files Browse the repository at this point in the history
  • Loading branch information
theZiz committed Apr 26, 2017
1 parent 4269ab2 commit 2ed263d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ToDo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* Mouse support
* On menu items
* In Lobby
* Fruit Loops Chose too much left?
* In game ;)
* Level load arrows?
8 changes: 8 additions & 0 deletions window.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ static void window_draw_buttons(window_text_positon position, int x, int y, char
in_button = 0;
draw_text = i > 0;
}
else
if (text[i] == 0)
{
in_button = 1;
draw_text = i > 0;
}
if (draw_text)
{
char temp = text[i];
Expand Down Expand Up @@ -335,6 +341,8 @@ void window_draw(void)
spDrawSprite(screen->w/2-to_left, y, 0, spActiveSprite(window_sprite[gop_sprite()]));
window_draw_buttons( RIGHT, screen->w/2-to_left-(sizeFactor*12 >> SP_ACCURACY), y-window->font->maxheight/2, "{power_down}" );
window_draw_buttons( LEFT, screen->w/2-to_left+(sizeFactor*12 >> SP_ACCURACY), y-window->font->maxheight/2, buffer );
//spFontDrawRight( screen->w/2-to_left-(sizeFactor*12 >> SP_ACCURACY), y-window->font->maxheight/2, 0, "{power_down}", window->font );
//spFontDraw ( screen->w/2-to_left+(sizeFactor*12 >> SP_ACCURACY), y-window->font->maxheight/2, 0, buffer, window->font );
y+=(sizeFactor*8 >> SP_ACCURACY)-SMALL_HACK;
if (spGetSizeFactor() <= SP_ONE)
y+=(sizeFactor*6 >> SP_ACCURACY);
Expand Down

0 comments on commit 2ed263d

Please sign in to comment.