pub fn update_state(&self, state: &mut key_value::State, timer: &Snapshot<'_>) {
        let (chance, is_live) = pb_chance::for_timer(timer);

        state.background = self.settings.background;
        state.key_color = self.settings.label_color;
        state.value_color = self.settings.value_color;
        state.semantic_color = Default::default();

        state.key.clear();
        state.key.push_str(self.name());

        state.value.clear();
        let _ = write!(state.value, "{:.1}%", 100.0 * chance);

        state.key_abbreviations.clear();
        state.display_two_rows = self.settings.display_two_rows;
        state.updates_frequently = is_live;
    }
/// Updates the component's state based on the timer provided.
Updates the component's state based on the timer provided.
Updates the component ' s state based on the timer provided .
pub fn update_state(&self, state: &mut key_value::State, timer: &Snapshot<'_>) {
        let (chance, is_live) = pb_chance::for_timer(timer);
        state.background = self.settings.background;
        state.key_color = self.settings.label_color;
        state.value_color = self.settings.value_color;
        state.semantic_color = Default::default();
        state.key.clear();
        state.key.push_str(self.name());
        state.value.clear();
        let _ = write!(state.value, "{:.1}%", 100.0 * chance);
        state.key_abbreviations.clear();
        state.display_two_rows = self.settings.display_two_rows;
        state.updates_frequently = is_live;
    }
pub fn update_state ( & self , state : & mut key_value :: State , timer : & Snapshot < ' _ > ) { let ( chance , is_live ) = pb_chance :: for_timer ( timer ) ; state . background = self . settings . background ; state . key_color = self . settings . label_color ; state . value_color = self . settings . value_color ; state . semantic_color = Default :: default ( ) ; state . key . clear ( ) ; state . key . push_str ( self . name ( ) ) ; state . value . clear ( ) ; let _ = write ! ( state value " " 100.0 chance ) ; state . key_abbreviations . clear ( ) ; state . display_two_rows = self . settings . display_two_rows ; state . updates_frequently = is_live ; }
Updates the component's state based on the timer provided.
Updates the component ' s state based on the timer provided .
&self
state
&mut key_value::State
timer
&Snapshot<'_>
&self
state
&mut key_value::State
timer
&Snapshot<'_>