diff options
| author | Malkierian <malkierian@gmail.com> | 2025-06-29 18:06:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-29 18:06:21 -0700 |
| commit | 16c3cb1adf60d7cb6cf6a64d1cac80ea368fc973 (patch) | |
| tree | e7a70e027be49c2c43abecd3ef8d36b9988baeba | |
| parent | 112fbc5a4b12923cd83ba6efbeec2792798e69dc (diff) | |
Tracker circle (#5632)
* Fix item tracker circle display.
* Add .o2r to .gitignore.
* clang
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore index 3aa34d9c5..2b7352d95 100644 --- a/.gitignore +++ b/.gitignore @@ -457,3 +457,4 @@ soh/properties.h # Tools /clang-format /clang-format.exe +*.o2r diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index 6284d7121..fcace1017 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -696,9 +696,9 @@ void DrawQuest(ItemTrackerItem item) { bool hasQuestItem = HasQuestItem(item); float iconSize = static_cast<float>(CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36)); ImGui::BeginGroup(); - ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName( - hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded), - ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); + ImGui::ImageWithBg(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName( + hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded), + ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); if (item.id == QUEST_SKULL_TOKEN) { DrawItemCount(item, false); @@ -1231,7 +1231,7 @@ void DrawItemsInACircle(std::vector<ItemTrackerItem> items) { float radius = (iconSize + iconSpacing) * 2.0f; for (int i = 0; i < items.size(); i++) { - float angle = static_cast<float>(i / items.size() * 2.0f * M_PI); + float angle = static_cast<float>(i) / items.size() * 2.0f * M_PIf; float x = (radius / 2.0f) * cos(angle) + max.x / 2.0f; float y = (radius / 2.0f) * sin(angle) + max.y / 2.0f; ImGui::SetCursorPos(ImVec2(x - (CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36) - 8) / 2.0f, y + 4)); |
