mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 15:20:05 -04:00
Rename fn scroll2 to fn scroll (#4282)
This commit is contained in:
@@ -337,6 +337,16 @@ impl ScrollArea {
|
||||
}
|
||||
|
||||
/// Turn on/off scrolling on the horizontal/vertical axes.
|
||||
///
|
||||
/// You can pass in `false`, `true`, `[false, true]` etc.
|
||||
#[inline]
|
||||
pub fn scroll(mut self, scroll_enabled: impl Into<Vec2b>) -> Self {
|
||||
self.scroll_enabled = scroll_enabled.into();
|
||||
self
|
||||
}
|
||||
|
||||
/// Turn on/off scrolling on the horizontal/vertical axes.
|
||||
#[deprecated = "Renamed to `scroll`"]
|
||||
#[inline]
|
||||
pub fn scroll2(mut self, scroll_enabled: impl Into<Vec2b>) -> Self {
|
||||
self.scroll_enabled = scroll_enabled.into();
|
||||
|
||||
@@ -328,9 +328,19 @@ impl<'open> Window<'open> {
|
||||
}
|
||||
|
||||
/// Enable/disable horizontal/vertical scrolling. `false` by default.
|
||||
///
|
||||
/// You can pass in `false`, `true`, `[false, true]` etc.
|
||||
#[inline]
|
||||
pub fn scroll(mut self, scroll: impl Into<Vec2b>) -> Self {
|
||||
self.scroll = self.scroll.scroll(scroll);
|
||||
self
|
||||
}
|
||||
|
||||
/// Enable/disable horizontal/vertical scrolling. `false` by default.
|
||||
#[deprecated = "Renamed to `scroll`"]
|
||||
#[inline]
|
||||
pub fn scroll2(mut self, scroll: impl Into<Vec2b>) -> Self {
|
||||
self.scroll = self.scroll.scroll2(scroll);
|
||||
self.scroll = self.scroll.scroll(scroll);
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user