Add round_corners param

pull/522/head
Alessandro Toia 3 years ago
parent 47865573a8
commit 36ec9ef41a

@ -199,7 +199,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `show_fps_limit` | Display the current fps limit |
| `custom_text_center` | Display a custom text centered useful for a header e.g `custom_text_center=FlightLessMango Benchmarks` |
| `custom_text` | Display a custom text e.g `custom_text=Fsync enabled` |
| `round_corners` | Change the amount of roundness of the corners have e.g `round_corners=10.0` |
Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32`
Because comma is also used as option delimiter and needs to be escaped for values with a backslash, you can use `+` like `MANGOHUD_CONFIG=fps_limit=60+30+0` instead.

@ -81,6 +81,7 @@ void HudElements::convert_colors(struct overlay_params& params)
style.Colors[ImGuiCol_WindowBg] = convert(params.background_color);
style.Colors[ImGuiCol_Text] = convert(params.text_color);
style.CellPadding.y = params.cellpadding_y * real_font_size.y;
style.WindowRounding = params.round_corners;
}
void HudElements::convert_colors(bool do_conv, struct overlay_params& params)

@ -409,6 +409,7 @@ parse_gl_size_query(const char *str)
#define parse_autostart_log(s) parse_unsigned(s)
#define parse_gl_bind_framebuffer(s) parse_unsigned(s)
#define parse_gl_dont_flip(s) parse_unsigned(s) != 0
#define parse_round_corners(s) parse_unsigned(s)
#define parse_cpu_color(s) parse_color(s)
#define parse_gpu_color(s) parse_color(s)
@ -611,7 +612,7 @@ parse_overlay_config(struct overlay_params *params,
params->cellpadding_y = -0.085;
params->fps_color = { 0xb22222, 0xfdfd09, 0x39f900 };
params->fps_value = { 30, 60 };
params->round_corners = 0;
#ifdef HAVE_X11

@ -134,6 +134,7 @@ typedef unsigned long KeySym;
OVERLAY_PARAM_CUSTOM(table_columns) \
OVERLAY_PARAM_CUSTOM(blacklist) \
OVERLAY_PARAM_CUSTOM(autostart_log) \
OVERLAY_PARAM_CUSTOM(round_corners) \
enum overlay_param_position {
@ -195,6 +196,7 @@ struct overlay_params {
unsigned width;
unsigned height;
int offset_x, offset_y;
float round_corners;
unsigned vsync;
int gl_vsync;
int gl_bind_framebuffer {-1};

Loading…
Cancel
Save