Skip to content

Commit e5b5a82

Browse files
author
km7dev
committed
Resizable Scrollbar
1 parent bb986f8 commit e5b5a82

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/DevTools.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct matjson::Serialize<Settings> {
2828
assign(value["advanced_settings"], s.advancedSettings);
2929
assign(value["show_memory_viewer"], s.showMemoryViewer);
3030
assign(value["show_mod_graph"], s.showModGraph);
31+
assign(value["scrollbar_size"], s.scrollbarSize);
3132
assign(value["theme"], s.theme);
3233
assign(value["theme_color"], s.themeColor);
3334
assign(value["button_x"], s.buttonPos.x);
@@ -51,6 +52,7 @@ struct matjson::Serialize<Settings> {
5152
{ "advanced_settings", settings.advancedSettings },
5253
{ "show_memory_viewer", settings.showMemoryViewer },
5354
{ "show_mod_graph", settings.showModGraph },
55+
{ "scrollbar_size", settings.scrollbarSize },
5456
{ "theme", settings.theme },
5557
{ "theme_color", settings.themeColor },
5658
{ "button_x", settings.buttonPos.x },

src/DevTools.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ struct Settings {
2929
bool advancedSettings = false;
3030
bool showMemoryViewer = false;
3131
bool showModGraph = false;
32+
float scrollbarSize = GEODE_DESKTOP(14.f) GEODE_MOBILE(60.f);
3233
std::string theme = DARK_THEME;
3334
ccColor4B themeColor = {2, 119, 189, 255};
3435
CCPoint buttonPos = {50, 50};

src/pages/Settings.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ void DevTools::drawSettings() {
8686

8787
ImGui::Separator();
8888

89-
ImGui::DragFloat("Font Size", &ImGui::GetIO().FontGlobalScale, 0.01f, 1.0f, 3.0f);
89+
ImGui::DragFloat("Font Size", &ImGui::GetIO().FontGlobalScale, 1.f, 1.0f, 3.0f);
90+
if (ImGui::DragFloat("Scrollbar Size", &m_settings.scrollbarSize, 1.f, 1.0f, 100.0f)) {
91+
ImGui::GetStyle().ScrollbarSize = m_settings.scrollbarSize;
92+
}
9093

9194
#ifdef GEODE_IS_DESKTOP
9295

0 commit comments

Comments
 (0)