GUI: add chip randomizer button
This commit is contained in:
parent
2583b18f86
commit
ee4d4c4251
|
@ -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 New Issue