/dports/games/abstreet/abstreet-0.2.9-49-g74aca40c0/widgetry/src/ |
H A D | screen_geom.rs | 7 pub struct ScreenPt { struct 12 impl ScreenPt { implementation 13 pub fn new(x: f64, y: f64) -> ScreenPt { in new() argument 14 ScreenPt { x, y } in new() 24 impl From<winit::dpi::LogicalPosition<f64>> for ScreenPt { implementation 25 fn from(lp: winit::dpi::LogicalPosition<f64>) -> ScreenPt { in from() argument 26 ScreenPt { x: lp.x, y: lp.y } in from() 58 pub fn contains(&self, pt: ScreenPt) -> bool { in contains() 72 pub fn percent_to_pt(&self, x: f64, y: f64) -> ScreenPt { in percent_to_pt() argument 89 pub fn center(&self) -> ScreenPt { in center() argument [all …]
|
H A D | canvas.rs | 23 pub(crate) cursor: ScreenPt, 27 pub(crate) drag_canvas_from: Option<(ScreenPt, ScreenPt)>, 56 cursor: ScreenPt::new(0.0, 0.0), in new() 178 fn zoom(&mut self, delta: f64, focus: ScreenPt) { in zoom() argument 202 pub fn get_cursor(&self) -> ScreenPt { in get_cursor() argument 230 pub fn screen_to_map(&self, pt: ScreenPt) -> Pt2D { in screen_to_map() 237 pub fn center_to_screen_pt(&self) -> ScreenPt { in center_to_screen_pt() argument 251 ScreenPt::new( in map_to_screen() 262 ScreenPt::new( in get_inner_bounds() 319 ) -> ScreenPt { in align_window() argument [all …]
|
H A D | drawing.rs | 4 Canvas, Color, Drawable, GeomBatch, ScreenDims, ScreenPt, ScreenRectangle, Style, Text, 81 top_left_screen: ScreenPt, in fork() argument 131 pub fn redraw_at(&mut self, top_left: ScreenPt, obj: &Drawable) { in redraw_at() argument 160 ScreenPt::new(self.canvas.cursor.x, self.canvas.cursor.y + 20.0), in draw_mouse_tooltip() 190 pub fn screen_to_map(&self, pt: ScreenPt) -> Pt2D { in screen_to_map()
|
H A D | input.rs | 1 use crate::{hotkey, Canvas, Event, Key, MultiKey, ScreenPt}; 88 pub fn get_moved_mouse(&self) -> Option<ScreenPt> { in get_moved_mouse() argument
|
H A D | event_ctx.rs | 3 ScreenPt, Style, Text, UserInput, 183 ScreenPt::new(0.1 * g.canvas.window_width, 0.1 * g.canvas.window_height), in redraw()
|
/dports/games/abstreet/abstreet-0.2.9-49-g74aca40c0/widgetry/src/widgets/ |
H A D | just_draw.rs | 11 pub top_left: ScreenPt, 20 top_left: ScreenPt::new(0.0, 0.0), in wrap() 30 top_left: ScreenPt::new(0.0, 0.0), in svg() 40 top_left: ScreenPt::new(0.0, 0.0), in svg_transform() 50 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument 66 top_left: ScreenPt, 79 top_left: ScreenPt::new(0.0, 0.0), in new() 92 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument 125 pub top_left: ScreenPt, 134 top_left: ScreenPt::new(0.0, 0.0), in new() [all …]
|
H A D | filler.rs | 1 use crate::{EventCtx, GfxCtx, ScreenDims, ScreenPt, Widget, WidgetImpl, WidgetOutput}; 6 top_left: ScreenPt, 20 top_left: ScreenPt::new(0.0, 0.0), in square_width() 31 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | spinner.rs | 2 text, Btn, Button, EventCtx, GeomBatch, GfxCtx, Line, Outcome, ScreenDims, ScreenPt, 21 top_left: ScreenPt, 47 top_left: ScreenPt::new(0.0, 0.0), in new() 58 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument 63 .set_pos(ScreenPt::new(top_left.x + TEXT_WIDTH, top_left.y)); in set_pos() 64 self.down.set_pos(ScreenPt::new( in set_pos()
|
H A D | slider.rs | 2 Color, Drawable, EventCtx, GeomBatch, GfxCtx, ScreenDims, ScreenPt, ScreenRectangle, Widget, 18 top_left: ScreenPt, 42 top_left: ScreenPt::new(0.0, 0.0), in horizontal() 61 top_left: ScreenPt::new(0.0, 0.0), in vertical() 203 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument 231 top_left: ScreenPt, 245 top_left: ScreenPt::new(0.0, 0.0), in new() 370 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | containers.rs | 1 use crate::{EventCtx, GfxCtx, Outcome, ScreenDims, ScreenPt, Widget, WidgetImpl, WidgetOutput}; 10 fn set_pos(&mut self, _top_left: ScreenPt) { in set_pos() argument 45 fn set_pos(&mut self, _top_left: ScreenPt) { in set_pos() argument
|
H A D | text_box.rs | 2 text, EventCtx, GeomBatch, GfxCtx, Key, Line, Outcome, ScreenDims, ScreenPt, ScreenRectangle, 16 top_left: ScreenPt, 29 top_left: ScreenPt::new(0.0, 0.0), in new() 62 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | persistent_split.rs | 3 ScreenDims, ScreenPt, Widget, WidgetImpl, WidgetOutput, 62 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument 65 .set_pos(ScreenPt::new(top_left.x + self.btn.dims.width, top_left.y)); in set_pos() 66 self.dropdown.set_pos(ScreenPt::new( in set_pos()
|
H A D | dropdown.rs | 2 Btn, Button, Choice, Color, EventCtx, GeomBatch, GfxCtx, Menu, Outcome, ScreenDims, ScreenPt, 70 menu.set_pos(ScreenPt::new( in open_menu() 88 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument 147 ScreenPt::new(m.top_left.x - pad, m.top_left.y - pad), in draw()
|
H A D | menu.rs | 2 text, Choice, EventCtx, GfxCtx, Key, Line, Outcome, ScreenDims, ScreenPt, ScreenRectangle, 11 pub(crate) top_left: ScreenPt, 21 top_left: ScreenPt::new(0.0, 0.0), in new() 75 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | compare_times.rs | 2 Color, Drawable, EventCtx, GeomBatch, GfxCtx, JustDraw, Line, ScreenDims, ScreenPt, 19 top_left: ScreenPt, 91 top_left: ScreenPt::new(0.0, 0.0), in new() 139 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | scatter_plot.rs | 4 ScreenPt, Series, Text, TextExt, Widget, WidgetImpl, WidgetOutput, 12 top_left: ScreenPt, 142 top_left: ScreenPt::new(0.0, 0.0), in new() 185 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | autocomplete.rs | 2 Choice, EventCtx, GfxCtx, Menu, Outcome, ScreenDims, ScreenPt, TextBox, Widget, WidgetImpl, 81 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument 83 self.menu.set_pos(ScreenPt::new( in set_pos()
|
H A D | fan_chart.rs | 4 ScreenPt, Series, Text, TextExt, Widget, WidgetImpl, WidgetOutput, 15 top_left: ScreenPt, 143 top_left: ScreenPt::new(0.0, 0.0), in new() 186 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | button.rs | 3 ScreenDims, ScreenPt, Text, Widget, WidgetImpl, WidgetOutput, 22 pub(crate) top_left: ScreenPt, 55 top_left: ScreenPt::new(0.0, 0.0), in new() 67 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | line_plot.rs | 2 Checkbox, Color, Drawable, EventCtx, GeomBatch, GfxCtx, JustDraw, Line, ScreenDims, ScreenPt, 20 top_left: ScreenPt, 164 top_left: ScreenPt::new(0.0, 0.0), in new() 207 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | mod.rs | 23 Menu, RewriteColor, ScreenDims, ScreenPt, ScreenRectangle, TextBox, 41 fn set_pos(&mut self, top_left: ScreenPt); in set_pos() argument 449 g.redraw_at(ScreenPt::new(self.rect.x1, self.rect.y1), bg); in draw() 504 ScreenPt::new(x, y) in apply_flexbox() 506 ScreenPt::new(x + dx - scroll_offset.0, y + dy - scroll_offset.1) in apply_flexbox()
|
H A D | checkbox.rs | 3 ScreenDims, ScreenPt, Text, TextExt, TextSpan, Widget, WidgetImpl, WidgetOutput, 193 fn set_pos(&mut self, top_left: ScreenPt) { in set_pos() argument
|
H A D | panel.rs | 3 Menu, Outcome, PersistentSplit, ScreenDims, ScreenPt, ScreenRectangle, Slider, Spinner, 301 pub fn center_of(&self, name: &str) -> ScreenPt { in center_of() argument 304 pub fn center_of_panel(&self) -> ScreenPt { in center_of_panel() argument
|
/dports/games/abstreet/abstreet-0.2.9-49-g74aca40c0/game/src/common/ |
H A D | minimap.rs | 9 Outcome, Panel, ScreenPt, Spinner, VerticalAlignment, Widget, 108 ScreenPt::new(0.0, 0.0), in event() 109 ScreenPt::new(ctx.canvas.window_width, ctx.canvas.window_height), in event() 264 ScreenPt::new(inner_rect.x1, inner_rect.y1), in draw() 300 let pt = g.canvas.screen_to_map(ScreenPt::new(0.0, 0.0)); in draw() 306 .screen_to_map(ScreenPt::new(g.canvas.window_width, g.canvas.window_height)); in draw()
|
H A D | city_picker.rs | 8 hotkey, Btn, Color, EventCtx, GeomBatch, GfxCtx, Key, Line, Outcome, Panel, ScreenPt, Text, 177 ScreenPt::new(rect.x1, rect.y1), in draw()
|