Skip to content

Commit aeef959

Browse files
committed
[v0.9.533] Fixed sub-stat cycling respecting hidden sub-stats. Also mentioned this for the specific hiding checkbox. Fixed complex stats with a single sub-stat still cycling through the single sub-stat.
1 parent 8097124 commit aeef959

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,8 @@ Nearly every aspect of the overlay can be tailored to your liking from the setti
483483
* **Animation**: Set the `Overlay FPS Limit` and toggle the `Speed Up Animation` option. You can also temporarily speed
484484
up the animation by holding `SPACE` while the overlay window is focused.
485485
* **Stat Cycling**: For multi-stat goals, you can set the `Sub-Stat Cycle Interval` to control how frequently the
486-
overlay cycles through displaying each sub-stat.
487-
* **Visibility**: Choose whether to hide completed goals from Row 3 (items in Row 1 & 2 always hide), and toggle the
488-
visibility of each section of the
486+
overlay cycles through displaying each sub-stat. **Note:** Sub-stats marked as "Hidden" in the template will be skipped during this cycle.
487+
* **Visibility**: Choose whether to hide completed goals from Row 3 (items in Row 1 & 2 always hide), and toggle the visibility of each section of the
489488
top info bar (`World`, `Run Details`, `Progress`, `IGT`, `Update Timer`).
490489
* **Alignment**: The main progress text at the top of the overlay can be aligned to the `Left`, `Center`, or `Right`.
491490
* **Spacing**: You can fully adjust the `spacing` between each row to either be dynamic based on the longest text width

source/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const char* get_notes_manifest_path();
5555
#define TRACKER_TITLE "Advancely"
5656

5757
// This is the version that gets compared with the latest release tag on GitHub
58-
#define ADVANCELY_VERSION "v0.9.532" // vMAJOR.MINOR.PATCH // Update this always, SAME FORMAT ON RELEASE TAG!
58+
#define ADVANCELY_VERSION "v0.9.533" // vMAJOR.MINOR.PATCH // Update this always, SAME FORMAT ON RELEASE TAG!
5959
#define ADVANCELY_ICON_PATH "/gui/Advancely_Logo_NoText.png" // Starting from /gui folder
6060
#define ADVANCELY_LOGO_PATH "/gui/Advancely_Logo.png" // Starting from /gui folder
6161
#define ADVANCELY_LOGO_SIZE 512.0f // Logo size on startup message window or update successful window

source/overlay.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,13 +1235,16 @@ void overlay_render(Overlay *o, const Tracker *t, const AppSettings *settings) {
12351235
}
12361236
icon_path = stat->icon_path;
12371237

1238-
if (stat->criteria_count > 1) {
1238+
if (!stat->is_single_stat_category) { // If complex stat it cycles (even if just one sub-stat)
1239+
// Multi-stat / Complex Stat Logic
12391240
snprintf(name_buf, sizeof(name_buf), "%s (%d / %d)", stat->display_name,
12401241
stat->completed_criteria_count, stat->criteria_count);
1241-
// ... (Cycle logic for multi-stat) ...
1242+
// Cycle logic for multi-stat
12421243
std::vector<int> incomplete_indices;
12431244
for (int j = 0; j < stat->criteria_count; ++j) {
1244-
if (!stat->criteria[j]->done) incomplete_indices.push_back(j);
1245+
if (!stat->criteria[j]->done && !stat->criteria[j]->is_hidden) {
1246+
incomplete_indices.push_back(j);
1247+
}
12451248
}
12461249
if (!incomplete_indices.empty()) {
12471250
int cycle_duration_ms = (int) (settings->overlay_stat_cycle_speed * 1000.0f);
@@ -1604,14 +1607,14 @@ void overlay_render(Overlay *o, const Tracker *t, const AppSettings *settings) {
16041607
}
16051608
icon_path = stat->icon_path;
16061609

1607-
if (stat->criteria_count > 1) {
1608-
// Multi-stat
1610+
if (!stat->is_single_stat_category) { // If it's a complext stat (even if just one sub-stat)
1611+
// Multi-stat / Complex stat logic
16091612
snprintf(name_buf, sizeof(name_buf), "%s (%d / %d)", stat->display_name,
16101613
stat->completed_criteria_count, stat->criteria_count);
16111614

16121615
std::vector<int> incomplete_indices;
16131616
for (int j = 0; j < stat->criteria_count; ++j) {
1614-
if (!stat->criteria[j]->done) {
1617+
if (!stat->criteria[j]->done && !stat->criteria[j]->is_hidden) {
16151618
incomplete_indices.push_back(j);
16161619
}
16171620
}

source/temp_creator.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5781,11 +5781,13 @@ void temp_creator_render_gui(bool *p_open, AppSettings *app_settings, ImFont *ro
57815781
save_message_type = MSG_NONE;
57825782
}
57835783
if (ImGui::IsItemHovered()) {
5784-
char hidden_tooltip_buffer[256];
5784+
char hidden_tooltip_buffer[512];
57855785
snprintf(hidden_tooltip_buffer, sizeof(hidden_tooltip_buffer),
5786-
"If checked, this multi-stage goal will be fully hidden on the overlay\n"
5786+
"If checked, this sub-stat will be fully hidden on the overlay\n"
57875787
"and hidden settings-based on the tracker.\n"
5788-
"Visibility can be toggled in the main tracker settings");
5788+
"Visibility can be toggled in the main tracker settings.\n\n"
5789+
"NOTE: Hidden sub-stats are also excluded from the cycle rotation\n"
5790+
"on the overlay.");
57895791
ImGui::SetTooltip("%s", hidden_tooltip_buffer);
57905792
}
57915793

0 commit comments

Comments
 (0)