GUI: prepare to improve pattern manager
This commit is contained in:
parent
b972e54a7e
commit
aae9aad4f6
|
@ -57,6 +57,12 @@ void DivSubSong::rearrangePatterns() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DivSubSong::sortOrders() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void DivSubSong::makePatUnique() {
|
||||||
|
}
|
||||||
|
|
||||||
void DivSong::clearSongData() {
|
void DivSong::clearSongData() {
|
||||||
for (DivSubSong* i: subsong) {
|
for (DivSubSong* i: subsong) {
|
||||||
i->clearData();
|
i->clearData();
|
||||||
|
|
|
@ -175,6 +175,8 @@ struct DivSubSong {
|
||||||
void clearData();
|
void clearData();
|
||||||
void optimizePatterns();
|
void optimizePatterns();
|
||||||
void rearrangePatterns();
|
void rearrangePatterns();
|
||||||
|
void sortOrders();
|
||||||
|
void makePatUnique();
|
||||||
|
|
||||||
DivSubSong():
|
DivSubSong():
|
||||||
hilightA(4),
|
hilightA(4),
|
||||||
|
|
|
@ -33,7 +33,9 @@ void FurnaceGUI::drawPatManager() {
|
||||||
unsigned char isUsed[DIV_MAX_PATTERNS];
|
unsigned char isUsed[DIV_MAX_PATTERNS];
|
||||||
bool isNull[DIV_MAX_PATTERNS];
|
bool isNull[DIV_MAX_PATTERNS];
|
||||||
if (ImGui::Begin("Pattern Manager",&patManagerOpen,globalWinFlags)) {
|
if (ImGui::Begin("Pattern Manager",&patManagerOpen,globalWinFlags)) {
|
||||||
ImGui::Text("Global Tasks");
|
ImGui::Text("Global Tasks:");
|
||||||
|
|
||||||
|
ImGui::SameLine();
|
||||||
|
|
||||||
if (ImGui::Button("De-duplicate patterns")) {
|
if (ImGui::Button("De-duplicate patterns")) {
|
||||||
e->lockEngine([this]() {
|
e->lockEngine([this]() {
|
||||||
|
@ -48,6 +50,20 @@ void FurnaceGUI::drawPatManager() {
|
||||||
});
|
});
|
||||||
MARK_MODIFIED;
|
MARK_MODIFIED;
|
||||||
}
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button("Sort orders")) {
|
||||||
|
e->lockEngine([this]() {
|
||||||
|
e->curSubSong->sortOrders();
|
||||||
|
});
|
||||||
|
MARK_MODIFIED;
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button("Make patterns unique")) {
|
||||||
|
e->lockEngine([this]() {
|
||||||
|
e->curSubSong->makePatUnique();
|
||||||
|
});
|
||||||
|
MARK_MODIFIED;
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::BeginTable("PatManTable",257,ImGuiTableFlags_ScrollX|ImGuiTableFlags_SizingFixedFit)) {
|
if (ImGui::BeginTable("PatManTable",257,ImGuiTableFlags_ScrollX|ImGuiTableFlags_SizingFixedFit)) {
|
||||||
ImGui::PushFont(patFont);
|
ImGui::PushFont(patFont);
|
||||||
|
|
Loading…
Reference in a new issue