Compare commits
1 commit
b19aa9eaaf
...
9089df1e67
Author | SHA1 | Date | |
---|---|---|---|
9089df1e67 |
4 changed files with 14 additions and 24 deletions
|
@ -35,7 +35,6 @@ pub struct NeighbourInfo {
|
|||
pub id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ButtonInfo {
|
||||
// global unique id, if set
|
||||
pub id: String,
|
||||
|
|
|
@ -69,12 +69,3 @@ impl<T: Copy + Send + Sync> Mandatory<T> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Send + Sync + std::fmt::Debug> std::fmt::Debug for Mandatory<T> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("Mandatory")
|
||||
.field("value", &self.value)
|
||||
.field("modified", &self.modified)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -581,9 +581,9 @@ impl Grid {
|
|||
dim: (usize, usize),
|
||||
) -> Result<bool> {
|
||||
match Self::search_neighbour_in_direction(grid, pos, (0, 1), dim) {
|
||||
Some(neighbour) => {
|
||||
current_child.set_south_neighbour(Some(&neighbour));
|
||||
neighbour.set_north_neighbour(Some(current_child));
|
||||
Some(north_neighbour) => {
|
||||
current_child.set_south_neighbour(Some(&north_neighbour));
|
||||
north_neighbour.set_north_neighbour(Some(current_child));
|
||||
|
||||
Ok(true)
|
||||
}
|
||||
|
@ -599,9 +599,9 @@ impl Grid {
|
|||
dim: (usize, usize),
|
||||
) -> Result<bool> {
|
||||
match Self::search_neighbour_in_direction(grid, pos, (0, -1), dim) {
|
||||
Some(neighbour) => {
|
||||
current_child.set_north_neighbour(Some(&neighbour));
|
||||
neighbour.set_south_neighbour(Some(current_child));
|
||||
Some(north_neighbour) => {
|
||||
current_child.set_north_neighbour(Some(&north_neighbour));
|
||||
north_neighbour.set_south_neighbour(Some(current_child));
|
||||
|
||||
Ok(true)
|
||||
}
|
||||
|
@ -617,9 +617,9 @@ impl Grid {
|
|||
dim: (usize, usize),
|
||||
) -> Result<bool> {
|
||||
match Self::search_neighbour_in_direction(grid, pos, (1, 0), dim) {
|
||||
Some(neighbour) => {
|
||||
current_child.set_east_neighbour(Some(&neighbour));
|
||||
neighbour.set_west_neighbour(Some(current_child));
|
||||
Some(north_neighbour) => {
|
||||
current_child.set_east_neighbour(Some(&north_neighbour));
|
||||
north_neighbour.set_west_neighbour(Some(current_child));
|
||||
|
||||
Ok(true)
|
||||
}
|
||||
|
@ -635,9 +635,9 @@ impl Grid {
|
|||
dim: (usize, usize),
|
||||
) -> Result<bool> {
|
||||
match Self::search_neighbour_in_direction(grid, pos, (-1, 0), dim) {
|
||||
Some(neighbour) => {
|
||||
current_child.set_west_neighbour(Some(&neighbour));
|
||||
neighbour.set_east_neighbour(Some(current_child));
|
||||
Some(north_neighbour) => {
|
||||
current_child.set_west_neighbour(Some(&north_neighbour));
|
||||
north_neighbour.set_east_neighbour(Some(current_child));
|
||||
|
||||
Ok(true)
|
||||
}
|
||||
|
|
|
@ -735,7 +735,7 @@ impl GuiHandler {
|
|||
Ok(false)
|
||||
}
|
||||
|
||||
pub fn current_selectable(&self) -> Result<Option<Arc<Selectable>>> {
|
||||
fn current_selectable(&self) -> Result<Option<Arc<Selectable>>> {
|
||||
match self.current_selectable.read().unwrap().as_ref() {
|
||||
Some(selectable) => Ok(Some(selectable.clone())),
|
||||
None => Ok(None),
|
||||
|
@ -1268,7 +1268,7 @@ impl GuiHandler {
|
|||
}
|
||||
}
|
||||
|
||||
// private - create rendering stuff
|
||||
// private
|
||||
impl GuiHandler {
|
||||
fn create_render_targets(
|
||||
device: &Arc<Device>,
|
||||
|
|
Loading…
Reference in a new issue