Settings menu with sound and music volume sliders, re-enabled deselecting connectionpanels with E in editmapscreen
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Barotrauma
|
||||
|
||||
private bool enabled;
|
||||
|
||||
public delegate bool OnMovedHandler(object obj);
|
||||
public delegate bool OnMovedHandler(float barScroll);
|
||||
public OnMovedHandler OnMoved;
|
||||
|
||||
public bool IsHorizontal
|
||||
@@ -95,6 +95,8 @@ namespace Barotrauma
|
||||
|
||||
//System.Diagnostics.Debug.WriteLine(frame.rect);
|
||||
|
||||
this.barSize = barSize;
|
||||
|
||||
bar = new GUIButton(new Rectangle(0, 0, 0, 0), "", color, style, this);
|
||||
|
||||
bar.OnPressed = SelectBar;
|
||||
@@ -172,7 +174,7 @@ namespace Barotrauma
|
||||
barScroll = (float)newY / ((float)frame.Rect.Height - (float)bar.Rect.Height);
|
||||
}
|
||||
|
||||
if (moveAmount != 0 && OnMoved != null) OnMoved(moveAmount);
|
||||
if (moveAmount != 0 && OnMoved != null) OnMoved(barScroll);
|
||||
|
||||
bar.Rect = new Rectangle(newX + frame.Rect.X, newY + frame.Rect.Y, bar.Rect.Width, bar.Rect.Height);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user