pub fn query(&self, state:ButtonState) -> color::Lcha {
        match (state.visible, state.toggled, state.hovered, state.pressed) {
            ( false , _    , _    , _     ) => color::Lcha::transparent(),
            ( true  , false, false, false ) => self.non_toggled(),
            ( true  , false, false, true  ) => self.pressed(),
            ( true  , false, true , false ) => self.hovered(),
            ( true  , false, true , true  ) => self.pressed(),
            ( true  , true , false, false ) => self.toggled(),
            ( true  , true , false, true  ) => self.toggled_pressed(),
            ( true  , true , true , false ) => self.toggled_hovered(),
            ( true  , true , true , true  ) => self.toggled_pressed(),
        }
    }
/// Query the scheme based on the button state.
Query the scheme based on the button state.
Query the scheme based on the button state .
pub fn query(&self, state:ButtonState) -> color::Lcha {
        match (state.visible, state.toggled, state.hovered, state.pressed) {
            ( false , _    , _    , _     ) => color::Lcha::transparent(),
            ( true  , false, false, false ) => self.non_toggled(),
            ( true  , false, false, true  ) => self.pressed(),
            ( true  , false, true , false ) => self.hovered(),
            ( true  , false, true , true  ) => self.pressed(),
            ( true  , true , false, false ) => self.toggled(),
            ( true  , true , false, true  ) => self.toggled_pressed(),
            ( true  , true , true , false ) => self.toggled_hovered(),
            ( true  , true , true , true  ) => self.toggled_pressed(),
        }
    }
pub fn query ( & self , state : ButtonState ) -> color :: Lcha { match ( state . visible , state . toggled , state . hovered , state . pressed ) { ( false , _ , _ , _ ) => color :: Lcha :: transparent ( ) , ( true , false , false , false ) => self . non_toggled ( ) , ( true , false , false , true ) => self . pressed ( ) , ( true , false , true , false ) => self . hovered ( ) , ( true , false , true , true ) => self . pressed ( ) , ( true , true , false , false ) => self . toggled ( ) , ( true , true , false , true ) => self . toggled_pressed ( ) , ( true , true , true , false ) => self . toggled_hovered ( ) , ( true , true , true , true ) => self . toggled_pressed ( ) , } }
Query the scheme based on the button state.
Query the scheme based on the button state .
&self
state
ButtonState
&self
state
ButtonState