diff --git a/components/retro-go/rg_gui.c b/components/retro-go/rg_gui.c index 9d07e3a4..40102e84 100644 --- a/components/retro-go/rg_gui.c +++ b/components/retro-go/rg_gui.c @@ -392,7 +392,7 @@ rg_rect_t rg_gui_draw_text(int x_pos, int y_pos, int width, const char *text, // { int x_offset = padding; - if (flags & (RG_TEXT_ALIGN_LEFT|RG_TEXT_ALIGN_CENTER)) + if (flags & (RG_TEXT_ALIGN_RIGHT|RG_TEXT_ALIGN_CENTER)) { // Find the current line's text width const char *line = ptr; @@ -406,7 +406,7 @@ rg_rect_t rg_gui_draw_text(int x_pos, int y_pos, int width, const char *text, // } if (flags & RG_TEXT_ALIGN_CENTER) x_offset = (draw_width - x_offset) / 2; - else if (flags & RG_TEXT_ALIGN_LEFT) + else if (flags & RG_TEXT_ALIGN_RIGHT) x_offset = draw_width - x_offset; } diff --git a/launcher/main/gui.c b/launcher/main/gui.c index 4de72dd2..3f1c90b4 100644 --- a/launcher/main/gui.c +++ b/launcher/main/gui.c @@ -490,8 +490,8 @@ void gui_draw_status(tab_t *tab) char *txt_left = tab->status[tab->status[1].left[0] ? 1 : 0].left; char *txt_right = tab->status[tab->status[1].right[0] ? 1 : 0].right; - rg_gui_draw_text(status_x, status_y, gui.width - status_x, txt_right, gui.theme->foreground, C_TRANSPARENT, RG_TEXT_ALIGN_LEFT); - rg_gui_draw_text(status_x, status_y, 0, txt_left, gui.theme->foreground, C_TRANSPARENT, RG_TEXT_ALIGN_RIGHT); + rg_gui_draw_text(status_x, status_y, gui.width - status_x, txt_right, gui.theme->foreground, C_TRANSPARENT, RG_TEXT_ALIGN_RIGHT); + rg_gui_draw_text(status_x, status_y, 0, txt_left, gui.theme->foreground, C_TRANSPARENT, RG_TEXT_ALIGN_LEFT); rg_gui_draw_icons(); }