* Turn off hilighted status values after a certain amount of turns. */
| 2072 | * Turn off hilighted status values after a certain amount of turns. |
| 2073 | */ |
| 2074 | void |
| 2075 | check_turn_events(void) |
| 2076 | { |
| 2077 | int i; |
| 2078 | struct X_status_value *sv; |
| 2079 | int hilight_time = 1; |
| 2080 | |
| 2081 | #ifdef STATUS_HILITES |
| 2082 | if (iflags.hilite_delta) |
| 2083 | hilight_time = (int) iflags.hilite_delta; |
| 2084 | #endif |
| 2085 | for (sv = shown_stats, i = 0; i < NUM_STATS; i++, sv++) { |
| 2086 | if (!sv->set) |
| 2087 | continue; |
| 2088 | |
| 2089 | if (sv->turn_count++ >= hilight_time) { |
| 2090 | /* unhighlights by toggling a highlighted item back off again, |
| 2091 | unless forced inverted by a status_hilite rule */ |
| 2092 | if (!sv->inverted_hilite) { |
| 2093 | if (sv->type == SV_VALUE) |
| 2094 | hilight_value(sv->w); |
| 2095 | else |
| 2096 | hilight_label(sv->w); |
| 2097 | } |
| 2098 | sv->set = FALSE; |
| 2099 | } |
| 2100 | } |
| 2101 | } |
| 2102 | |
| 2103 | /* Initialize alternate status ============================================ */ |
| 2104 |
no test coverage detected