Fix crashing with modern menu and UIWidgets with no tooltips (#851)

* Fix crashing with modern menu and UIWidgets when null is passed for tooltips

* move to shiputils
This commit is contained in:
Archez
2024-11-13 20:13:54 -05:00
committed by GitHub
parent e0ed28543b
commit 6d76ce9f5e
7 changed files with 39 additions and 27 deletions
+3 -1
View File
@@ -559,13 +559,15 @@ void DrawGeneralTab() {
if (ImGui::SliderInt("##setBank", &bankedRupees, 0, 5000, "Banked Rupees: %d")) {
HS_SET_BANK_RUPEES(bankedRupees);
}
UIWidgets::Tooltip("To recieve the rewards, set the bank to 199, 999, or 4,999 then deposit a single rupee");
UIWidgets::Tooltip("To receive the rewards, set the bank to 199, 999, or 4,999 then deposit a single rupee");
UIWidgets::PopStyleSlider();
DrawTempleClears();
UIWidgets::Checkbox("Has Tatl", (bool*)&gSaveContext.save.hasTatl, { .color = UIWidgets::Colors::Gray });
UIWidgets::Checkbox("Is Owl Save", (bool*)&gSaveContext.save.isOwlSave, { .color = UIWidgets::Colors::Gray });
UIWidgets::Checkbox("Finished Intro Sequence", (bool*)&gSaveContext.save.isFirstCycle,
{ .color = UIWidgets::Colors::Gray });
ImGui::EndGroup();
ImGui::PopItemWidth();