Hand scrolling moves scroll bars appropriately.

This commit is contained in:
2019-04-26 00:09:31 -05:00
parent 53000e6a6c
commit 1211cda508
2 changed files with 80 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using RecrownedAthenaeum.Input;
using RecrownedAthenaeum.Render;
using RecrownedAthenaeum.ScreenSystem;
using RecrownedAthenaeum.SpecialTypes;
@@ -23,7 +24,7 @@ namespace TestGame
Texture2D logo;
Image logoImage;
Skin skin;
public TestGame()
{
graphics = new GraphicsDeviceManager(this);
@@ -67,6 +68,7 @@ namespace TestGame
logoImage = new Image(logo);
uIScrollable.AddModules(logoImage);
InputUtilities.InputListeners.Add(uIScrollable);
// TODO: use this.Content to load your game content here
}
@@ -86,6 +88,7 @@ namespace TestGame
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Update(GameTime gameTime)
{
InputUtilities.Update();
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
uIScrollable.Update(gameTime);