mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 04:55:13 +00:00
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
3 changed files with 7 additions and 0 deletions
|
@ -4948,6 +4948,8 @@ bool FurnaceGUI::loop() {
|
|||
}
|
||||
|
||||
if (displayNew) {
|
||||
newSongQuery="";
|
||||
newSongFirstFrame=true;
|
||||
displayNew=false;
|
||||
ImGui::OpenPopup("New Song");
|
||||
}
|
||||
|
|
|
@ -1565,6 +1565,7 @@ class FurnaceGUI {
|
|||
|
||||
double exportFadeOut;
|
||||
|
||||
bool newSongFirstFrame;
|
||||
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
|
||||
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen, settingsOpen;
|
||||
bool mixerOpen, debugOpen, inspectorOpen, oscOpen, volMeterOpen, statsOpen, compatFlagsOpen;
|
||||
|
|
|
@ -34,6 +34,8 @@ void FurnaceGUI::drawNewSong() {
|
|||
avail.y-=ImGui::GetFrameHeightWithSpacing();
|
||||
|
||||
if (ImGui::BeginChild("sysPickerC",avail,false,ImGuiWindowFlags_NoScrollWithMouse|ImGuiWindowFlags_NoScrollbar)) {
|
||||
if (newSongFirstFrame)
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::InputTextWithHint("##SysSearch","Search...",&newSongQuery)) {
|
||||
String lowerCase=newSongQuery;
|
||||
|
@ -159,4 +161,6 @@ void FurnaceGUI::drawNewSong() {
|
|||
updateWindowTitle();
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
||||
newSongFirstFrame=false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue