Skip to content

Commit e9d0ac2

Browse files
committed
Added Keyboard.Main
Added Mouse.Main
1 parent 3185f77 commit e9d0ac2

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

Engines/FlatRedBallXNA/FlatRedBall/Audio/SoundEffectPlayInfo.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public struct SoundEffectPlayInfo
1515
public SoundEffect SoundEffect;
1616
public double LastPlayTime;
1717

18-
1918
}
19+
20+
//public struct SoundEffectInstancePlayInfo
21+
//{
22+
// public SoundEffectInstance SoundEffect;
23+
// public double LastPlayTime;
24+
25+
//}
26+
2027
}

Engines/FlatRedBallXNA/FlatRedBall/Input/Keyboard.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public IReadOnlyCollection<Microsoft.Xna.Framework.Input.Keys> KeysTyped
7474
}
7575
}
7676

77+
/// <summary>
78+
/// The main keyboard for the game.
79+
/// </summary>
80+
public static Keyboard Main => InputManager.Keyboard;
7781

7882
#endregion
7983

Engines/FlatRedBallXNA/FlatRedBall/Input/Mouse.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ public PositionedObject GrabbedPositionedObject
139139

140140
DelegateBased1DInput scrollWheel;
141141

142+
/// <summary>
143+
/// A 1D Input for the scroll wheel, where scroll wheel values will be normalized to be between -1 and 1 per wheel "tick".
144+
/// </summary>
142145
public I1DInput ScrollWheel
143146
{
144147
get
@@ -168,6 +171,10 @@ public float ScrollWheelChange
168171
}
169172
}
170173

174+
/// <summary>
175+
/// The main mouse for the game.
176+
/// </summary>
177+
public static Mouse Main => InputManager.Mouse;
171178

172179
#if !MONOGAME && !FNA
173180
public bool IsOwnerFocused

Engines/FlatRedBallXNA/FlatRedBall/TimeManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ struct VoidTaskResult { }
8080
/// The amount of time in seconds since the game started running.
8181
/// This value is updated once-per-frame so it will
8282
/// always be the same value until the next frame is called.
83-
/// This value does not consider pausing. To consider pausing, see CurrentScreenTime.
83+
/// This value does not consider pausing, and it does not reset when
84+
/// a new screen starts. To consider pausing, see CurrentScreenTime.
8485
/// </summary>
8586
/// <remarks>
8687
/// This value can be used to uniquely identify a frame.

FRBDK/Glue/Glue/Content/ContentTypes.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,4 @@ Camera,TRUE,QualifiedType = FlatRedBall.Camera,,,,,,,,,,,,,,FALSE,,,"Name=X, Typ
221221
Effect (.fx),,QualifiedType = Microsoft.Xna.Framework.Graphics.Effect,,fx,,,,,,,,,,,,FALSE,,,,FALSE,,,,,TRUE,FALSE,,FALSE,FALSE,,EffectImporter,EffectProcessor,FALSE,,
222222
Video (.wmv),,QualifiedType = Microsoft.Xna.Framework.Media.Video,,wmv,,,,,,,,,,,,FALSE,,,,FALSE,,,,,FALSE,FALSE,,FALSE,FALSE,,WmvImporter,VideoProcessor,FALSE,,
223223
XactProject (.xap),,,,xap,,,,,,,,,,,,FALSE,,,,FALSE,,,,,FALSE,FALSE,,FALSE,FALSE,,XactImporter,XactProcessor,FALSE,,
224-
SoundEffectInstance (.wav),TRUE,QualifiedType = Microsoft.Xna.Framework.Audio.SoundEffectInstance,,wav,,,,,,,"{THIS} = FlatRedBall.FlatRedBallServices.Load<Microsoft.Xna.Framework.Audio.SoundEffect>(@""{FILE_NAME}"", {CONTENT_MANAGER_NAME}).CreateInstance();",,,if(this.IsDisposed == false) { this.Stop(); this.Dispose(); },,FALSE,,,,,,,,,TRUE,FALSE,,FALSE,FALSE,,,,FALSE,,
224+
SoundEffectInstance (.wav),TRUE,QualifiedType = Microsoft.Xna.Framework.Audio.SoundEffectInstance,,wav,,,,,,,"{THIS} = FlatRedBall.FlatRedBallServices.Load<Microsoft.Xna.Framework.Audio.SoundEffect>(@""{FILE_NAME}"", {CONTENT_MANAGER_NAME}).CreateInstance();",,,if(this.IsDisposed == false) { this.Stop(); this.Dispose(); },,FALSE,,,,,,,,,FALSE,FALSE,,FALSE,FALSE,,,,FALSE,,

0 commit comments

Comments
 (0)