Skip to content

Commit aaaa992

Browse files
committed
[v0.9.537] Fixed issue where sub-stats/criteria of their hidden parent still contributed to the shared flag. Removed deltaTime fully from tracker_update function. Updated "Enable Overlay" tooltip to mention that more overlay-related settings appear.
1 parent 0133591 commit aaaa992

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

source/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ int main(int argc, char *argv[]) {
17761776
);
17771777

17781778
// Now update progress with the correct paths
1779-
tracker_update(tracker, &deltaTime, &app_settings);
1779+
tracker_update(tracker, &app_settings);
17801780

17811781
// Update TITLE of the tracker window with some info, similar to the debug print
17821782
tracker_update_title(tracker, &app_settings);

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.535" // vMAJOR.MINOR.PATCH // Update this always, SAME FORMAT ON RELEASE TAG!
58+
#define ADVANCELY_VERSION "v0.9.537" // 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/settings.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,8 @@ void settings_render_gui(bool *p_open, AppSettings *app_settings, ImFont *roboto
902902
if (selected_version <= MC_VERSION_1_6_4) {
903903
// Legacy
904904
snprintf(enable_overlay_tooltip_buffer, sizeof(enable_overlay_tooltip_buffer),
905-
"Enables a separate, customizable window to show your progress, perfect for streaming.\n\n"
905+
"Enables a separate, customizable window to show your progress, perfect for streaming.\n"
906+
"More overlay-related settings become visible.\n\n"
906907
"Overlay Layout:\n"
907908
" • Row 1: Sub-stats of complex stats (if not template hidden).\n"
908909
" (If two visible items share an icon, the parent's icon is overlaid.)\n"

source/temp_creator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4281,7 +4281,7 @@ void temp_creator_render_gui(bool *p_open, AppSettings *app_settings, ImFont *ro
42814281
if (ImGui::IsItemHovered()) {
42824282
char hidden_tooltip_buffer[256];
42834283
snprintf(hidden_tooltip_buffer, sizeof(hidden_tooltip_buffer),
4284-
"If checked, this stat will be fully hidden on the overlay\n"
4284+
"If checked, this stat (and all sub-stats) will be fully hidden on the overlay\n"
42854285
"and hidden settings-based on the tracker.\n"
42864286
"Visibility can be toggled in the main tracker settings");
42874287
ImGui::SetTooltip("%s", hidden_tooltip_buffer);

source/tracker.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,9 @@ static int count_all_icon_hashes(Tracker *t, IconHashCounter **counts, int capac
14511451
for (int i = 0; i < cat_count; i++) {
14521452
if (categories[i]->is_single_stat_category) continue;
14531453

1454+
// If the parent category is hidden, children should not contribute to shared count (not visible)
1455+
if (categories[i]->is_hidden) continue;
1456+
14541457
for (int j = 0; j < categories[i]->criteria_count; j++) {
14551458
TrackableItem *crit = categories[i]->criteria[j];
14561459

@@ -1490,6 +1493,9 @@ static void flag_shared_icons_by_hash(IconHashCounter *counts, int unique_count,
14901493
for (int i = 0; i < cat_count; i++) {
14911494
if (categories[i]->is_single_stat_category) continue;
14921495

1496+
// Skip processing hidden parents here as well, children are also hidden
1497+
if (categories[i]->is_hidden) continue;
1498+
14931499
for (int j = 0; j < categories[i]->criteria_count; j++) {
14941500
TrackableItem *crit = categories[i]->criteria[j];
14951501
crit->is_shared = false;
@@ -2624,8 +2630,7 @@ void tracker_events(Tracker *t, SDL_Event *event, bool *is_running, bool *settin
26242630
}
26252631

26262632
// Periodically recheck file changes
2627-
void tracker_update(Tracker *t, float *deltaTime, const AppSettings *settings) {
2628-
(void) deltaTime;
2633+
void tracker_update(Tracker *t, const AppSettings *settings) {
26292634

26302635
// Detect if the world has changed since the last update.
26312636
if (t->template_data->last_known_world_name[0] == '\0' || // Handle first-time load

source/tracker.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,9 @@ void tracker_events(Tracker *t, SDL_Event *event, bool *is_running, bool *settin
212212
* In the future, it could be used for animations or periodic data refreshing.
213213
*
214214
* @param t A pointer to the Tracker struct.
215-
* @param deltaTime A pointer to the frame's delta time, for future use in animations.
216215
* @param settings A pointer to the loaded application settings.
217216
*/
218-
void tracker_update(Tracker *t, float *deltaTime, const AppSettings *settings);
217+
void tracker_update(Tracker *t, const AppSettings *settings);
219218

220219
/**
221220
* @brief Renders the tracker window's contents.

0 commit comments

Comments
 (0)