GUI: new sample map UI, part 2

next commit will introduce keyboard input
This commit is contained in:
tildearrow 2023-04-11 19:41:20 -05:00
parent f90ca2410f
commit 7af514a658
4 changed files with 69 additions and 9 deletions

View file

@ -2905,7 +2905,7 @@ int FurnaceGUI::processEvent(SDL_Event* ev) {
}
#endif
if (ev->type==SDL_KEYDOWN) {
if (!ev->key.repeat && latchTarget==0 && !wantCaptureKeyboard && (ev->key.keysym.mod&(~(KMOD_NUM|KMOD_CAPS|KMOD_SCROLL)))==0) {
if (!ev->key.repeat && latchTarget==0 && !wantCaptureKeyboard && !sampleMapWaitingInput && (ev->key.keysym.mod&(~(KMOD_NUM|KMOD_CAPS|KMOD_SCROLL)))==0) {
if (settings.notePreviewBehavior==0) return 1;
switch (curWindow) {
case GUI_WINDOW_SAMPLE_EDIT:
@ -5561,6 +5561,8 @@ bool FurnaceGUI::loop() {
}
}
}
sampleMapWaitingInput=(curWindow==GUI_WINDOW_INS_EDIT && sampleMapFocused);
curWindowThreadSafe=curWindow;