GUI: add chip randomizer button

This commit is contained in:
Zumi Daxuya 2022-04-29 15:54:10 +07:00
parent 2583b18f86
commit ee4d4c4251
1 changed files with 8 additions and 0 deletions

View File

@ -70,6 +70,14 @@ void FurnaceGUI::drawNewSong() {
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("I'm feeling lucky")) {
FurnaceGUISysCategory* newSystemCat=&sysCategories[rand()%sysCategories.size()];
nextDesc=newSystemCat->systems[rand()%newSystemCat->systems.size()].definition.data();
accepted=true;
}
if (accepted) {
e->createNew(nextDesc);
undoHist.clear();