add ability to play by one row
This commit is contained in:
parent
107187a20c
commit
8772439d3e
4 changed files with 52 additions and 5 deletions
|
|
@ -645,6 +645,10 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Checkbox("Repeat pattern",&repeatPattern)) {
|
||||
e->setRepeatPattern(repeatPattern);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
}
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
|
||||
ImGui::End();
|
||||
|
|
@ -658,6 +662,10 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_PLAY "##Play")) {
|
||||
play();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
bool repeatPattern=e->getRepeatPattern();
|
||||
|
|
@ -722,6 +730,9 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_STOP "##Stop")) {
|
||||
stop();
|
||||
}
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
}
|
||||
|
||||
bool repeatPattern=e->getRepeatPattern();
|
||||
ImGui::PushStyleColor(ImGuiCol_Button,ImVec4(0.2f,(repeatPattern)?0.6f:0.2f,0.2f,1.0f));
|
||||
|
|
@ -792,6 +803,10 @@ void FurnaceGUI::drawEditControls() {
|
|||
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PlayAgain")) {
|
||||
play();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::PushStyleColor(ImGuiCol_Button,ImVec4(0.2f,(edit)?0.6f:0.2f,0.2f,1.0f));
|
||||
|
|
@ -4719,6 +4734,9 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
|
|||
doUndo();
|
||||
}
|
||||
break;
|
||||
case SDLK_RETURN:
|
||||
e->stepOne(cursor.y);
|
||||
break;
|
||||
}
|
||||
} else switch (ev.key.keysym.sym) {
|
||||
case SDLK_F5:
|
||||
|
|
@ -4758,7 +4776,7 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
|
|||
}
|
||||
break;
|
||||
case SDLK_RETURN:
|
||||
if (e->isPlaying()) {
|
||||
if (e->isPlaying() && !e->isStepping()) {
|
||||
stop();
|
||||
} else {
|
||||
if (ev.key.keysym.mod&KMOD_SHIFT) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue