GUI: much better
This commit is contained in:
parent
1a3eed7830
commit
372f2a20a2
|
@ -332,6 +332,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
}
|
}
|
||||||
if (!patternOpen) return;
|
if (!patternOpen) return;
|
||||||
|
|
||||||
|
bool inhibitMenu=false;
|
||||||
float scrollX=0;
|
float scrollX=0;
|
||||||
|
|
||||||
if (e->isPlaying() && followPattern) cursor.y=oldRow;
|
if (e->isPlaying() && followPattern) cursor.y=oldRow;
|
||||||
|
@ -411,6 +412,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
fancyPattern=!fancyPattern;
|
fancyPattern=!fancyPattern;
|
||||||
|
inhibitMenu=true;
|
||||||
e->enableCommandStream(fancyPattern);
|
e->enableCommandStream(fancyPattern);
|
||||||
e->getCommandStream(cmdStream);
|
e->getCommandStream(cmdStream);
|
||||||
cmdStream.clear();
|
cmdStream.clear();
|
||||||
|
@ -481,6 +483,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
if (muted) ImGui::PopStyleColor();
|
if (muted) ImGui::PopStyleColor();
|
||||||
ImGui::PopStyleColor(3);
|
ImGui::PopStyleColor(3);
|
||||||
if (settings.soloAction!=2) if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
if (settings.soloAction!=2) if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
|
inhibitMenu=true;
|
||||||
e->toggleSolo(i);
|
e->toggleSolo(i);
|
||||||
}
|
}
|
||||||
if (extraChannelButtons==2) {
|
if (extraChannelButtons==2) {
|
||||||
|
@ -807,23 +810,26 @@ void FurnaceGUI::drawPattern() {
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
if (patternOpen) if (ImGui::BeginPopupContextItem("furnace quit unexpectedly.")) {
|
if (patternOpen) {
|
||||||
char id[4096];
|
if (!inhibitMenu && ImGui::IsItemClicked(ImGuiMouseButton_Right)) ImGui::OpenPopup("patternActionMenu");
|
||||||
ImGui::Selectable("cut");
|
if (ImGui::BeginPopup("patternActionMenu",ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings)) {
|
||||||
ImGui::Selectable("copy");
|
char id[4096];
|
||||||
ImGui::Selectable("paste");
|
ImGui::Selectable("cut");
|
||||||
if (ImGui::BeginMenu("change instrument...")) {
|
ImGui::Selectable("copy");
|
||||||
if (e->song.ins.empty()) {
|
ImGui::Selectable("paste");
|
||||||
ImGui::Text("no instruments available");
|
if (ImGui::BeginMenu("change instrument...")) {
|
||||||
}
|
if (e->song.ins.empty()) {
|
||||||
for (size_t i=0; i<e->song.ins.size(); i++) {
|
ImGui::Text("no instruments available");
|
||||||
snprintf(id,4095,"%.2X: %s",(int)i,e->song.ins[i]->name.c_str());
|
|
||||||
if (ImGui::Selectable(id)) { // TODO
|
|
||||||
}
|
}
|
||||||
|
for (size_t i=0; i<e->song.ins.size(); i++) {
|
||||||
|
snprintf(id,4095,"%.2X: %s",(int)i,e->song.ins[i]->name.c_str());
|
||||||
|
if (ImGui::Selectable(id)) { // TODO
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
ImGui::EndMenu();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
ImGui::EndPopup();
|
|
||||||
}
|
}
|
||||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_PATTERN;
|
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_PATTERN;
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
Loading…
Reference in a new issue