diff options
| author | Eblo <7004497+Eblo@users.noreply.github.com> | 2025-07-21 16:56:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-21 16:56:31 -0400 |
| commit | b9d50a9217fd1f2d302e780b7e775406a4e7b1d3 (patch) | |
| tree | fe86b5310527d30a649124743c60faf34dc18d11 | |
| parent | 894630dbfd7319692c4e47802f49a4b89df22be9 (diff) | |
[Rando] Update rando menu description, contributors list (#1205)
* Update rando menu description, contributors list
* Rework contributor display into autoscroll list
| -rw-r--r-- | mm/2s2h/BenGui/BenMenu.cpp | 35 | ||||
| -rw-r--r-- | mm/2s2h/Rando/Menu.cpp | 23 |
2 files changed, 31 insertions, 27 deletions
diff --git a/mm/2s2h/BenGui/BenMenu.cpp b/mm/2s2h/BenGui/BenMenu.cpp index 55e2929c6..b6178333f 100644 --- a/mm/2s2h/BenGui/BenMenu.cpp +++ b/mm/2s2h/BenGui/BenMenu.cpp @@ -261,6 +261,7 @@ std::vector<std::string> contributors = { "cplaster", "justawayofthesamurai", "verbes4", + "ammar sadaoui", }; void BenMenu::AddSettings() { @@ -329,21 +330,35 @@ void BenMenu::AddSettings() { ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.5f, 1.0f)); ImGui::SeparatorText("Thank You"); ImGui::PopStyleColor(); - - ImGui::TextWrapped("Special thanks to our contributors, playtesters, artists, moderators, helpers, and " - "everyone in the larger decomp & N64 communities who make this project possible.\n\n"); + ImGui::SameLine(); ImTextureID heartTextureId = Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName( (const char*)gQuestIconHeartContainer2Tex); ImGui::Image(heartTextureId, ImVec2(25.0f, 25.0f)); - ImGui::SameLine(); + ImGui::TextWrapped("Special thanks to our contributors, playtesters, artists, moderators, helpers, and " + "everyone in the larger decomp & N64 communities who make this project possible.\n\n"); - static u64 lastTime = 0; - static std::string contributor = ""; - if (GetUnixTimestamp() - lastTime > 5000) { - lastTime = GetUnixTimestamp(); - contributor = contributors[Ship_Random(0, contributors.size() - 1)]; + // Draw auto scrolling list of contributors in columns + ImGui::SetNextWindowSize(ImVec2(0.0f, ImGui::GetMainViewport()->WorkSize.y / 3)); + ImGui::BeginChild("contributors"); + static double scrollSpeed = 1.5f * (ImGui::GetFontSize() / 1000.0f); // Lines to scroll per second + double scrollPosition = fmod(GetUnixTimestamp() * scrollSpeed, ImGui::GetScrollMaxY() + 1.0f); + ImGui::SetScrollY(scrollPosition); + + ImGui::Dummy(ImVec2(0.0f, ImGui::GetFontSize())); + static int numColumns = 2; // Two columns seem to work best. Some names are too long for more on lower res + for (int column = 0; column < numColumns; column++) { + if (column > 0) + ImGui::SameLine(); + + ImGui::BeginGroup(); + for (int i = column; i < contributors.size(); i += numColumns) { + ImGui::Text("%s", contributors.at(i).c_str()); + } + ImGui::EndGroup(); } - ImGui::Text("%s", contributor.c_str()); + ImGui::Dummy(ImVec2(0.0f, ImGui::GetFontSize())); + ImGui::EndChild(); + ImGui::EndChild(); }); diff --git a/mm/2s2h/Rando/Menu.cpp b/mm/2s2h/Rando/Menu.cpp index 065a3a793..d05b84f1f 100644 --- a/mm/2s2h/Rando/Menu.cpp +++ b/mm/2s2h/Rando/Menu.cpp @@ -95,7 +95,12 @@ bool IncompatibleWithLogicSetting(int32_t option) { } static void DrawGeneralTab() { - ImGui::BeginChild("randoSettings", ImVec2(ImGui::GetContentRegionAvail().x / 2, 0)); + ImGui::BeginChild("randoSettings"); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1, 1, 1, 0.5f)); + ImGui::TextWrapped( + "Explore the menus for various enhancements and time savers; most are not enabled by default in Rando."); + ImGui::PopStyleColor(); + ImGui::SeparatorText("Seed Generation"); UIWidgets::CVarCheckbox("Enable Rando (Randomizes new files upon creation)", "gRando.Enabled"); @@ -138,22 +143,6 @@ static void DrawGeneralTab() { } ImGui::EndChild(); ImGui::SameLine(); - ImGui::BeginChild("randoDisclaimer"); - ImGui::PushStyleColor(ImGuiCol_Text, ColorValues.at(Colors::Gray)); - if (gGitCommitTag[0] == 0) { - ImGui::Text("%s | %s", (char*)gGitBranch, (char*)gGitCommitHash); - } else { - ImGui::Text("%s", (char*)gBuildVersion); - } - ImGui::PopStyleColor(); - ImGui::PushStyleColor(ImGuiCol_Text, ColorValues.at(Colors::Orange)); - ImGui::SeparatorText("Disclaimer"); - ImGui::PopStyleColor(); - ImGui::TextWrapped( - "This is a Beta. Please make note of any odd or unexpected behavior while you are playing, and report it " - "in our [Playtest] Rando Beta thread on Discord under #2s2h-threads.\n\n" - "Explore the menus for various enhancements and time savers, they are not enabled by default in Rando.\n\n"); - ImGui::EndChild(); } static void DrawLogicConditionsTab() { |
