- [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)
|
||||
{
|
||||
if (ren==renderer) return;
|
||||
ren = renderer;
|
||||
tex = texture;
|
||||
offset_x = offset_y = 0;
|
||||
|
||||
@@ -40,13 +40,21 @@ namespace dialogs
|
||||
{
|
||||
char name[] = "JOYSTICK 0";
|
||||
name[9] = 48+i;
|
||||
if (selected==i) {
|
||||
ui::printrect(0,i,18,1, COLOR_WHITE);
|
||||
ui::printtxt(0,i,name, COLOR_BLACK);
|
||||
} else {
|
||||
ui::printtxt(0,i,name, COLOR_WHITE);
|
||||
back_color = COLOR_DARK;
|
||||
front_color = COLOR_WHITE;
|
||||
if (ui::mouseInside(0,i,18,1)) {
|
||||
back_color = COLOR_BLACK;
|
||||
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:");
|
||||
const int selected_type = gamepad::getGamepadType(selected);
|
||||
const char* types[5] = {"SINCLAIR 1", "SINCLAIR 2", "KEMPSTON", "FULLER", "CUSTOM"};
|
||||
|
||||
Reference in New Issue
Block a user