Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions share/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ int CONFIG_MOUSE_SENSE;
int CONFIG_MOUSE_RESPONSE;
int CONFIG_MOUSE_INVERT;
int CONFIG_VSYNC;
int CONFIG_TRANSITIONS;
int CONFIG_HMD;
int CONFIG_HIGHDPI;
int CONFIG_MOUSE_CAMERA_1;
Expand Down Expand Up @@ -158,6 +159,7 @@ static struct
{ &CONFIG_MOUSE_RESPONSE, "mouse_response", 50 },
{ &CONFIG_MOUSE_INVERT, "mouse_invert", 0 },
{ &CONFIG_VSYNC, "vsync", 1 },
{ &CONFIG_TRANSITIONS, "uitransitions", 1},
{ &CONFIG_HMD, "hmd", 0 },
{ &CONFIG_HIGHDPI, "highdpi", 1 },

Expand Down
3 changes: 2 additions & 1 deletion share/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extern int CONFIG_MOUSE_RESPONSE;
extern int CONFIG_MOUSE_INVERT;
extern int CONFIG_VSYNC;
extern int CONFIG_HMD;
extern int CONFIG_TRANSITIONS;
extern int CONFIG_HIGHDPI;
extern int CONFIG_MOUSE_CAMERA_1;
extern int CONFIG_MOUSE_CAMERA_2;
Expand Down Expand Up @@ -153,4 +154,4 @@ int config_screenshot(void);

/*---------------------------------------------------------------------------*/

#endif
#endif
6 changes: 6 additions & 0 deletions share/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,12 @@ static void gui_widget_offset(int id, int pd)

void gui_set_slide(int id, int flags, float delay, float t, float stagger)
{
if(config_get_d(CONFIG_TRANSITIONS) == 0){
if(t != 0 || delay != 0){ //fix for hack at hud.c:117
t = 0.0000000001f;
delay = 0.00000001f;
}
}
if (id)
{
int jd, c = 0;
Expand Down
17 changes: 15 additions & 2 deletions share/st_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ enum
VIDEO_SHADOW,
VIDEO_VSYNC,
VIDEO_HMD,
VIDEO_MULTISAMPLE
VIDEO_MULTISAMPLE,
VIDEO_TRANSITIONS
};

static struct state *video_back;
Expand Down Expand Up @@ -326,6 +327,12 @@ static int video_action(int tok, int val)
r = video_mode(f, w, h);
goto_state(&st_video);
break;
case VIDEO_TRANSITIONS:
goto_state(&st_null);
config_set_d(CONFIG_TRANSITIONS, val);
r = video_mode(f, w, h);
goto_state(&st_video);
break;
}

return r;
Expand Down Expand Up @@ -400,7 +407,13 @@ static int video_gui(void)
conf_toggle(id, _("Shadow"), VIDEO_SHADOW,
config_get_d(CONFIG_SHADOW), _("On"), 1, _("Off"), 0);

gui_layout(id, 0, 0);
gui_space(id);

conf_toggle(id, _("UI Transitions"), VIDEO_TRANSITIONS,
config_get_d(CONFIG_TRANSITIONS), _("On"), 1, _("Off"), 0);

gui_layout(id, 0, 0);

}

return id;
Expand Down
2 changes: 1 addition & 1 deletion share/transition.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ int transition_page(int id, int in, int intent)
return id;
}

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/