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

View file

@ -70,6 +70,14 @@ void FurnaceGUI::drawNewSong() {
ImGui::CloseCurrentPopup(); 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) { if (accepted) {
e->createNew(nextDesc); e->createNew(nextDesc);
undoHist.clear(); undoHist.clear();