mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
Applying corrections
This commit is contained in:
parent
72ef39db60
commit
c3654a4d52
3 changed files with 6 additions and 11 deletions
|
@ -4840,7 +4840,8 @@ bool FurnaceGUI::loop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayNew) {
|
if (displayNew) {
|
||||||
newSongQuery = "";
|
newSongQuery="";
|
||||||
|
newSongFirstFrame=true;
|
||||||
displayNew=false;
|
displayNew=false;
|
||||||
ImGui::OpenPopup("New Song");
|
ImGui::OpenPopup("New Song");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1564,6 +1564,7 @@ class FurnaceGUI {
|
||||||
|
|
||||||
double exportFadeOut;
|
double exportFadeOut;
|
||||||
|
|
||||||
|
bool newSongFirstFrame;
|
||||||
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
|
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
|
||||||
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen, settingsOpen;
|
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen, settingsOpen;
|
||||||
bool mixerOpen, debugOpen, inspectorOpen, oscOpen, volMeterOpen, statsOpen, compatFlagsOpen;
|
bool mixerOpen, debugOpen, inspectorOpen, oscOpen, volMeterOpen, statsOpen, compatFlagsOpen;
|
||||||
|
|
|
@ -23,9 +23,6 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
void FurnaceGUI::drawNewSong() {
|
void FurnaceGUI::drawNewSong() {
|
||||||
// Be sure to reset this to true when the popup is closed
|
|
||||||
static bool firstFrame = true;
|
|
||||||
|
|
||||||
bool accepted=false;
|
bool accepted=false;
|
||||||
|
|
||||||
ImGui::PushFont(bigFont);
|
ImGui::PushFont(bigFont);
|
||||||
|
@ -37,10 +34,8 @@ void FurnaceGUI::drawNewSong() {
|
||||||
avail.y-=ImGui::GetFrameHeightWithSpacing();
|
avail.y-=ImGui::GetFrameHeightWithSpacing();
|
||||||
|
|
||||||
if (ImGui::BeginChild("sysPickerC",avail,false,ImGuiWindowFlags_NoScrollWithMouse|ImGuiWindowFlags_NoScrollbar)) {
|
if (ImGui::BeginChild("sysPickerC",avail,false,ImGuiWindowFlags_NoScrollWithMouse|ImGuiWindowFlags_NoScrollbar)) {
|
||||||
if (firstFrame) {
|
if (newSongFirstFrame)
|
||||||
ImGui::SetKeyboardFocusHere();
|
ImGui::SetKeyboardFocusHere();
|
||||||
firstFrame = false;
|
|
||||||
}
|
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
if (ImGui::InputTextWithHint("##SysSearch","Search...",&newSongQuery)) {
|
if (ImGui::InputTextWithHint("##SysSearch","Search...",&newSongQuery)) {
|
||||||
String lowerCase=newSongQuery;
|
String lowerCase=newSongQuery;
|
||||||
|
@ -129,12 +124,10 @@ void FurnaceGUI::drawNewSong() {
|
||||||
|
|
||||||
if (ImGui::Button("I'm feeling lucky")) {
|
if (ImGui::Button("I'm feeling lucky")) {
|
||||||
if (sysCategories.size()==0) {
|
if (sysCategories.size()==0) {
|
||||||
firstFrame = true;
|
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
} else {
|
} else {
|
||||||
FurnaceGUISysCategory* newSystemCat=&sysCategories[rand()%sysCategories.size()];
|
FurnaceGUISysCategory* newSystemCat=&sysCategories[rand()%sysCategories.size()];
|
||||||
if (newSystemCat->systems.size()==0) {
|
if (newSystemCat->systems.size()==0) {
|
||||||
firstFrame = true;
|
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
} else {
|
} else {
|
||||||
unsigned int selection=rand()%newSystemCat->systems.size();
|
unsigned int selection=rand()%newSystemCat->systems.size();
|
||||||
|
@ -148,7 +141,6 @@ void FurnaceGUI::drawNewSong() {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
if (ImGui::Button("Cancel")) {
|
if (ImGui::Button("Cancel")) {
|
||||||
firstFrame = true;
|
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +159,8 @@ void FurnaceGUI::drawNewSong() {
|
||||||
selEnd=SelectionPoint();
|
selEnd=SelectionPoint();
|
||||||
cursor=SelectionPoint();
|
cursor=SelectionPoint();
|
||||||
updateWindowTitle();
|
updateWindowTitle();
|
||||||
firstFrame = true;
|
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newSongFirstFrame=false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue