Mercurial > repos > blastem
comparison nuklear_ui/blastem_nuklear.c @ 2643:57345f6e18f3
Space out some of the settings pages to avoid stuff getting cut off with the smaller font
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 26 Feb 2025 23:43:58 -0800 |
parents | 32ce6c588bc9 |
children | c5c9498ff279 |
comparison
equal
deleted
inserted
replaced
2642:76f3832ae712 | 2643:57345f6e18f3 |
---|---|
2180 uint32_t desired_width = context->style.font->height * 10; | 2180 uint32_t desired_width = context->style.font->height * 10; |
2181 if (desired_width > width) { | 2181 if (desired_width > width) { |
2182 desired_width = width; | 2182 desired_width = width; |
2183 } | 2183 } |
2184 if (nk_begin(context, "Video Settings", nk_rect(0, 0, width, height), 0)) { | 2184 if (nk_begin(context, "Video Settings", nk_rect(0, 0, width, height), 0)) { |
2185 nk_layout_row_static(context, context->style.font->height, desired_width, 2); | 2185 nk_layout_row_static(context, context->style.font->height * 1.25f, desired_width, 2); |
2186 settings_toggle(context, "Fullscreen", "video\0fullscreen\0", 0); | 2186 settings_toggle(context, "Fullscreen", "video\0fullscreen\0", 0); |
2187 settings_toggle(context, "Open GL", "video\0gl\0", 1); | 2187 settings_toggle(context, "Open GL", "video\0gl\0", 1); |
2188 settings_toggle(context, "Scanlines", "video\0scanlines\0", 0); | 2188 settings_toggle(context, "Scanlines", "video\0scanlines\0", 0); |
2189 selected_vsync = settings_dropdown_ex(context, "VSync", vsync_opts, vsync_opt_names, num_vsync_opts, selected_vsync, "video\0vsync\0"); | 2189 selected_vsync = settings_dropdown_ex(context, "VSync", vsync_opts, vsync_opt_names, num_vsync_opts, selected_vsync, "video\0vsync\0"); |
2190 settings_int_input(context, "Windowed Width", "video\0width\0", "640"); | 2190 settings_int_input(context, "Windowed Width", "video\0width\0", "640"); |
2254 uint32_t desired_width = context->style.font->height * 10; | 2254 uint32_t desired_width = context->style.font->height * 10; |
2255 if (desired_width > width) { | 2255 if (desired_width > width) { |
2256 desired_width = width; | 2256 desired_width = width; |
2257 } | 2257 } |
2258 if (nk_begin(context, "Audio Settings", nk_rect(0, 0, width, height), 0)) { | 2258 if (nk_begin(context, "Audio Settings", nk_rect(0, 0, width, height), 0)) { |
2259 nk_layout_row_static(context, context->style.font->height , desired_width, 2); | 2259 nk_layout_row_static(context, context->style.font->height * 1.25f, desired_width, 2); |
2260 selected_rate = settings_dropdown(context, "Rate in Hz", rates, num_rates, selected_rate, "audio\0rate\0"); | 2260 selected_rate = settings_dropdown(context, "Rate in Hz", rates, num_rates, selected_rate, "audio\0rate\0"); |
2261 selected_size = settings_dropdown(context, "Buffer Samples", sizes, num_sizes, selected_size, "audio\0buffer\0"); | 2261 selected_size = settings_dropdown(context, "Buffer Samples", sizes, num_sizes, selected_size, "audio\0buffer\0"); |
2262 settings_int_input(context, "Lowpass Cutoff Hz", "audio\0lowpass_cutoff\0", "3390"); | 2262 settings_int_input(context, "Lowpass Cutoff Hz", "audio\0lowpass_cutoff\0", "3390"); |
2263 settings_float_property(context, "Gain (dB)", "Overall", "audio\0gain\0", 0, -30.0f, 30.0f, 0.5f); | 2263 settings_float_property(context, "Gain (dB)", "Overall", "audio\0gain\0", 0, -30.0f, 30.0f, 0.5f); |
2264 settings_float_property(context, "", "FM", "audio\0fm_gain\0", 0, -30.0f, 30.0f, 0.5f); | 2264 settings_float_property(context, "", "FM", "audio\0fm_gain\0", 0, -30.0f, 30.0f, 0.5f); |
2435 | 2435 |
2436 uint32_t width = render_width(); | 2436 uint32_t width = render_width(); |
2437 uint32_t height = render_height(); | 2437 uint32_t height = render_height(); |
2438 uint32_t desired_width = context->style.font->height * 10; | 2438 uint32_t desired_width = context->style.font->height * 10; |
2439 if (nk_begin(context, "System Settings", nk_rect(0, 0, width, height), 0)) { | 2439 if (nk_begin(context, "System Settings", nk_rect(0, 0, width, height), 0)) { |
2440 nk_layout_row_static(context, context->style.font->height, desired_width, 2); | 2440 nk_layout_row_static(context, context->style.font->height * 1.25f, desired_width, 2); |
2441 | 2441 |
2442 if (show_sms) { | 2442 if (show_sms) { |
2443 selected_model = settings_dropdown_ex(context, "Model", sms_model_opts, sms_model_names, num_sms_models, selected_model, "sms\0system\0model\0"); | 2443 selected_model = settings_dropdown_ex(context, "Model", sms_model_opts, sms_model_names, num_sms_models, selected_model, "sms\0system\0model\0"); |
2444 } else { | 2444 } else { |
2445 selected_model = settings_dropdown_ex(context, "Model", model_opts, model_names, num_models, selected_model, "system\0model\0"); | 2445 selected_model = settings_dropdown_ex(context, "Model", model_opts, model_names, num_models, selected_model, "system\0model\0"); |