Struct conrod::XYPad
[−]
[src]
pub struct XYPad<'a, X, Y, F> { // some fields omitted }
Used for displaying and controlling a 2D point on a cartesian plane within a given range. Its reaction is triggered when the value is updated or if the mouse button is released while the cursor is above the rectangle.
Methods
impl<'a, X, Y, F> XYPad<'a, X, Y, F>
fn new(x_val: X, min_x: X, max_x: X, y_val: Y, min_y: Y, max_y: Y) -> XYPad<'a, X, Y, F>
Construct a new XYPad widget.
fn line_width(self, width: f64) -> XYPad<'a, X, Y, F>
Set the width of the XYPad's crosshair lines.
fn value_font_size(self, size: FontSize) -> XYPad<'a, X, Y, F>
Set the font size for the displayed crosshair value.
fn react(self, reaction: F) -> Self
Set the reaction for the XYPad. It will be triggered when the value is updated or if the mouse button is released while the cursor is above the rectangle.
fn set<C>(self, ui_id: UiId, ui: &mut Ui<C>) where C: CharacterCache, F: FnMut(X, Y), X: Float + NumCast + ToString, Y: Float + NumCast + ToString
After building the Button, use this method to set its current state into the given Ui
.
It will use this state for rendering the next time ui.draw(graphics)
is called.