From 0c9a67da411310f3f7f158a503d881ae8c0d04bd Mon Sep 17 00:00:00 2001 From: Stefanos A Date: Mon, 23 Dec 2013 01:29:12 +0100 Subject: [PATCH] Fixed rendering of joysticks and gamepads Joysticks and gamepad states would overlap, causing some lines to be unreadable. This is now fixed. --- Source/Examples/OpenTK/Test/GameWindowStates.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Examples/OpenTK/Test/GameWindowStates.cs b/Source/Examples/OpenTK/Test/GameWindowStates.cs index 99724300..cc3b29b1 100644 --- a/Source/Examples/OpenTK/Test/GameWindowStates.cs +++ b/Source/Examples/OpenTK/Test/GameWindowStates.cs @@ -163,7 +163,7 @@ namespace Examples.Tests } } - static void DrawJoysticks(Graphics gfx, IList joysticks, int line) + static int DrawJoysticks(Graphics gfx, IList joysticks, int line) { float space = gfx.MeasureString(" ", TextFont).Width; @@ -192,6 +192,8 @@ namespace Examples.Tests line++; } + + return line; } protected override void OnUpdateFrame(FrameEventArgs e) @@ -238,9 +240,8 @@ namespace Examples.Tests DrawString(gfx, TypedText.ToString(), line++); DrawKeyboard(gfx, keyboard, line++); DrawMouse(gfx, mouse, line++); - DrawJoysticks(gfx, Joysticks, line++); - - line = DrawGamePads(gfx, line); + line = DrawJoysticks(gfx, Joysticks, line++); + line = DrawGamePads(gfx, line++); } }