Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions djmaxplus/src/components/config_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl ConfigEditor {
[
lanecover.position()[0]
- lanecover.size()[0] * lanecover.position_pivot()[0],
lanecover.size()[1],
lanecover.position()[1],
],
Condition::Always,
)
Expand All @@ -279,7 +279,7 @@ impl ConfigEditor {
[
lanecover.position()[0]
+ lanecover.size()[0] * (1. - lanecover.position_pivot()[0]),
lanecover.size()[1],
lanecover.position()[1],
],
Condition::Always,
)
Expand Down
16 changes: 8 additions & 8 deletions djmaxplus/src/components/lanecover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,21 @@ impl Lanecover {
}
}
.floor(),
0.,
(runtime.viewport_height()
* (config.lanecover_configs[self.config_index].sub_length as f32 / 1000.)
* 0.7)
.floor(),
];

self.position_pivot = match config.lane_direction {
LaneDirection::Left => &[0., 0.],
LaneDirection::Center => &[0.5, 0.],
LaneDirection::Right => &[1., 0.],
LaneDirection::Left => &[0., 1.],
LaneDirection::Center => &[0.5, 1.],
LaneDirection::Right => &[1., 1.],
};

self.size = [
runtime.viewport_effective_width() / 4.,
(runtime.viewport_height()
* (config.lanecover_configs[self.config_index].sub_length as f32 / 1000.)
* 0.7)
.floor(),
(runtime.viewport_height() * 0.7).ceil(),
];

self.should_update_metrics = false;
Expand Down