fully update status after bl_flush or window resize */
| 2038 | |
| 2039 | /* fully update status after bl_flush or window resize */ |
| 2040 | static void |
| 2041 | update_fancy_status(boolean force_update) |
| 2042 | { |
| 2043 | static boolean old_showtime, old_showexp, old_showscore, old_showvers; |
| 2044 | static int old_upolyd = -1; /* -1: force first time update */ |
| 2045 | int i; |
| 2046 | |
| 2047 | if (force_update |
| 2048 | || Upolyd != old_upolyd /* Xp vs HD */ |
| 2049 | || flags.time != old_showtime |
| 2050 | || flags.showexp != old_showexp |
| 2051 | || flags.showscore != old_showscore |
| 2052 | || flags.showvers != old_showvers) { |
| 2053 | /* update everything; usually only need this on the very first |
| 2054 | time, then later if the window gets resized or if poly/unpoly |
| 2055 | triggers Xp <-> HD switch or if an optional field gets |
| 2056 | toggled off since there won't be a status_update() call for |
| 2057 | the no longer displayed field; we're a bit more conservative |
| 2058 | than that and do this when toggling on as well as off */ |
| 2059 | for (i = 0; i < NUM_STATS; i++) |
| 2060 | update_fancy_status_field(i, NO_COLOR, HL_UNDEF); |
| 2061 | old_condition_bits = X11_condition_bits; |
| 2062 | |
| 2063 | old_upolyd = Upolyd; |
| 2064 | old_showtime = flags.time; |
| 2065 | old_showexp = flags.showexp; |
| 2066 | old_showscore = flags.showscore; |
| 2067 | old_showvers = flags.showvers; |
| 2068 | } |
| 2069 | } |
| 2070 | |
| 2071 | /* |
| 2072 | * Turn off hilighted status values after a certain amount of turns. |
no test coverage detected