mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 17:45:10 +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::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();
|
||||||
|
|
Loading…
Reference in a new issue