Merge pull request #781 from tildearrow/tooltip_enum

Add tooltips in GUI, enum-ize piano mode/Special notes
This commit is contained in:
tildearrow 2022-12-11 02:38:31 -05:00 committed by GitHub
commit b8784d93ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 243 additions and 27 deletions

View file

@ -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("Open");
}
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("Open");
}
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("Open");
}
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();

View file

@ -446,11 +446,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();
@ -474,6 +480,9 @@ void FurnaceGUI::drawEditControls() {
e->stepOne(cursor.y);
pendingStepUpdate=true;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Step one row");
}
ImGui::SameLine();
pushToggleColors(noteInputPoly);
@ -481,6 +490,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;
@ -491,17 +503,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 one row");
}
ImGui::SameLine();
bool repeatPattern=e->getRepeatPattern();
@ -509,6 +530,9 @@ void FurnaceGUI::drawEditControls() {
if (ImGui::Button(ICON_FA_REPEAT "##RepeatPattern")) {
e->setRepeatPattern(!repeatPattern);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Repeat pattern");
}
popToggleColors();
ImGui::SameLine();
@ -516,6 +540,9 @@ void FurnaceGUI::drawEditControls() {
if (ImGui::Button(ICON_FA_CIRCLE "##Edit")) {
edit=!edit;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Edit");
}
popToggleColors();
ImGui::SameLine();
@ -524,6 +551,9 @@ void FurnaceGUI::drawEditControls() {
if (ImGui::Button(ICON_FA_BELL_O "##Metronome")) {
e->setMetronome(!metro);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Metronome");
}
popToggleColors();
ImGui::SameLine();
@ -566,6 +596,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;
@ -578,26 +611,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 one 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();
@ -605,9 +653,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)) {
@ -632,15 +686,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);
@ -648,6 +711,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;
@ -660,33 +726,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 one 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();
@ -695,6 +779,9 @@ void FurnaceGUI::drawEditControls() {
if (ImGui::Button(ICON_FA_BELL_O "##Metronome")) {
e->setMetronome(!metro);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Metronome");
}
popToggleColors();
ImGui::SameLine();
@ -703,6 +790,9 @@ void FurnaceGUI::drawEditControls() {
if (ImGui::Button(ICON_FA_REPEAT "##RepeatPattern")) {
e->setRepeatPattern(!repeatPattern);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Repeat pattern");
}
popToggleColors();
ImGui::SameLine();
@ -711,6 +801,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;

View file

@ -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),

View file

@ -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];

View file

@ -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("Open");
}
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);

View file

@ -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,11 +76,11 @@ 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);
}
ImGui::SameLine();
if (ImGui::Button("===##PianoNRel",optionSize)) {
if (edit) noteInput(0,101);
if (edit) noteInput(0,GUI_NOTE_OFF_RELEASE);
}
} else {
if (ImGui::Button(ICON_FA_ARROW_LEFT "##PianoLeft",optionSize)) {
@ -95,29 +95,32 @@ void FurnaceGUI::drawPiano() {
}
ImGui::SameLine();
ImGui::Button(ICON_FA_ELLIPSIS_V "##PianoOptions",optionSize);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("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,7 +132,7 @@ void FurnaceGUI::drawPiano() {
if (pianoOptionsSet) {
if (ImGui::Button("REL##PianoNMRel",optionSize)) {
if (edit) noteInput(0,102);
if (edit) noteInput(0,GUI_NOTE_RELEASE);
}
ImGui::SameLine();
if (ImGui::Button(ICON_FA_TIMES "##PianoDelP",optionSize)) {
@ -158,7 +161,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 +434,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)) {

View file

@ -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("Open");
}
ImGui::SameLine();
if (ImGui::Button(ICON_FA_FLOPPY_O "##SESave")) {
doAction(GUI_ACTION_SAMPLE_LIST_SAVE);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Save");
}
ImGui::SameLine();

View file

@ -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();

View file

@ -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("Open");
}
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);