Settings menu with sound and music volume sliders, re-enabled deselecting connectionpanels with E in editmapscreen

This commit is contained in:
Regalis
2015-10-26 19:35:57 +02:00
parent ebe248a7cc
commit 9ed2963cd9
19 changed files with 223 additions and 72 deletions
+4 -2
View File
@@ -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);