Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeymanboy committed Jun 21, 2019
1 parent 0846c50 commit c8a82ce
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions BeatSaberCampaignCreator/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,29 @@ private void setState(MapState newState)
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
if (updatingCampaign) return;
int dist = (int)numericUpDown1.Value - campaign.info.mapHeight;
UpdateMapHeight((int)numericUpDown1.Value);
MoveEverything(dist);
}
public void UpdateMapHeight(int height)
{
campaign.info.mapHeight = height;
mapArea.Height = height;
}
public void MoveEverything(int dist)
{
foreach(Control control in mapArea.Controls)
{
if (control is GateButton)
{
(control as GateButton).SetPosition(new Point(control.Location.X, control.Location.Y + dist));
}
if (control is NodeButton)
{
(control as NodeButton).SetPosition(new Point(control.Location.X, control.Location.Y + dist));
}
}
}

Pen pen = new Pen(Brushes.Red, 5);

Expand Down

0 comments on commit c8a82ce

Please sign in to comment.