-
Notifications
You must be signed in to change notification settings - Fork 137
feat(UI): add auto-hide featurelist option #1793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -319,6 +319,7 @@ void SettingsTabRenderer::RenderInterfaceTab() | |
| if (BeginTabItemWithFont("Interface", Menu::FontRole::Heading)) { | ||
| MenuFonts::TabBarPaddingGuard tabPaddingGuard(Menu::FontRole::Subheading); | ||
| if (ImGui::BeginTabBar("##tabs", ImGuiTabBarFlags_None)) { | ||
| RenderBehaviorTab(); | ||
| RenderThemesTab(); | ||
| RenderFontsTab(); | ||
| RenderStylingTab(); | ||
|
|
@@ -329,6 +330,71 @@ void SettingsTabRenderer::RenderInterfaceTab() | |
| } | ||
| } | ||
|
|
||
| void SettingsTabRenderer::RenderBehaviorTab() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need a new tab? this essentially replaces 99% of the styling tab. atp just combine them or use the old styling tab
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presumably alandtse assumes this will be used for other things in the future
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It moves some of the existing options in that are more behavior and keeps styling to styling. |
||
| { | ||
| if (BeginTabItemWithFont("Behavior", Menu::FontRole::Heading)) { | ||
| auto& themeSettings = globals::menu->GetSettings().Theme; | ||
|
|
||
| SeparatorTextWithFont("UI Behavior", Menu::FontRole::Subheading); | ||
|
|
||
| ImGui::Checkbox("Show Icon Buttons in Header", &themeSettings.ShowActionIcons); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
|
alandtse marked this conversation as resolved.
|
||
| ImGui::Text( | ||
| "When enabled: Shows action buttons (Save, Load, Clear Cache) as icons in the header\n" | ||
| "When disabled: Shows as text buttons below the header"); | ||
| } | ||
|
|
||
| if (themeSettings.ShowActionIcons) { | ||
| ImGui::Indent(); | ||
| if (ImGui::Checkbox("Use Monochrome Icons", &themeSettings.UseMonochromeIcons)) { | ||
| globals::menu->pendingIconReload = true; | ||
| } | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Uses white monochrome icons that adapt to your theme's text color"); | ||
| } | ||
| ImGui::SameLine(); | ||
| if (ImGui::Checkbox("Use Monochrome CS Logo", &themeSettings.UseMonochromeLogo)) { | ||
| globals::menu->pendingIconReload = true; | ||
| } | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Uses monochrome version of the Community Shaders logo"); | ||
| } | ||
| ImGui::Unindent(); | ||
| } | ||
|
|
||
| ImGui::Checkbox("Show Footer", &themeSettings.ShowFooter); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Shows the footer with game version, swap chain, and GPU information at the bottom of the window"); | ||
| } | ||
|
|
||
| ImGui::Checkbox("Center Header Title", &themeSettings.CenterHeader); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Centers the Community Shaders title and logo in the header title bar"); | ||
| } | ||
|
|
||
| ImGui::Checkbox("Auto-hide Feature List", &globals::menu->GetSettings().AutoHideFeatureList); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Automatically hides the left feature list panel. Move cursor to the left edge to show it."); | ||
| } | ||
|
|
||
| ImGui::SliderFloat("Tooltip Hover Delay", &themeSettings.TooltipHoverDelay, 0.0f, 2.0f, "%.2f s", ImGuiSliderFlags_AlwaysClamp); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::TextUnformatted("Time in seconds to wait before a tooltip appears when hovering over an item."); | ||
| } | ||
|
|
||
| SeparatorTextWithFont("Visual Effects", Menu::FontRole::Subheading); | ||
|
|
||
| if (ImGui::Checkbox("Background Blur", &themeSettings.BackgroundBlurEnabled)) { | ||
| BackgroundBlur::SetEnabled(themeSettings.BackgroundBlurEnabled); | ||
| } | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Applies a blur effect to the background behind the menu window."); | ||
| } | ||
|
|
||
| ImGui::EndTabItem(); | ||
| } | ||
| } | ||
|
|
||
| void SettingsTabRenderer::RenderThemesTab() | ||
| { | ||
| if (BeginTabItemWithFont("Themes", Menu::FontRole::Heading)) { | ||
|
|
@@ -851,56 +917,6 @@ void SettingsTabRenderer::RenderStylingTab() | |
| auto& themeSettings = globals::menu->GetSettings().Theme; | ||
| auto& style = themeSettings.Style; | ||
|
|
||
| SeparatorTextWithFont("Styling Options", Menu::FontRole::Subheading); | ||
|
|
||
| ImGui::Checkbox("Show Icon Buttons in Header", &themeSettings.ShowActionIcons); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text( | ||
| "When enabled: Shows action buttons (Save, Load, Clear Cache) as icons in the header\n" | ||
| "When disabled: Shows as text buttons below the header"); | ||
| } | ||
|
|
||
| if (themeSettings.ShowActionIcons) { | ||
| ImGui::Indent(); | ||
| if (ImGui::Checkbox("Use Monochrome Icons", &themeSettings.UseMonochromeIcons)) { | ||
| // Defer icon reload to next frame to avoid rendering with released textures | ||
| globals::menu->pendingIconReload = true; | ||
| } | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Uses white monochrome icons that adapt to your theme's text color"); | ||
| } | ||
| ImGui::SameLine(); | ||
| if (ImGui::Checkbox("Use Monochrome CS Logo", &themeSettings.UseMonochromeLogo)) { | ||
| globals::menu->pendingIconReload = true; | ||
| } | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Uses monochrome version of the Community Shaders logo"); | ||
| } | ||
| ImGui::Unindent(); | ||
| } | ||
|
|
||
| ImGui::Checkbox("Show Footer", &themeSettings.ShowFooter); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Shows the footer with game version, swap chain, and GPU information at the bottom of the window"); | ||
| } | ||
|
|
||
| ImGui::Checkbox("Center Header Title", &themeSettings.CenterHeader); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Centers the Community Shaders title and logo in the header title bar"); | ||
| } | ||
|
|
||
| ImGui::SliderFloat("Tooltip Hover Delay", &themeSettings.TooltipHoverDelay, 0.0f, 2.0f, "%.2f s", ImGuiSliderFlags_AlwaysClamp); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::TextUnformatted("Time in seconds to wait before a tooltip appears when hovering over an item."); | ||
| } | ||
|
|
||
| if (ImGui::Checkbox("Background Blur", &themeSettings.BackgroundBlurEnabled)) { | ||
| BackgroundBlur::SetEnabled(themeSettings.BackgroundBlurEnabled); | ||
| } | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::Text("Applies a blur effect to the background behind the menu window."); | ||
| } | ||
|
|
||
| SeparatorTextWithFont("Main", Menu::FontRole::Subheading); | ||
| if (ImGui::SliderFloat("Global Scale", &themeSettings.GlobalScale, -1.f, 1.f, "%.2f")) { | ||
| float trueScale = exp2(themeSettings.GlobalScale); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.