From ee4d4c42513be9b78f5f2374ca40089de9c75f86 Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Fri, 29 Apr 2022 15:54:10 +0700 Subject: [PATCH] GUI: add chip randomizer button --- src/gui/newSong.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/newSong.cpp b/src/gui/newSong.cpp index d6188b3e5..06aeb4bd6 100644 --- a/src/gui/newSong.cpp +++ b/src/gui/newSong.cpp @@ -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();