- [FIX] [zx_dialog_joystick] No es podia seleccionar quin joystick configurar
- [FIX] al recrear una finestra de vegades es perdia la textura de les fonts de la UI.
This commit is contained in:
1
ui.cpp
1
ui.cpp
@@ -41,7 +41,6 @@ namespace ui
|
|||||||
|
|
||||||
void setrenderer(SDL_Renderer *renderer, SDL_Texture *texture)
|
void setrenderer(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||||
{
|
{
|
||||||
if (ren==renderer) return;
|
|
||||||
ren = renderer;
|
ren = renderer;
|
||||||
tex = texture;
|
tex = texture;
|
||||||
offset_x = offset_y = 0;
|
offset_x = offset_y = 0;
|
||||||
|
|||||||
@@ -40,12 +40,20 @@ namespace dialogs
|
|||||||
{
|
{
|
||||||
char name[] = "JOYSTICK 0";
|
char name[] = "JOYSTICK 0";
|
||||||
name[9] = 48+i;
|
name[9] = 48+i;
|
||||||
if (selected==i) {
|
back_color = COLOR_DARK;
|
||||||
ui::printrect(0,i,18,1, COLOR_WHITE);
|
front_color = COLOR_WHITE;
|
||||||
ui::printtxt(0,i,name, COLOR_BLACK);
|
if (ui::mouseInside(0,i,18,1)) {
|
||||||
} else {
|
back_color = COLOR_BLACK;
|
||||||
ui::printtxt(0,i,name, COLOR_WHITE);
|
if (ui::getClicked()) {
|
||||||
|
selected = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (selected==i) {
|
||||||
|
back_color = COLOR_WHITE;
|
||||||
|
front_color = COLOR_BLACK;
|
||||||
|
}
|
||||||
|
ui::printrect(0,i,18,1, back_color);
|
||||||
|
ui::printtxt(0,i,name, front_color);
|
||||||
}
|
}
|
||||||
ui::panel(60,17,20,8,"TYPE:");
|
ui::panel(60,17,20,8,"TYPE:");
|
||||||
const int selected_type = gamepad::getGamepadType(selected);
|
const int selected_type = gamepad::getGamepadType(selected);
|
||||||
|
|||||||
Reference in New Issue
Block a user