fn button_internal(&mut self, text: &str, id: Id) -> (f32, f32, bool) {
        let width = self.style.comp_width;
        let height = self.default_height();
        let pos = self.caret;
        self.advance_caret(width, height);

        let hovered = self.mouse_pos.x > pos.x && self.mouse_pos.y > pos.y && 
                      self.mouse_pos.x < pos.x + width && self.mouse_pos.y < pos.y + height;
        if hovered && self.mouse_state.pressed() {
            self.held = Some(id);
        }

        let color = if self.held == Some(id) {
            self.style.hold_color
        } else if hovered {
            self.style.hover_color
        } else {
            self.style.base_color
        };

        let size = Vec2::new(width, height);

        quad(&mut self.draw_data, pos, size, color);
        text_in_quad(&mut self.font, self.style.font_size, pos, size, self.style.padding,
                     text, Alignment::Center, self.style.text_color);

        let pressed = self.held == Some(id) && hovered && self.mouse_state.released();
        (width, height, pressed)
    }
/// Internal version of the `button` method, which allows specifying a separate id for 
/// the button. This allows a button to be used as the "host" for another component.
///
/// Returns `(width, height, pressed)`.
///
/// The text passed to this function will be displayed on the button directly, without checking
/// for a "##" sequence.
Internal version of the `button` method, which allows specifying a separate id for
the button. This allows a button to be used as the "host" for another component.

Returns `(width, height, pressed)`.

The text passed to this function will be displayed on the button directly, without checking
for a "##" sequence.
Internal version of the ` button ` method which allows specifying a separate id for the button . This allows a button to be used as the " host " for another component . Returns ` ( width height pressed ) ` . The text passed to this function will be displayed on the button directly without checking for a " ## " sequence .
fn button_internal(&mut self, text: &str, id: Id) -> (f32, f32, bool) {
        let width = self.style.comp_width;
        let height = self.default_height();
        let pos = self.caret;
        self.advance_caret(width, height);
        let hovered = self.mouse_pos.x > pos.x && self.mouse_pos.y > pos.y && 
                      self.mouse_pos.x < pos.x + width && self.mouse_pos.y < pos.y + height;
        if hovered && self.mouse_state.pressed() {
            self.held = Some(id);
        }
        let color = if self.held == Some(id) {
            self.style.hold_color
        } else if hovered {
            self.style.hover_color
        } else {
            self.style.base_color
        };
        let size = Vec2::new(width, height);
        quad(&mut self.draw_data, pos, size, color);
        text_in_quad(&mut self.font, self.style.font_size, pos, size, self.style.padding,
                     text, Alignment::Center, self.style.text_color);
        let pressed = self.held == Some(id) && hovered && self.mouse_state.released();
        (width, height, pressed)
    }
fn button_internal ( & mut self , text : & str , id : Id ) -> ( f32 , f32 , bool ) { let width = self . style . comp_width ; let height = self . default_height ( ) ; let pos = self . caret ; self . advance_caret ( width , height ) ; let hovered = self . mouse_pos . x > pos . x && self . mouse_pos . y > pos . y && self . mouse_pos . x < pos . x + width && self . mouse_pos . y < pos . y + height ; if hovered && self . mouse_state . pressed ( ) { self . held = Some ( id ) ; } let color = if self . held == Some ( id ) { self . style . hold_color } else if hovered { self . style . hover_color } else { self . style . base_color } ; let size = Vec2 :: new ( width , height ) ; quad ( & mut self . draw_data , pos , size , color ) ; text_in_quad ( & mut self . font , self . style . font_size , pos , size , self . style . padding , text , Alignment :: Center , self . style . text_color ) ; let pressed = self . held == Some ( id ) && hovered && self . mouse_state . released ( ) ; ( width , height , pressed ) }
Internal version of the `button` method, which allows specifying a separate id for
the button.
Internal version of the ` button ` method which allows specifying a separate id for the button .
&mut self
text
&str
id
Id
&mut self
text
&str
id
Id