Merge pull request #781 from tildearrow/tooltip_enum
Add tooltips in GUI, enum-ize piano mode/Special notes
This commit is contained in:
commit
b8784d93ce
9 changed files with 243 additions and 27 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue