Merge pull request #1048 from YohananDiamond/dialog-nitpicks
New song dialog: auto focus on pop up + reset search box
This commit is contained in:
commit
ea172ea6ff
|
@ -4948,6 +4948,8 @@ bool FurnaceGUI::loop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayNew) {
|
if (displayNew) {
|
||||||
|
newSongQuery="";
|
||||||
|
newSongFirstFrame=true;
|
||||||
displayNew=false;
|
displayNew=false;
|
||||||
ImGui::OpenPopup("New Song");
|
ImGui::OpenPopup("New Song");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1565,6 +1565,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;
|
||||||
|
|
|
@ -34,6 +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 (newSongFirstFrame)
|
||||||
|
ImGui::SetKeyboardFocusHere();
|
||||||
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;
|
||||||
|
@ -159,4 +161,6 @@ void FurnaceGUI::drawNewSong() {
|
||||||
updateWindowTitle();
|
updateWindowTitle();
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newSongFirstFrame=false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue