GUI: change behavior of play buttons
This commit is contained in:
parent
25c5c97c47
commit
8facb43081
|
@ -20,9 +20,6 @@
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "IconsFontAwesome4.h"
|
#include "IconsFontAwesome4.h"
|
||||||
|
|
||||||
// TODO:
|
|
||||||
// - "play from start" button/action
|
|
||||||
// - fix behavior of play buttons
|
|
||||||
void FurnaceGUI::drawEditControls() {
|
void FurnaceGUI::drawEditControls() {
|
||||||
if (nextWindow==GUI_WINDOW_EDIT_CONTROLS) {
|
if (nextWindow==GUI_WINDOW_EDIT_CONTROLS) {
|
||||||
editControlsOpen=true;
|
editControlsOpen=true;
|
||||||
|
@ -259,11 +256,17 @@ void FurnaceGUI::drawEditControls() {
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
} else {
|
} else {
|
||||||
if (ImGui::Button(ICON_FA_PLAY "##Play")) {
|
if (ImGui::Button(ICON_FA_PLAY "##Play")) {
|
||||||
play();
|
play(oldRow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PlayAgain")) {
|
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PlayAgain")) {
|
||||||
|
e->setRepeatPattern(false);
|
||||||
|
play();
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(ICON_FA_STEP_FORWARD "##PlayRepeat")) {
|
||||||
|
e->setRepeatPattern(true);
|
||||||
play();
|
play();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
Loading…
Reference in New Issue