mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-03 17:57:26 +00:00
GUI: find and replace, part 5
This commit is contained in:
parent
7669a2aa9d
commit
7dc3dc96c4
2 changed files with 54 additions and 6 deletions
|
@ -17,6 +17,7 @@ const char* queryModes[GUI_QUERY_MAX]={
|
|||
const char* queryReplaceModes[GUI_QUERY_REPLACE_MAX]={
|
||||
"set",
|
||||
"add",
|
||||
"add (overflow)",
|
||||
"clear"
|
||||
};
|
||||
|
||||
|
@ -363,18 +364,33 @@ void FurnaceGUI::drawFindReplace() {
|
|||
}
|
||||
|
||||
if (ImGui::TreeNode("Replace")) {
|
||||
if (ImGui::BeginTable("QueryReplace",3)) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Note");
|
||||
if (ImGui::BeginTable("QueryReplace",3,ImGuiTableFlags_BordersOuter)) {
|
||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch,0.5);
|
||||
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch,0.5);
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Ins");
|
||||
ImGui::Checkbox("Note",&queryReplaceNoteDo);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
ImGui::Combo("##NRMode",&queryReplaceNoteMode,queryReplaceModes,GUI_QUERY_REPLACE_MAX);
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Volume");
|
||||
ImGui::Checkbox("Ins",&queryReplaceInsDo);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
ImGui::Combo("##IRMode",&queryReplaceInsMode,queryReplaceModes,GUI_QUERY_REPLACE_MAX);
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Checkbox("Volume",&queryReplaceVolDo);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
ImGui::Combo("##VRMode",&queryReplaceVolMode,queryReplaceModes,GUI_QUERY_REPLACE_MAX);
|
||||
|
||||
/*ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
|
@ -386,6 +402,19 @@ void FurnaceGUI::drawFindReplace() {
|
|||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::Text("Effect replace mode:");
|
||||
if (ImGui::RadioButton("Clear effects",queryReplaceEffectPos==0)) {
|
||||
queryReplaceEffectPos=0;
|
||||
}
|
||||
if (ImGui::RadioButton("Replace matches only",queryReplaceEffectPos==1)) {
|
||||
queryReplaceEffectPos=1;
|
||||
}
|
||||
if (ImGui::RadioButton("Replace matches, then free spaces",queryReplaceEffectPos==2)) {
|
||||
queryReplaceEffectPos=2;
|
||||
}
|
||||
if (ImGui::RadioButton("Insert in free spaces",queryReplaceEffectPos==3)) {
|
||||
queryReplaceEffectPos=3;
|
||||
}
|
||||
if (ImGui::Button("Replace##QueryReplace")) {
|
||||
// TODO
|
||||
}
|
||||
|
|
|
@ -818,6 +818,7 @@ enum FurnaceGUIFindQueryModes {
|
|||
enum FurnaceGUIFindQueryReplaceModes {
|
||||
GUI_QUERY_REPLACE_SET=0,
|
||||
GUI_QUERY_REPLACE_ADD,
|
||||
GUI_QUERY_REPLACE_ADD_OVERFLOW,
|
||||
GUI_QUERY_REPLACE_CLEAR,
|
||||
|
||||
GUI_QUERY_REPLACE_MAX
|
||||
|
@ -1175,6 +1176,24 @@ class FurnaceGUI {
|
|||
int curQueryRangeY;
|
||||
int curQueryEffectPos;
|
||||
|
||||
int queryReplaceEffectCount;
|
||||
int queryReplaceEffectPos;
|
||||
int queryReplaceNoteMode;
|
||||
int queryReplaceInsMode;
|
||||
int queryReplaceVolMode;
|
||||
int queryReplaceEffectMode[8];
|
||||
int queryReplaceEffectValMode[8];
|
||||
int queryReplaceNote;
|
||||
int queryReplaceIns;
|
||||
int queryReplaceVol;
|
||||
int queryReplaceEffect[8];
|
||||
int queryReplaceEffectVal[8];
|
||||
bool queryReplaceNoteDo;
|
||||
bool queryReplaceInsDo;
|
||||
bool queryReplaceVolDo;
|
||||
bool queryReplaceEffectDo[8];
|
||||
bool queryReplaceEffectValDo[8];
|
||||
|
||||
struct ActiveNote {
|
||||
int chan;
|
||||
int note;
|
||||
|
|
Loading…
Reference in a new issue