Panels: make Side
and TopBottomSide
public
Closes https://github.com/emilk/egui/issues/799
This commit is contained in:
parent
6f699b3391
commit
ef218e8ba8
1 changed files with 4 additions and 4 deletions
|
@ -27,7 +27,7 @@ struct PanelState {
|
||||||
|
|
||||||
/// `Left` or `Right`
|
/// `Left` or `Right`
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||||
enum Side {
|
pub enum Side {
|
||||||
Left,
|
Left,
|
||||||
Right,
|
Right,
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ impl SidePanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `id_source`: Something unique, e.g. `"my_panel"`.
|
/// `id_source`: Something unique, e.g. `"my_panel"`.
|
||||||
fn new(side: Side, id_source: impl std::hash::Hash) -> Self {
|
pub fn new(side: Side, id_source: impl std::hash::Hash) -> Self {
|
||||||
Self {
|
Self {
|
||||||
side,
|
side,
|
||||||
id: Id::new(id_source),
|
id: Id::new(id_source),
|
||||||
|
@ -303,7 +303,7 @@ impl SidePanel {
|
||||||
|
|
||||||
/// `Top` or `Bottom`
|
/// `Top` or `Bottom`
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||||
enum TopBottomSide {
|
pub enum TopBottomSide {
|
||||||
Top,
|
Top,
|
||||||
Bottom,
|
Bottom,
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ impl TopBottomPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `id_source`: Something unique, e.g. `"my_panel"`.
|
/// `id_source`: Something unique, e.g. `"my_panel"`.
|
||||||
fn new(side: TopBottomSide, id_source: impl std::hash::Hash) -> Self {
|
pub fn new(side: TopBottomSide, id_source: impl std::hash::Hash) -> Self {
|
||||||
Self {
|
Self {
|
||||||
side,
|
side,
|
||||||
id: Id::new(id_source),
|
id: Id::new(id_source),
|
||||||
|
|
Loading…
Reference in a new issue