Add tooltips in GUI, enum-ize piano mode/Special notes
This commit is contained in:
parent
e4ef9f46f7
commit
c561ceceaf
|
@ -47,6 +47,9 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_PLUS "##InsAdd")) {
|
||||
if (!settings.unifiedDataView) doAction(GUI_ACTION_INS_LIST_ADD);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Add");
|
||||
}
|
||||
if (settings.unifiedDataView) {
|
||||
if (ImGui::BeginPopupContextItem("UnifiedAdd",ImGuiMouseButton_Left)) {
|
||||
if (ImGui::MenuItem("instrument")) {
|
||||
|
@ -70,6 +73,9 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_FILES_O "##InsClone")) {
|
||||
if (!settings.unifiedDataView) doAction(GUI_ACTION_INS_LIST_DUPLICATE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Duplicate");
|
||||
}
|
||||
if (settings.unifiedDataView) {
|
||||
if (ImGui::BeginPopupContextItem("UnifiedClone",ImGuiMouseButton_Left)) {
|
||||
if (ImGui::MenuItem("instrument")) {
|
||||
|
@ -88,6 +94,9 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_FOLDER_OPEN "##InsLoad")) {
|
||||
if (!settings.unifiedDataView) doAction(GUI_ACTION_INS_LIST_OPEN);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Load");
|
||||
}
|
||||
if (settings.unifiedDataView) {
|
||||
if (ImGui::BeginPopupContextItem("UnifiedLoad",ImGuiMouseButton_Left)) {
|
||||
if (ImGui::MenuItem("instrument")) {
|
||||
|
@ -127,6 +136,9 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_FLOPPY_O "##InsSave")) {
|
||||
if (!settings.unifiedDataView) doAction(GUI_ACTION_INS_LIST_SAVE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Save");
|
||||
}
|
||||
if (settings.unifiedDataView) {
|
||||
if (ImGui::BeginPopupContextItem("UnifiedSave",ImGuiMouseButton_Left)) {
|
||||
if (ImGui::MenuItem("instrument")) {
|
||||
|
@ -166,15 +178,24 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
if (ImGui::ArrowButton("InsUp",ImGuiDir_Up)) {
|
||||
doAction(GUI_ACTION_INS_LIST_MOVE_UP);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move up");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::ArrowButton("InsDown",ImGuiDir_Down)) {
|
||||
doAction(GUI_ACTION_INS_LIST_MOVE_DOWN);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move down");
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##InsDelete")) {
|
||||
if (!settings.unifiedDataView) doAction(GUI_ACTION_INS_LIST_DELETE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
if (settings.unifiedDataView) {
|
||||
if (ImGui::BeginPopupContextItem("UnifiedDelete",ImGuiMouseButton_Left)) {
|
||||
if (ImGui::MenuItem("instrument")) {
|
||||
|
@ -521,14 +542,23 @@ void FurnaceGUI::drawWaveList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_PLUS "##WaveAdd")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_ADD);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Add");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_FILES_O "##WaveClone")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_DUPLICATE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Duplicate");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_FOLDER_OPEN "##WaveLoad")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_OPEN);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Load");
|
||||
}
|
||||
if (ImGui::BeginPopupContextItem("WaveOpenOpt")) {
|
||||
if (ImGui::MenuItem("replace...")) {
|
||||
doAction((curWave>=0 && curWave<(int)e->song.wave.size())?GUI_ACTION_WAVE_LIST_OPEN_REPLACE:GUI_ACTION_WAVE_LIST_OPEN);
|
||||
|
@ -539,6 +569,9 @@ void FurnaceGUI::drawWaveList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_FLOPPY_O "##WaveSave")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_SAVE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Save");
|
||||
}
|
||||
if (!settings.unifiedDataView) {
|
||||
if (ImGui::BeginPopupContextItem("WaveSaveFormats",ImGuiMouseButton_Right)) {
|
||||
if (ImGui::MenuItem("save as .dmw...")) {
|
||||
|
@ -554,14 +587,23 @@ void FurnaceGUI::drawWaveList(bool asChild) {
|
|||
if (ImGui::ArrowButton("WaveUp",ImGuiDir_Up)) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_MOVE_UP);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move up");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::ArrowButton("WaveDown",ImGuiDir_Down)) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_MOVE_DOWN);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move down");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##WaveDelete")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_DELETE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::BeginTable("WaveListScroll",1,ImGuiTableFlags_ScrollY)) {
|
||||
actualWaveList();
|
||||
|
@ -598,14 +640,23 @@ void FurnaceGUI::drawSampleList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_FILE "##SampleAdd")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_ADD);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Add");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_FILES_O "##SampleClone")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_DUPLICATE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Duplicate");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_FOLDER_OPEN "##SampleLoad")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_OPEN);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Load");
|
||||
}
|
||||
if (ImGui::BeginPopupContextItem("SampleOpenOpt")) {
|
||||
if (ImGui::MenuItem("replace...")) {
|
||||
doAction((curSample>=0 && curSample<(int)e->song.sample.size())?GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE:GUI_ACTION_SAMPLE_LIST_OPEN);
|
||||
|
@ -623,26 +674,44 @@ void FurnaceGUI::drawSampleList(bool asChild) {
|
|||
if (ImGui::Button(ICON_FA_FLOPPY_O "##SampleSave")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_SAVE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Save");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::ArrowButton("SampleUp",ImGuiDir_Up)) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_MOVE_UP);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move up");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::ArrowButton("SampleDown",ImGuiDir_Down)) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_MOVE_DOWN);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move down");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##SampleDelete")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_DELETE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSampleL")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_PREVIEW);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Preview");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_VOLUME_OFF "##StopSampleL")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_STOP_PREVIEW);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Stop preview");
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::BeginTable("SampleListScroll",1,ImGuiTableFlags_ScrollY)) {
|
||||
actualSampleList();
|
||||
|
|
|
@ -188,16 +188,25 @@ void FurnaceGUI::drawMobileControls() {
|
|||
if (ImGui::Button(ICON_FA_PLAY "##Play",buttonSize)) {
|
||||
play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Play");
|
||||
}
|
||||
popToggleColors();
|
||||
if (portrait) ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_STOP "##Stop",buttonSize)) {
|
||||
stop();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Stop");
|
||||
}
|
||||
if (portrait) ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne",buttonSize)) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step 1 row");
|
||||
}
|
||||
|
||||
bool repeatPattern=e->getRepeatPattern();
|
||||
pushToggleColors(repeatPattern);
|
||||
|
@ -205,6 +214,9 @@ void FurnaceGUI::drawMobileControls() {
|
|||
if (ImGui::Button(ICON_FA_REPEAT "##RepeatPattern",buttonSize)) {
|
||||
e->setRepeatPattern(!repeatPattern);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Repeat pattern");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
pushToggleColors(edit);
|
||||
|
@ -212,6 +224,9 @@ void FurnaceGUI::drawMobileControls() {
|
|||
if (ImGui::Button(ICON_FA_CIRCLE "##Edit",buttonSize)) {
|
||||
edit=!edit;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
bool metro=e->getMetronome();
|
||||
|
@ -220,6 +235,9 @@ void FurnaceGUI::drawMobileControls() {
|
|||
if (ImGui::Button(ICON_FA_BELL_O "##Metronome",buttonSize)) {
|
||||
e->setMetronome(!metro);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Metronome");
|
||||
}
|
||||
popToggleColors();
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
|
||||
|
@ -445,11 +463,17 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_PLAY "##Play")) {
|
||||
play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Play");
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_STOP "##Stop")) {
|
||||
stop();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Stop");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Edit",&edit);
|
||||
ImGui::SameLine();
|
||||
|
@ -473,6 +497,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step 1 row");
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(noteInputPoly);
|
||||
|
@ -480,6 +507,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
noteInputPoly=!noteInputPoly;
|
||||
e->setAutoNotePoly(noteInputPoly);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Polyphony");
|
||||
}
|
||||
popToggleColors();
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
|
||||
|
@ -490,17 +520,26 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_STOP "##Stop")) {
|
||||
stop();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Stop");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(e->isPlaying());
|
||||
if (ImGui::Button(ICON_FA_PLAY "##Play")) {
|
||||
play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Play");
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step 1 row");
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
bool repeatPattern=e->getRepeatPattern();
|
||||
|
@ -508,6 +547,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_REPEAT "##RepeatPattern")) {
|
||||
e->setRepeatPattern(!repeatPattern);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Repeat pattern");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
@ -515,6 +557,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_CIRCLE "##Edit")) {
|
||||
edit=!edit;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
@ -523,6 +568,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_BELL_O "##Metronome")) {
|
||||
e->setMetronome(!metro);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Metronome");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
@ -565,6 +613,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
noteInputPoly=!noteInputPoly;
|
||||
e->setAutoNotePoly(noteInputPoly);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Polyphony");
|
||||
}
|
||||
popToggleColors();
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
|
||||
|
@ -577,26 +628,41 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_PLAY "##Play",buttonSize)) {
|
||||
play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Play");
|
||||
}
|
||||
popToggleColors();
|
||||
if (ImGui::Button(ICON_FA_STOP "##Stop",buttonSize)) {
|
||||
stop();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Stop");
|
||||
}
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne",buttonSize)) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step 1 row");
|
||||
}
|
||||
|
||||
bool repeatPattern=e->getRepeatPattern();
|
||||
pushToggleColors(repeatPattern);
|
||||
if (ImGui::Button(ICON_FA_REPEAT "##RepeatPattern",buttonSize)) {
|
||||
e->setRepeatPattern(!repeatPattern);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Repeat pattern");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
pushToggleColors(edit);
|
||||
if (ImGui::Button(ICON_FA_CIRCLE "##Edit",buttonSize)) {
|
||||
edit=!edit;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
bool metro=e->getMetronome();
|
||||
|
@ -604,9 +670,15 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_BELL_O "##Metronome",buttonSize)) {
|
||||
e->setMetronome(!metro);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Metronome");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
ImGui::Text("Oct.");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Octave");
|
||||
}
|
||||
float avail=ImGui::GetContentRegionAvail().x;
|
||||
ImGui::SetNextItemWidth(avail);
|
||||
if (ImGui::InputInt("##Octave",&curOctave,0,0)) {
|
||||
|
@ -631,15 +703,24 @@ void FurnaceGUI::drawEditControls() {
|
|||
}
|
||||
|
||||
ImGui::Text("Foll.");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Follow");
|
||||
}
|
||||
pushToggleColors(followOrders);
|
||||
if (ImGui::Button("Ord##FollowOrders",buttonSize)) { handleUnimportant
|
||||
followOrders=!followOrders;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Orders");
|
||||
}
|
||||
popToggleColors();
|
||||
pushToggleColors(followPattern);
|
||||
if (ImGui::Button("Pat##FollowPattern",buttonSize)) { handleUnimportant
|
||||
followPattern=!followPattern;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Pattern");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
pushToggleColors(noteInputPoly);
|
||||
|
@ -647,6 +728,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
noteInputPoly=!noteInputPoly;
|
||||
e->setAutoNotePoly(noteInputPoly);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Polyphony");
|
||||
}
|
||||
popToggleColors();
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
|
||||
|
@ -659,33 +743,51 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_STOP "##Stop")) {
|
||||
stop();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Stop");
|
||||
}
|
||||
popToggleColors();
|
||||
} else {
|
||||
if (ImGui::Button(ICON_FA_PLAY "##Play")) {
|
||||
play(oldRow);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Play");
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PlayAgain")) {
|
||||
e->setRepeatPattern(false);
|
||||
play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Play from the beginning of this pattern");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_STEP_FORWARD "##PlayRepeat")) {
|
||||
e->setRepeatPattern(true);
|
||||
play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Repeat from the beginning of this pattern");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step 1 row");
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(edit);
|
||||
if (ImGui::Button(ICON_FA_CIRCLE "##Edit")) {
|
||||
edit=!edit;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
bool metro=e->getMetronome();
|
||||
|
@ -694,6 +796,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_BELL_O "##Metronome")) {
|
||||
e->setMetronome(!metro);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Metronome");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
@ -702,6 +807,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_REPEAT "##RepeatPattern")) {
|
||||
e->setRepeatPattern(!repeatPattern);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Repeat pattern");
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
@ -710,6 +818,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
noteInputPoly=!noteInputPoly;
|
||||
e->setAutoNotePoly(noteInputPoly);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Polyphony");
|
||||
}
|
||||
popToggleColors();
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
|
||||
|
|
|
@ -1040,13 +1040,13 @@ void FurnaceGUI::noteInput(int num, int key, int vol) {
|
|||
|
||||
prepareUndo(GUI_UNDO_PATTERN_EDIT);
|
||||
|
||||
if (key==100) { // note off
|
||||
if (key==GUI_NOTE_OFF) { // note off
|
||||
pat->data[cursor.y][0]=100;
|
||||
pat->data[cursor.y][1]=0;
|
||||
} else if (key==101) { // note off + env release
|
||||
} else if (key==GUI_NOTE_OFF_RELEASE) { // note off + env release
|
||||
pat->data[cursor.y][0]=101;
|
||||
pat->data[cursor.y][1]=0;
|
||||
} else if (key==102) { // env release only
|
||||
} else if (key==GUI_NOTE_RELEASE) { // env release only
|
||||
pat->data[cursor.y][0]=102;
|
||||
pat->data[cursor.y][1]=0;
|
||||
} else {
|
||||
|
@ -5979,8 +5979,8 @@ FurnaceGUI::FurnaceGUI():
|
|||
pianoOptionsSet(false),
|
||||
pianoOffset(6),
|
||||
pianoOffsetEdit(9),
|
||||
pianoView(2),
|
||||
pianoInputPadMode(2),
|
||||
pianoView(PIANO_LAYOUT_AUTOMATIC),
|
||||
pianoInputPadMode(PIANO_INPUT_PAD_SPLIT_AUTO),
|
||||
#else
|
||||
pianoOctaves(7),
|
||||
pianoOctavesEdit(4),
|
||||
|
@ -5988,8 +5988,8 @@ FurnaceGUI::FurnaceGUI():
|
|||
pianoSharePosition(true),
|
||||
pianoOffset(6),
|
||||
pianoOffsetEdit(6),
|
||||
pianoView(0),
|
||||
pianoInputPadMode(0),
|
||||
pianoView(PIANO_LAYOUT_STANDARD),
|
||||
pianoInputPadMode(PIANO_INPUT_PAD_DISABLE),
|
||||
#endif
|
||||
hasACED(false),
|
||||
waveGenBaseShape(0),
|
||||
|
|
|
@ -653,6 +653,12 @@ enum PasteMode {
|
|||
GUI_PASTE_MODE_INS_BG
|
||||
};
|
||||
|
||||
enum NoteCtrl {
|
||||
GUI_NOTE_OFF=100,
|
||||
GUI_NOTE_OFF_RELEASE=101,
|
||||
GUI_NOTE_RELEASE=102
|
||||
};
|
||||
|
||||
#define FURKMOD_CTRL (1U<<31)
|
||||
#define FURKMOD_SHIFT (1<<29)
|
||||
#define FURKMOD_META (1<<28)
|
||||
|
@ -1677,6 +1683,21 @@ class FurnaceGUI {
|
|||
bool followLog;
|
||||
|
||||
// piano
|
||||
enum PianoLayoutMode {
|
||||
PIANO_LAYOUT_STANDARD = 0,
|
||||
PIANO_LAYOUT_CONTINUOUS,
|
||||
PIANO_LAYOUT_AUTOMATIC,
|
||||
PIANO_LAYOUT_MAX
|
||||
};
|
||||
|
||||
enum PianoInputPadMode {
|
||||
PIANO_INPUT_PAD_DISABLE = 0,
|
||||
PIANO_INPUT_PAD_REPLACE,
|
||||
PIANO_INPUT_PAD_SPLIT_AUTO,
|
||||
PIANO_INPUT_PAD_SPLIT_VISIBLE,
|
||||
PIANO_INPUT_PAD_MAX
|
||||
};
|
||||
|
||||
int pianoOctaves, pianoOctavesEdit;
|
||||
bool pianoOptions, pianoSharePosition, pianoOptionsSet;
|
||||
float pianoKeyHit[180];
|
||||
|
|
|
@ -2166,10 +2166,16 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ImGui::Button(ICON_FA_FOLDER_OPEN "##IELoad")) {
|
||||
doAction(GUI_ACTION_INS_LIST_OPEN_REPLACE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Load");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_FLOPPY_O "##IESave")) {
|
||||
doAction(GUI_ACTION_INS_LIST_SAVE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Save");
|
||||
}
|
||||
if (ImGui::BeginPopupContextItem("InsSaveFormats",ImGuiMouseButton_Right)) {
|
||||
if (ImGui::MenuItem("save in legacy format...")) {
|
||||
doAction(GUI_ACTION_INS_LIST_SAVE_OLD);
|
||||
|
|
|
@ -63,7 +63,7 @@ void FurnaceGUI::drawPiano() {
|
|||
if (ImGui::BeginTable("PianoLayout",((pianoOptions && (!mobileUI || !portrait))?2:1),ImGuiTableFlags_BordersInnerV)) {
|
||||
int& off=(e->isPlaying() || pianoSharePosition)?pianoOffset:pianoOffsetEdit;
|
||||
int& oct=(e->isPlaying() || pianoSharePosition)?pianoOctaves:pianoOctavesEdit;
|
||||
bool view=(pianoView==2)?(!e->isPlaying()):pianoView;
|
||||
bool view=(pianoView==PIANO_LAYOUT_AUTOMATIC)?(!e->isPlaying()):pianoView;
|
||||
if (pianoOptions && (!mobileUI || !portrait)) {
|
||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed);
|
||||
}
|
||||
|
@ -76,48 +76,63 @@ void FurnaceGUI::drawPiano() {
|
|||
ImVec2 optionSize=ImVec2((mobileUI && portrait)?((ImGui::GetContentRegionAvail().x-ImGui::GetStyle().ItemSpacing.x*5.0f)/6.0f):(1.2f*optionSizeY),optionSizeY);
|
||||
if (pianoOptionsSet) {
|
||||
if (ImGui::Button("OFF##PianoNOff",optionSize)) {
|
||||
if (edit) noteInput(0,100);
|
||||
if (edit) noteInput(0,GUI_NOTE_OFF);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Note Off");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("===##PianoNRel",optionSize)) {
|
||||
if (edit) noteInput(0,101);
|
||||
if (edit) noteInput(0,GUI_NOTE_OFF_RELEASE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Note Off + Release");
|
||||
}
|
||||
} else {
|
||||
if (ImGui::Button(ICON_FA_ARROW_LEFT "##PianoLeft",optionSize)) {
|
||||
off--;
|
||||
if (off<0) off=0;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Left scroll");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_RIGHT "##PianoRight",optionSize)) {
|
||||
off++;
|
||||
if ((off+oct)>14) off=15-oct;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Right scroll");
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Button(ICON_FA_ELLIPSIS_V "##PianoOptions",optionSize);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Piano Options");
|
||||
}
|
||||
if (ImGui::BeginPopupContextItem("PianoOptions",ImGuiPopupFlags_MouseButtonLeft)) {
|
||||
ImGui::Text("Key layout:");
|
||||
if (ImGui::RadioButton("Automatic",pianoView==2)) {
|
||||
pianoView=2;
|
||||
if (ImGui::RadioButton("Automatic",pianoView==PIANO_LAYOUT_AUTOMATIC)) {
|
||||
pianoView=PIANO_LAYOUT_AUTOMATIC;
|
||||
}
|
||||
if (ImGui::RadioButton("Standard",pianoView==0)) {
|
||||
pianoView=0;
|
||||
if (ImGui::RadioButton("Standard",pianoView==PIANO_LAYOUT_STANDARD)) {
|
||||
pianoView=PIANO_LAYOUT_STANDARD;
|
||||
}
|
||||
if (ImGui::RadioButton("Continuous",pianoView==1)) {
|
||||
pianoView=1;
|
||||
if (ImGui::RadioButton("Continuous",pianoView==PIANO_LAYOUT_CONTINUOUS)) {
|
||||
pianoView=PIANO_LAYOUT_CONTINUOUS;
|
||||
}
|
||||
ImGui::Text("Value input pad:");
|
||||
if (ImGui::RadioButton("Disabled",pianoInputPadMode==0)) {
|
||||
pianoInputPadMode=0;
|
||||
if (ImGui::RadioButton("Disabled",pianoInputPadMode==PIANO_INPUT_PAD_DISABLE)) {
|
||||
pianoInputPadMode=PIANO_INPUT_PAD_DISABLE;
|
||||
}
|
||||
if (ImGui::RadioButton("Replace piano",pianoInputPadMode==1)) {
|
||||
pianoInputPadMode=1;
|
||||
if (ImGui::RadioButton("Replace piano",pianoInputPadMode==PIANO_INPUT_PAD_REPLACE)) {
|
||||
pianoInputPadMode=PIANO_INPUT_PAD_REPLACE;
|
||||
}
|
||||
if (ImGui::RadioButton("Split (automatic)",pianoInputPadMode==2)) {
|
||||
pianoInputPadMode=2;
|
||||
if (ImGui::RadioButton("Split (automatic)",pianoInputPadMode==PIANO_INPUT_PAD_SPLIT_AUTO)) {
|
||||
pianoInputPadMode=PIANO_INPUT_PAD_SPLIT_AUTO;
|
||||
}
|
||||
if (ImGui::RadioButton("Split (always visible)",pianoInputPadMode==3)) {
|
||||
pianoInputPadMode=3;
|
||||
if (ImGui::RadioButton("Split (always visible)",pianoInputPadMode==PIANO_INPUT_PAD_SPLIT_VISIBLE)) {
|
||||
pianoInputPadMode=PIANO_INPUT_PAD_SPLIT_VISIBLE;
|
||||
}
|
||||
ImGui::Checkbox("Share play/edit offset/range",&pianoSharePosition);
|
||||
ImGui::EndPopup();
|
||||
|
@ -129,28 +144,43 @@ void FurnaceGUI::drawPiano() {
|
|||
|
||||
if (pianoOptionsSet) {
|
||||
if (ImGui::Button("REL##PianoNMRel",optionSize)) {
|
||||
if (edit) noteInput(0,102);
|
||||
if (edit) noteInput(0,GUI_NOTE_RELEASE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Note Release");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##PianoDelP",optionSize)) {
|
||||
doDelete();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Note Delete");
|
||||
}
|
||||
} else {
|
||||
if (ImGui::Button(ICON_FA_MINUS "##PianoOctaveDown",optionSize)) {
|
||||
oct--;
|
||||
if (oct<1) oct=1;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Octave down");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_PLUS "##PianoOctaveUp",optionSize)) {
|
||||
oct++;
|
||||
if (oct>15) oct=15;
|
||||
if ((off+oct)>14) off=15-oct;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Octave up");
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ELLIPSIS_H "##PianoSel",optionSize)) {
|
||||
pianoOptionsSet=!pianoOptionsSet;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(pianoOptionsSet?"Note Off/Release":"Scroll/Resize Piano");
|
||||
}
|
||||
}
|
||||
|
||||
if (mobileUI && portrait) {
|
||||
|
@ -158,7 +188,7 @@ void FurnaceGUI::drawPiano() {
|
|||
}
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
if (pianoInputPadMode==1 && cursor.xFine>0 && curWindow==GUI_WINDOW_PATTERN) {
|
||||
if (pianoInputPadMode==PIANO_INPUT_PAD_REPLACE && cursor.xFine>0 && curWindow==GUI_WINDOW_PATTERN) {
|
||||
ImVec2 buttonSize=ImGui::GetContentRegionAvail();
|
||||
if (ImGui::BeginTable("InputPadP",8,ImGuiTableFlags_SizingFixedSame)) {
|
||||
ImGui::TableNextRow();
|
||||
|
@ -431,7 +461,7 @@ void FurnaceGUI::drawPiano() {
|
|||
ImGui::End();
|
||||
|
||||
// draw input pad if necessary
|
||||
if (curWindow==GUI_WINDOW_PATTERN && ((pianoInputPadMode==2 && cursor.xFine>0) || pianoInputPadMode==3)) {
|
||||
if (curWindow==GUI_WINDOW_PATTERN && ((pianoInputPadMode==PIANO_INPUT_PAD_SPLIT_AUTO && cursor.xFine>0) || pianoInputPadMode==PIANO_INPUT_PAD_SPLIT_VISIBLE)) {
|
||||
if (ImGui::Begin("Input Pad",NULL,ImGuiWindowFlags_NoTitleBar)) {
|
||||
ImGui::BeginDisabled(cursor.xFine==0);
|
||||
if (ImGui::BeginTable("InputPad",3,ImGuiTableFlags_Borders)) {
|
||||
|
@ -480,6 +510,9 @@ void FurnaceGUI::drawPiano() {
|
|||
if (ImGui::Button(ICON_FA_TIMES "##PianoDel",buttonSize)) {
|
||||
doDelete();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
VALUE_DIGIT(0,"0");
|
||||
ImGui::TableNextColumn();
|
||||
|
|
|
@ -118,10 +118,16 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
if (ImGui::Button(ICON_FA_FOLDER_OPEN "##SELoad")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Load");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_FLOPPY_O "##SESave")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_SAVE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Save");
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
|
|
|
@ -50,10 +50,16 @@ void FurnaceGUI::drawSubSongs() {
|
|||
if (ImGui::SmallButton(ICON_FA_ARROW_UP "##SubUp")) {
|
||||
e->moveSubSongUp(i);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move up");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::SmallButton(ICON_FA_ARROW_DOWN "##SubDown")) {
|
||||
e->moveSubSongDown(i);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Move down");
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
ImGui::EndTable();
|
||||
|
@ -79,6 +85,9 @@ void FurnaceGUI::drawSubSongs() {
|
|||
MARK_MODIFIED;
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Add");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_MINUS "##SubSongDel")) {
|
||||
if (e->song.subsong.size()<=1) {
|
||||
|
@ -87,6 +96,9 @@ void FurnaceGUI::drawSubSongs() {
|
|||
showWarning("are you sure you want to remove this subsong?",GUI_WARN_SUBSONG_DEL);
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Remove");
|
||||
}
|
||||
|
||||
ImGui::Text("Name");
|
||||
ImGui::SameLine();
|
||||
|
|
|
@ -241,10 +241,16 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
if (ImGui::Button(ICON_FA_FOLDER_OPEN "##WELoad")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_OPEN_REPLACE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Load");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_FLOPPY_O "##WESave")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_SAVE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Save");
|
||||
}
|
||||
if (ImGui::BeginPopupContextItem("WaveSaveFormats",ImGuiMouseButton_Right)) {
|
||||
if (ImGui::MenuItem("save as .dmw...")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_SAVE_DMW);
|
||||
|
|
Loading…
Reference in a new issue