Skip to content

Commit

Permalink
Add accessibility tab
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Jun 19, 2021
1 parent 170d9df commit a1821ec
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions source/creator/windows/settings.d
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ protected:
igBeginChild("SettingsWindowChild", ImVec2(512, 512));
if (igBeginTabBar("SettingsWindowTabs", ImGuiTabBarFlags.NoCloseWithMiddleMouseButton)) {

ImVec2 avail;
igGetContentRegionAvail(&avail);

if(igBeginTabItem("General", &generalTabOpen, ImGuiTabItemFlagsI.NoCloseButton | ImGuiTabItemFlags.NoCloseWithMiddleMouseButton)) {
igBeginChild("#GeneralTabItems", ImVec2(0, avail.y-24));
igBeginChild("#GeneralTabItems", ImVec2(0, -26));
igText("Look and Feel");
igSeparator();
if(igBeginCombo("Color Theme", incGetDarkMode() ? "Dark" : "Light")) {
Expand All @@ -45,12 +42,6 @@ protected:
igEndCombo();
}

useOpenDyslexic = incSettingsGet!bool("UseOpenDyslexic");
if(igCheckbox("Use OpenDyslexic", &useOpenDyslexic)) {
incUseOpenDyslexic(useOpenDyslexic);
}



igSpacing();
igSpacing();
Expand All @@ -68,9 +59,22 @@ protected:
igEndTabItem();
}

if(igBeginTabItem("Accessibility", &generalTabOpen, ImGuiTabItemFlagsI.NoCloseButton | ImGuiTabItemFlags.NoCloseWithMiddleMouseButton)) {

igBeginChild("#GeneralTabItems", ImVec2(0, -26));

useOpenDyslexic = incSettingsGet!bool("UseOpenDyslexic");
if(igCheckbox("Use Dyslexia optimized font", &useOpenDyslexic)) {
incUseOpenDyslexic(useOpenDyslexic);
}

igEndChild();
igEndTabItem();
}

if(igBeginTabItem("Other", &otherTabOpen, ImGuiTabItemFlagsI.NoCloseButton | ImGuiTabItemFlags.NoCloseWithMiddleMouseButton)) {

igBeginChild("#OtherTabItems", ImVec2(0, avail.y-24));
igBeginChild("#OtherTabItems", ImVec2(0, -26));

igEndChild();
igEndTabItem();
Expand Down

0 comments on commit a1821ec

Please sign in to comment.