mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-03 06:01:29 +00:00
Merge pull request #405 from ZoomTen/chip-randomize
add chip randomizer button (enhancement)
This commit is contained in:
commit
dbf4635646
1 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue