mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-24 13:35:11 +00:00
GUI: prepare to add a "lock layout" option
This commit is contained in:
parent
b90a26a33d
commit
fa234afc9d
2 changed files with 44 additions and 2 deletions
|
@ -24,6 +24,7 @@
|
||||||
#include "../ta-log.h"
|
#include "../ta-log.h"
|
||||||
#include "../fileutils.h"
|
#include "../fileutils.h"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
#include "imgui_internal.h"
|
||||||
#include "imgui_impl_sdl.h"
|
#include "imgui_impl_sdl.h"
|
||||||
#include "imgui_impl_sdlrenderer.h"
|
#include "imgui_impl_sdlrenderer.h"
|
||||||
#include "ImGuiFileDialog.h"
|
#include "ImGuiFileDialog.h"
|
||||||
|
@ -2352,6 +2353,9 @@ bool FurnaceGUI::loop() {
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
if (ImGui::BeginMenu("settings")) {
|
if (ImGui::BeginMenu("settings")) {
|
||||||
|
if (ImGui::MenuItem("lock layout",NULL,lockLayout)) {
|
||||||
|
lockLayout=!lockLayout;
|
||||||
|
}
|
||||||
if (ImGui::MenuItem("visualizer",NULL,fancyPattern)) {
|
if (ImGui::MenuItem("visualizer",NULL,fancyPattern)) {
|
||||||
fancyPattern=!fancyPattern;
|
fancyPattern=!fancyPattern;
|
||||||
e->enableCommandStream(fancyPattern);
|
e->enableCommandStream(fancyPattern);
|
||||||
|
@ -2469,7 +2473,7 @@ bool FurnaceGUI::loop() {
|
||||||
}
|
}
|
||||||
ImGui::EndMainMenuBar();
|
ImGui::EndMainMenuBar();
|
||||||
|
|
||||||
ImGui::DockSpaceOverViewport();
|
ImGui::DockSpaceOverViewport(NULL,lockLayout?(ImGuiDockNodeFlags_NoResize|ImGuiDockNodeFlags_NoCloseButton|ImGuiDockNodeFlags_NoDocking|ImGuiDockNodeFlags_NoDockingSplitMe|ImGuiDockNodeFlags_NoDockingSplitOther):0);
|
||||||
|
|
||||||
drawPattern();
|
drawPattern();
|
||||||
drawEditControls();
|
drawEditControls();
|
||||||
|
@ -2866,6 +2870,7 @@ bool FurnaceGUI::init() {
|
||||||
|
|
||||||
tempoView=e->getConfBool("tempoView",true);
|
tempoView=e->getConfBool("tempoView",true);
|
||||||
waveHex=e->getConfBool("waveHex",false);
|
waveHex=e->getConfBool("waveHex",false);
|
||||||
|
lockLayout=e->getConfBool("lockLayout",false);
|
||||||
|
|
||||||
syncSettings();
|
syncSettings();
|
||||||
|
|
||||||
|
@ -3028,6 +3033,7 @@ bool FurnaceGUI::finish() {
|
||||||
|
|
||||||
e->setConf("tempoView",tempoView);
|
e->setConf("tempoView",tempoView);
|
||||||
e->setConf("waveHex",waveHex);
|
e->setConf("waveHex",waveHex);
|
||||||
|
e->setConf("lockLayout",lockLayout);
|
||||||
|
|
||||||
for (int i=0; i<DIV_MAX_CHANS; i++) {
|
for (int i=0; i<DIV_MAX_CHANS; i++) {
|
||||||
delete oldPat[i];
|
delete oldPat[i];
|
||||||
|
@ -3117,6 +3123,31 @@ FurnaceGUI::FurnaceGUI():
|
||||||
notesOpen(false),
|
notesOpen(false),
|
||||||
channelsOpen(false),
|
channelsOpen(false),
|
||||||
regViewOpen(false),
|
regViewOpen(false),
|
||||||
|
/*
|
||||||
|
editControlsDocked(false),
|
||||||
|
ordersDocked(false),
|
||||||
|
insListDocked(false),
|
||||||
|
songInfoDocked(false),
|
||||||
|
patternDocked(false),
|
||||||
|
insEditDocked(false),
|
||||||
|
waveListDocked(false),
|
||||||
|
waveEditDocked(false),
|
||||||
|
sampleListDocked(false),
|
||||||
|
sampleEditDocked(false),
|
||||||
|
aboutDocked(false),
|
||||||
|
settingsDocked(false),
|
||||||
|
mixerDocked(false),
|
||||||
|
debugDocked(false),
|
||||||
|
inspectorDocked(false),
|
||||||
|
oscDocked(false),
|
||||||
|
volMeterDocked(false),
|
||||||
|
statsDocked(false),
|
||||||
|
compatFlagsDocked(false),
|
||||||
|
pianoDocked(false),
|
||||||
|
notesDocked(false),
|
||||||
|
channelsDocked(false),
|
||||||
|
regViewDocked(false),
|
||||||
|
*/
|
||||||
selecting(false),
|
selecting(false),
|
||||||
curNibble(false),
|
curNibble(false),
|
||||||
orderNibble(false),
|
orderNibble(false),
|
||||||
|
@ -3129,6 +3160,8 @@ FurnaceGUI::FurnaceGUI():
|
||||||
wantPatName(false),
|
wantPatName(false),
|
||||||
firstFrame(true),
|
firstFrame(true),
|
||||||
tempoView(true),
|
tempoView(true),
|
||||||
|
waveHex(false),
|
||||||
|
lockLayout(false),
|
||||||
curWindow(GUI_WINDOW_NOTHING),
|
curWindow(GUI_WINDOW_NOTHING),
|
||||||
nextWindow(GUI_WINDOW_NOTHING),
|
nextWindow(GUI_WINDOW_NOTHING),
|
||||||
nextDesc(NULL),
|
nextDesc(NULL),
|
||||||
|
|
|
@ -798,13 +798,22 @@ class FurnaceGUI {
|
||||||
int curIns, curWave, curSample, curOctave, oldRow, oldOrder, oldOrder1, editStep, exportLoops, soloChan, soloTimeout, orderEditMode, orderCursor;
|
int curIns, curWave, curSample, curOctave, oldRow, oldOrder, oldOrder1, editStep, exportLoops, soloChan, soloTimeout, orderEditMode, orderCursor;
|
||||||
int loopOrder, loopRow, loopEnd, isClipping, extraChannelButtons, patNameTarget, newSongCategory;
|
int loopOrder, loopRow, loopEnd, isClipping, extraChannelButtons, patNameTarget, newSongCategory;
|
||||||
int wheelX, wheelY;
|
int wheelX, wheelY;
|
||||||
|
|
||||||
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, inspectorOpen, oscOpen, volMeterOpen, statsOpen, compatFlagsOpen;
|
bool mixerOpen, debugOpen, inspectorOpen, oscOpen, volMeterOpen, statsOpen, compatFlagsOpen;
|
||||||
bool pianoOpen, notesOpen, channelsOpen, regViewOpen;
|
bool pianoOpen, notesOpen, channelsOpen, regViewOpen;
|
||||||
|
|
||||||
|
/* there ought to be a better way...
|
||||||
|
bool editControlsDocked, ordersDocked, insListDocked, songInfoDocked, patternDocked, insEditDocked;
|
||||||
|
bool waveListDocked, waveEditDocked, sampleListDocked, sampleEditDocked, aboutDocked, settingsDocked;
|
||||||
|
bool mixerDocked, debugDocked, inspectorDocked, oscDocked, volMeterDocked, statsDocked, compatFlagsDocked;
|
||||||
|
bool pianoDocked, notesDocked, channelsDocked, regViewDocked;
|
||||||
|
*/
|
||||||
|
|
||||||
SelectionPoint selStart, selEnd, cursor;
|
SelectionPoint selStart, selEnd, cursor;
|
||||||
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
|
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
|
||||||
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame, tempoView, waveHex;
|
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame, tempoView, waveHex, lockLayout;
|
||||||
FurnaceGUIWindows curWindow, nextWindow;
|
FurnaceGUIWindows curWindow, nextWindow;
|
||||||
float peak[2];
|
float peak[2];
|
||||||
float patChanX[DIV_MAX_CHANS+1];
|
float patChanX[DIV_MAX_CHANS+1];
|
||||||
|
|
Loading…
Reference in a new issue