Merge pull request #405 from ZoomTen/chip-randomize

add chip randomizer button (enhancement)
This commit is contained in:
tildearrow 2022-04-29 04:38:27 -05:00 committed by GitHub
commit dbf4635646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();