Move settings ui to SettingsPage class, show different widgets for different settings page, show different widgets depending on combobox selections

This commit is contained in:
dec05eba
2024-08-07 20:32:59 +02:00
parent 2ea32e1109
commit b709805cfa
14 changed files with 504 additions and 313 deletions

View File

@@ -57,7 +57,7 @@ namespace gsr {
mgl_scissor prev_scissor;
mgl_window_get_scissor(window.internal_window(), &prev_scissor);
const mgl::vec2f content_size = get_size();
const mgl::vec2f content_size = get_inner_size();
mgl_scissor new_scissor = {
mgl_vec2i{(int)offset.x, (int)offset.y},
mgl_vec2i{(int)content_size.x, (int)content_size.y}
@@ -81,6 +81,13 @@ namespace gsr {
if(!visible)
return {0.0f, 0.0f};
return size;
}
mgl::vec2f ScrollablePage::get_inner_size() {
if(!visible)
return {0.0f, 0.0f};
const int margin_top = margin_top_scale * get_theme().window_height;
const int margin_bottom = margin_bottom_scale * get_theme().window_height;
const int margin_left = margin_left_scale * get_theme().window_height;