GUI: add options for rounded UI elements
This commit is contained in:
parent
b83b46aa2c
commit
a68dbed760
|
|
@ -1976,6 +1976,12 @@ void FurnaceGUI::drawDebug() {
|
||||||
}
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
if (ImGui::TreeNode("User Interface")) {
|
||||||
|
if (ImGui::Button("Inspect")) {
|
||||||
|
inspectorOpen=!inspectorOpen;
|
||||||
|
}
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
if (ImGui::TreeNode("Settings")) {
|
if (ImGui::TreeNode("Settings")) {
|
||||||
if (ImGui::Button("Sync")) syncSettings();
|
if (ImGui::Button("Sync")) syncSettings();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
@ -6140,7 +6146,7 @@ bool FurnaceGUI::loop() {
|
||||||
drawChannels();
|
drawChannels();
|
||||||
drawRegView();
|
drawRegView();
|
||||||
|
|
||||||
//ImGui::ShowMetricsWindow();
|
if (inspectorOpen) ImGui::ShowMetricsWindow(&inspectorOpen);
|
||||||
|
|
||||||
if (firstFrame) {
|
if (firstFrame) {
|
||||||
firstFrame=false;
|
firstFrame=false;
|
||||||
|
|
@ -6669,9 +6675,12 @@ void FurnaceGUI::applyUISettings() {
|
||||||
sty.Colors[ImGuiCol_PlotHistogram]=uiColors[GUI_COLOR_MACRO_OTHER];
|
sty.Colors[ImGuiCol_PlotHistogram]=uiColors[GUI_COLOR_MACRO_OTHER];
|
||||||
sty.Colors[ImGuiCol_PlotHistogramHovered]=uiColors[GUI_COLOR_MACRO_OTHER];
|
sty.Colors[ImGuiCol_PlotHistogramHovered]=uiColors[GUI_COLOR_MACRO_OTHER];
|
||||||
|
|
||||||
/*sty.WindowRounding=8.0f;
|
if (settings.roundedWindows) sty.WindowRounding=8.0f;
|
||||||
sty.FrameRounding=6.0f;
|
if (settings.roundedButtons) {
|
||||||
sty.PopupRounding=8.0f;*/
|
sty.FrameRounding=6.0f;
|
||||||
|
sty.GrabRounding=6.0f;
|
||||||
|
}
|
||||||
|
if (settings.roundedMenus) sty.PopupRounding=8.0f;
|
||||||
|
|
||||||
sty.ScaleAllSizes(dpiScale);
|
sty.ScaleAllSizes(dpiScale);
|
||||||
|
|
||||||
|
|
@ -7072,6 +7081,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
settingsOpen(false),
|
settingsOpen(false),
|
||||||
mixerOpen(false),
|
mixerOpen(false),
|
||||||
debugOpen(false),
|
debugOpen(false),
|
||||||
|
inspectorOpen(false),
|
||||||
oscOpen(true),
|
oscOpen(true),
|
||||||
volMeterOpen(true),
|
volMeterOpen(true),
|
||||||
statsOpen(false),
|
statsOpen(false),
|
||||||
|
|
|
||||||
|
|
@ -567,6 +567,9 @@ class FurnaceGUI {
|
||||||
int unifiedDataView;
|
int unifiedDataView;
|
||||||
int sysFileDialog;
|
int sysFileDialog;
|
||||||
// end
|
// end
|
||||||
|
int roundedWindows;
|
||||||
|
int roundedButtons;
|
||||||
|
int roundedMenus;
|
||||||
unsigned int maxUndoSteps;
|
unsigned int maxUndoSteps;
|
||||||
String mainFontPath;
|
String mainFontPath;
|
||||||
String patFontPath;
|
String patFontPath;
|
||||||
|
|
@ -613,6 +616,9 @@ class FurnaceGUI {
|
||||||
stepOnInsert(0),
|
stepOnInsert(0),
|
||||||
unifiedDataView(0),
|
unifiedDataView(0),
|
||||||
sysFileDialog(1),
|
sysFileDialog(1),
|
||||||
|
roundedWindows(1),
|
||||||
|
roundedButtons(1),
|
||||||
|
roundedMenus(0),
|
||||||
maxUndoSteps(100),
|
maxUndoSteps(100),
|
||||||
mainFontPath(""),
|
mainFontPath(""),
|
||||||
patFontPath(""),
|
patFontPath(""),
|
||||||
|
|
@ -625,7 +631,7 @@ class FurnaceGUI {
|
||||||
int loopOrder, loopRow, loopEnd, isClipping, extraChannelButtons, patNameTarget, newSongCategory;
|
int loopOrder, loopRow, loopEnd, isClipping, extraChannelButtons, patNameTarget, newSongCategory;
|
||||||
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
|
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
|
||||||
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen, settingsOpen;
|
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen, settingsOpen;
|
||||||
bool mixerOpen, debugOpen, oscOpen, volMeterOpen, statsOpen, compatFlagsOpen;
|
bool mixerOpen, debugOpen, inspectorOpen, oscOpen, volMeterOpen, statsOpen, compatFlagsOpen;
|
||||||
bool pianoOpen, notesOpen, channelsOpen, regViewOpen;
|
bool pianoOpen, notesOpen, channelsOpen, regViewOpen;
|
||||||
SelectionPoint selStart, selEnd, cursor;
|
SelectionPoint selStart, selEnd, cursor;
|
||||||
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
|
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
|
||||||
|
|
|
||||||
|
|
@ -449,6 +449,23 @@ void FurnaceGUI::drawSettings() {
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
bool roundedWindowsB=settings.roundedWindows;
|
||||||
|
if (ImGui::Checkbox("Rounded window corners",&roundedWindowsB)) {
|
||||||
|
settings.roundedWindows=roundedWindowsB;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool roundedButtonsB=settings.roundedButtons;
|
||||||
|
if (ImGui::Checkbox("Rounded buttons",&roundedButtonsB)) {
|
||||||
|
settings.roundedButtons=roundedButtonsB;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool roundedMenusB=settings.roundedMenus;
|
||||||
|
if (ImGui::Checkbox("Rounded menu corners",&roundedMenusB)) {
|
||||||
|
settings.roundedMenus=roundedMenusB;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
if (ImGui::TreeNode("Color scheme")) {
|
if (ImGui::TreeNode("Color scheme")) {
|
||||||
if (ImGui::TreeNode("General")) {
|
if (ImGui::TreeNode("General")) {
|
||||||
ImGui::Text("Color scheme type:");
|
ImGui::Text("Color scheme type:");
|
||||||
|
|
@ -904,6 +921,9 @@ void FurnaceGUI::syncSettings() {
|
||||||
settings.stepOnInsert=e->getConfInt("stepOnInsert",0);
|
settings.stepOnInsert=e->getConfInt("stepOnInsert",0);
|
||||||
settings.unifiedDataView=e->getConfInt("unifiedDataView",0);
|
settings.unifiedDataView=e->getConfInt("unifiedDataView",0);
|
||||||
settings.sysFileDialog=e->getConfInt("sysFileDialog",1);
|
settings.sysFileDialog=e->getConfInt("sysFileDialog",1);
|
||||||
|
settings.roundedWindows=e->getConfInt("roundedWindows",1);
|
||||||
|
settings.roundedButtons=e->getConfInt("roundedButtons",1);
|
||||||
|
settings.roundedMenus=e->getConfInt("roundedMenus",0);
|
||||||
|
|
||||||
clampSetting(settings.mainFontSize,2,96);
|
clampSetting(settings.mainFontSize,2,96);
|
||||||
clampSetting(settings.patFontSize,2,96);
|
clampSetting(settings.patFontSize,2,96);
|
||||||
|
|
@ -944,6 +964,9 @@ void FurnaceGUI::syncSettings() {
|
||||||
clampSetting(settings.stepOnInsert,0,1);
|
clampSetting(settings.stepOnInsert,0,1);
|
||||||
clampSetting(settings.unifiedDataView,0,1);
|
clampSetting(settings.unifiedDataView,0,1);
|
||||||
clampSetting(settings.sysFileDialog,0,1);
|
clampSetting(settings.sysFileDialog,0,1);
|
||||||
|
clampSetting(settings.roundedWindows,0,1);
|
||||||
|
clampSetting(settings.roundedButtons,0,1);
|
||||||
|
clampSetting(settings.roundedMenus,0,1);
|
||||||
|
|
||||||
// keybinds
|
// keybinds
|
||||||
LOAD_KEYBIND(GUI_ACTION_OPEN,FURKMOD_CMD|SDLK_o);
|
LOAD_KEYBIND(GUI_ACTION_OPEN,FURKMOD_CMD|SDLK_o);
|
||||||
|
|
@ -1145,6 +1168,9 @@ void FurnaceGUI::commitSettings() {
|
||||||
e->setConf("stepOnInsert",settings.stepOnInsert);
|
e->setConf("stepOnInsert",settings.stepOnInsert);
|
||||||
e->setConf("unifiedDataView",settings.unifiedDataView);
|
e->setConf("unifiedDataView",settings.unifiedDataView);
|
||||||
e->setConf("sysFileDialog",settings.sysFileDialog);
|
e->setConf("sysFileDialog",settings.sysFileDialog);
|
||||||
|
e->setConf("roundedWindows",settings.roundedWindows);
|
||||||
|
e->setConf("roundedButtons",settings.roundedButtons);
|
||||||
|
e->setConf("roundedMenus",settings.roundedMenus);
|
||||||
|
|
||||||
PUT_UI_COLOR(GUI_COLOR_BACKGROUND);
|
PUT_UI_COLOR(GUI_COLOR_BACKGROUND);
|
||||||
PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND);
|
PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue