dev115 - automatic system detection

This commit is contained in:
tildearrow 2022-09-21 19:27:42 -05:00
parent a17f499384
commit e22d7484cb
11 changed files with 150 additions and 12 deletions

View file

@ -77,11 +77,23 @@ void FurnaceGUI::drawSongInfo() {
ImGui::TableNextColumn();
ImGui::Text("System");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(avail);
ImGui::SetNextItemWidth(MAX(16.0f*dpiScale,avail-autoButtonSize-ImGui::GetStyle().ItemSpacing.x));
if (ImGui::InputText("##SystemName",&e->song.systemName)) {
MARK_MODIFIED;
updateWindowTitle();
e->song.autoSystem=false;
}
ImGui::SameLine();
pushToggleColors(e->song.autoSystem);
if (ImGui::Button("Auto")) {
e->song.autoSystem=!e->song.autoSystem;
if (e->song.autoSystem) {
autoDetectSystem();
updateWindowTitle();
}
}
popToggleColors();
autoButtonSize=ImGui::GetItemRectSize().x;
ImGui::EndTable();
}