cellpadding_y param

pull/395/head
FlightlessMango 4 years ago
parent 60ffab4350
commit e5015283a8

@ -185,6 +185,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `cpu_load_change` | Changes the color of the CPU load depending on load |
| `cpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `cpu_load_color=0000FF,00FFFF,FF00FF` |
| `cpu_load_value` | Set the values for medium and high load e.g `cpu_load_value=50,90` |
| `cellpadding_y` | Set the vertical cellpadding, default is `-0.085` |
Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32`

@ -344,6 +344,7 @@ parse_font_glyph_ranges(const char *str)
#define parse_alpha(s) parse_float(s)
#define parse_permit_upload(s) parse_unsigned(s)
#define parse_no_small_font(s) parse_unsigned(s) != 0
#define parse_cellpadding_y(s) parse_float(s)
#define parse_cpu_color(s) parse_color(s)
#define parse_gpu_color(s) parse_color(s)
@ -533,6 +534,7 @@ parse_overlay_config(struct overlay_params *params,
params->benchmark_percentiles = { "97", "AVG", "1", "0.1" };
params->gpu_load_value = { 90, 60 };
params->cpu_load_value = { 90, 60 };
params->cellpadding_y = -0.085;

@ -113,6 +113,7 @@ typedef unsigned long KeySym;
OVERLAY_PARAM_CUSTOM(cpu_load_value) \
OVERLAY_PARAM_CUSTOM(gpu_load_color) \
OVERLAY_PARAM_CUSTOM(cpu_load_color) \
OVERLAY_PARAM_CUSTOM(cellpadding_y) \
enum overlay_param_position {
LAYER_POSITION_TOP_LEFT,
@ -182,6 +183,7 @@ struct overlay_params {
float font_size_text;
float font_scale_media_player;
float background_alpha, alpha;
float cellpadding_y;
std::vector<KeySym> toggle_hud;
std::vector<KeySym> toggle_fps_limit;
std::vector<KeySym> toggle_logging;

@ -1782,7 +1782,7 @@ void convert_colors(bool do_conv, struct swapchain_stats& sw_stats, struct overl
style.Colors[ImGuiCol_PlotHistogram] = convert(params.frametime_color);
style.Colors[ImGuiCol_WindowBg] = convert(params.background_color);
style.Colors[ImGuiCol_Text] = convert(params.text_color);
style.CellPadding.y = -0.085 * real_font_size.y;
style.CellPadding.y = params.cellpadding_y * real_font_size.y;
}
// TODO probably needs colorspace check too

Loading…
Cancel
Save