diff --git a/RecrownedAthenaeum/UI/Modular/Modules/UIScrollable.cs b/RecrownedAthenaeum/UI/Modular/Modules/UIScrollable.cs
index db847c2..0d03bef 100644
--- a/RecrownedAthenaeum/UI/Modular/Modules/UIScrollable.cs
+++ b/RecrownedAthenaeum/UI/Modular/Modules/UIScrollable.cs
@@ -19,8 +19,8 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
Rectangle viewport;
UIModuleGroup group;
- Color scrollBarColor;
- float opacityOfBar = 1;
+ Color scrollBarColor = Color.White;
+ float opacityOfBar = 1f;
bool showingBars;
private bool mouseWasPressed;
private bool horizontalSelected;
@@ -59,7 +59,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
value = Height - verticalScrollBarBounds.Height;
}
if (value < 0) value = 0;
- shiftY = -(group.Height - viewport.Height) * (value/(Height - verticalScrollBarBounds.Height));
+ shiftY = -(group.Height - viewport.Height) * (value / (Height - verticalScrollBarBounds.Height));
HeightOrYChange(true);
}
}
@@ -78,6 +78,10 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
ISpecialDrawable background, horizontalBarTrack, verticalBarTrack;
private int topPadding, bottomPadding, leftPadding, rightPadding;
+
+ ///
+ ///
+ ///
public int PadTop { get { return topPadding; } set { topPadding = value; HeightOrYChange(); } }
public int PadBottom { get { return bottomPadding; } set { bottomPadding = value; HeightOrYChange(); } }
public int PadLeft { get { return leftPadding; } set { leftPadding = value; WidthOrXChange(); } }
@@ -91,6 +95,8 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
public int HorizontalBarThickness { get { return horizontalScrollBarBounds.Height; } set { horizontalScrollBarBounds.Height = value; HeightOrYChange(); } }
public int VerticalBarThickness { get { return verticalScrollBarBounds.Width; } set { verticalScrollBarBounds.Width = value; WidthOrXChange(); } }
+ bool hideScrollBars;
+
///
/// Whether or not to hide scroll bars.
///
@@ -105,11 +111,11 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
if (!value)
{
opacityOfBar = 1f;
+ scrollBarColor = color * opacityOfBar;
}
}
}
- bool hideScrollBars = true;
///
/// Set to true to change from the normal position to the new position.
@@ -201,14 +207,13 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
if (opacityOfBar > 0f)
{
opacityOfBar -= (barFadeSpeed / 255f) * (float)gameTime.ElapsedGameTime.TotalSeconds;
- scrollBarColor = color * opacityOfBar;
}
}
else
{
opacityOfBar = 1f;
- scrollBarColor = color * opacityOfBar;
}
+ scrollBarColor = color * opacityOfBar;
}
if (horScrollAvailable)
diff --git a/TestGame/TestGame.cs b/TestGame/TestGame.cs
index 7b76ad3..c5ab113 100644
--- a/TestGame/TestGame.cs
+++ b/TestGame/TestGame.cs
@@ -64,7 +64,6 @@ namespace TestGame
uIScrollable = new UIScrollable(skin);
uIScrollable.Width = 256;
uIScrollable.Height = 256;
- uIScrollable.HideScrollBars = true;
logoImage = new Image(logo);
uIScrollable.AddModules(logoImage);