Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
efec5d6
Bump Raylib-cs from 7.0.2 to 8.0.0
dependabot[bot] May 26, 2026
19e375a
Fix: HighDpi flag is working correctly now, so Examples sets it to tr…
SoloByte May 27, 2026
2326a67
Refactor: Removed osxWindowScaleDpi member.
SoloByte May 27, 2026
871d59d
Refactor: Changed InitWindow call.
SoloByte May 27, 2026
7299fa3
Refactor: Removed commented-out code.
SoloByte May 27, 2026
039ffd6
Refactor: Improved handling of detecting if the monitor was changed b…
SoloByte May 27, 2026
31d7b3d
Fix: Changing monitor now works in Borderless fullscreen as well.
SoloByte May 27, 2026
18d0051
Fix: Temporary hack for fixing issue of window size after restoring w…
SoloByte May 27, 2026
2e0c788
Feat: Added new ClampWindowSize function. (might be removed again, I …
SoloByte May 27, 2026
a9e279b
Feat: Examples fullscreen input added. (alongside borderless fullscre…
SoloByte May 28, 2026
c04f785
Refactor: Fullscreen fixed moved to seperate function and any clearin…
SoloByte May 28, 2026
7973a6d
Refactor: FullscreenAutoRestoring cleaned up.
SoloByte May 28, 2026
340cb77
Todo: Todo added.
SoloByte May 28, 2026
faa404a
Fix: Clearing fullscreen mode before changing monitor added to make t…
SoloByte May 28, 2026
e45052e
Fix: Workaround for fullscreen mode not working correctly on macOS ex…
SoloByte May 28, 2026
51307ba
Refactor: InitWindow uses windowSettings.WindowSize now.
SoloByte May 28, 2026
6f6df5f
TODO: Issue added.
SoloByte May 28, 2026
11183a0
Refactor: Fullscreen fix on external monitor removed again (breaks ot…
SoloByte May 29, 2026
a99fe28
Refactor: macOSHighDpiScaleFactor commented out for now (is always 1).
SoloByte May 29, 2026
870422f
Refactor: Changing monitor while in fullscreen now calls RestoreWindo…
SoloByte May 29, 2026
0a0f3ae
Refactor: ApplyFullscreenFix renamed to ApplyMacOSFullscreen fix. See…
SoloByte May 29, 2026
bd0ed73
Refactor: ChangeMonitor function improved. Seems to work on macOS and…
SoloByte May 29, 2026
9c4405c
Refactor: ChangeMonitor function improved. Seems to work on macOS and…
SoloByte May 29, 2026
897d4a0
Merge remote-tracking branch 'origin/dependabot/nuget/ShapeEngine/Ray…
SoloByte May 29, 2026
9724ab6
Refactor: FullscreenAutoRestoring cleanup.
SoloByte Jun 1, 2026
1363a27
Todo: Old todos removed and new one added.
SoloByte Jun 1, 2026
a5a702c
Todo: Todo removed.
SoloByte Jun 1, 2026
0792d26
Todo: Todo added.
SoloByte Jun 1, 2026
10747b4
Feat: High dpi member added to GameWindow.cs
SoloByte Jun 2, 2026
803a9d7
Refactor: Cleaned up some outdated code in CalculateMonitorConversion…
SoloByte Jun 2, 2026
fdda02b
Refactor: OnScreenDimensionsChanged added dpi scale factor parameters.
SoloByte Jun 2, 2026
0a77627
Refactor: Some clean up.
SoloByte Jun 2, 2026
cdbf441
Fix: Mouse position scaling fixed.
SoloByte Jun 2, 2026
a57101c
Feat: GameWindow now calculates the current monitor dimensions with t…
SoloByte Jun 3, 2026
ca9af42
Fix: Bugs fixed regarding cursor/mouse in GameWindow.cs
SoloByte Jun 3, 2026
941a2a3
Refactor: Cursor and Mouse system overhauled in GameWindow class.
SoloByte Jun 4, 2026
e957f8b
Fix: Fixed screen space percentage calculation in GameWindow class.
SoloByte Jun 4, 2026
a95ebe7
Todo: Todo added about issue with pixelation texture mode on exclusiv…
SoloByte Jun 4, 2026
6e04abd
Fix: Centering window on changing monitor on windows now works again.
SoloByte Jun 4, 2026
f7b3541
Fix: ScreenTexture Pixelation mode fixed. (now works and looks correc…
SoloByte Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions Examples/GameloopExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public class GameloopExamples : Game
public InputAction InputActionUIPrevPage {get; private set;}

//gameloop controlled
public InputAction InputActionBorderlessFullscreen {get; private set;}
public InputAction InputActionFullscreen {get; private set;}
public InputAction InputActionMaximize {get; private set;}
public InputAction InputActionMinimize {get; private set;}
Expand Down Expand Up @@ -802,10 +803,16 @@ protected override void Update(GameTime time, ScreenInfo game, ScreenInfo gameUi
inputActionTree.CurrentGamepad = Input.GamepadManager.LastUsedGamepad;
inputActionTree.Update(time.Delta);

var borderlessFullscreenState = InputActionBorderlessFullscreen.Consume(out _);
if (borderlessFullscreenState is { Consumed: false, Pressed: true })
{
Instance.Window.ToggleBorderlessFullscreen();
}

var fullscreenState = InputActionFullscreen.Consume(out _);
if (fullscreenState is { Consumed: false, Pressed: true })
{
Instance.Window.ToggleBorderlessFullscreen();
Instance.Window.ToggleFullscreen();
}

var maximizeState = InputActionMaximize.Consume(out _);
Expand Down Expand Up @@ -997,10 +1004,14 @@ private void SetupInput()
var cancelGB = new InputTypeGamepadButton(ShapeGamepadButton.MIDDLE_LEFT);
InputActionUICancel= new(InputSystem.AllAccessTag, defaultSettings, cancelKB, cancelGB);


var fullscreenKB = new InputTypeKeyboardButton(ShapeKeyboardButton.F);
var fullscreenGB = new InputTypeGamepadButton(ShapeGamepadButton.LEFT_THUMB);
InputActionFullscreen = new(GameloopAccessTag, defaultSettings,fullscreenKB, fullscreenGB);
ModifierKeySet modifierKeyLeftControlReveresed = new ModifierKeySet(ModifierKeyOperator.And, new ModifierKeyKeyboardButton(ShapeKeyboardButton.LEFT_CONTROL, true));
ModifierKeySet modifierKeyLeftControl = new ModifierKeySet(ModifierKeyOperator.And, new ModifierKeyKeyboardButton(ShapeKeyboardButton.LEFT_CONTROL, false));
var borderlessFullscreenKB = new InputTypeKeyboardButton(ShapeKeyboardButton.F, modifierKeyLeftControlReveresed);
var borderlessFullscreenGB = new InputTypeGamepadButton(ShapeGamepadButton.LEFT_THUMB);
InputActionBorderlessFullscreen = new(GameloopAccessTag, defaultSettings, borderlessFullscreenKB, borderlessFullscreenGB);

var fullscreenKB = new InputTypeKeyboardButton(ShapeKeyboardButton.F, modifierKeyLeftControl);
InputActionFullscreen = new(GameloopAccessTag, defaultSettings, fullscreenKB);

var maximizeKB = new InputTypeKeyboardButton(ShapeKeyboardButton.M);
// var maximizeGB = new InputTypeGamepadButton(ShapeGamepadButton.RIGHT_THUMB);
Expand Down Expand Up @@ -1095,6 +1106,7 @@ private void SetupInput()
inputActionTree.Add(InputActionUINextTab);
inputActionTree.Add(InputActionUIPrevPage);
inputActionTree.Add(InputActionUINextPage);
inputActionTree.Add(InputActionBorderlessFullscreen);
inputActionTree.Add(InputActionFullscreen);
inputActionTree.Add(InputActionMaximize);
inputActionTree.Add(InputActionMinimize);
Expand Down
4 changes: 3 additions & 1 deletion Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public static class Program
{
public static void Main(string[] args)
{

//TODO: Check all modes if they work still!
var gameSettings = GameSettings.StretchMode("Shape Engine Examples");

var windowSettings = new WindowSettings
Expand All @@ -23,7 +25,7 @@ public static void Main(string[] args)
MouseEnabled = true,
MouseVisible = false,
Msaa4x = true,
HighDPI = false,
HighDPI = true,
FramebufferTransparent = false
};

Expand Down
4 changes: 2 additions & 2 deletions Examples/Scenes/MainScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private void HandleInput(float dt, Vector2 mousePosGame, Vector2 mousePosUI)
{
GameloopExamples.Instance.Window.ToggleMinimizeWindow();
}
var fullscreenState = GameloopExamples.Instance.InputActionFullscreen.Consume(out _);
var fullscreenState = GameloopExamples.Instance.InputActionBorderlessFullscreen.Consume(out _);
if (fullscreenState is { Consumed: false, Pressed: true })
{
GameloopExamples.Instance.Window.ToggleBorderlessFullscreen();
Expand Down Expand Up @@ -295,7 +295,7 @@ private void DrawInputInfoBox(Rect area)
var curInputDevice = Input.CurrentInputDeviceType;
if (curInputDevice == InputDeviceType.Mouse) curInputDevice = InputDeviceType.Keyboard;

string fullscreenInputTypeName = GameloopExamples.Instance.InputActionFullscreen.GetInputTypeDescription(curInputDevice, true, 1, false);
string fullscreenInputTypeName = GameloopExamples.Instance.InputActionBorderlessFullscreen.GetInputTypeDescription(curInputDevice, true, 1, false);
var fullscreenInfo = $"Fullscreen {fullscreenInputTypeName}";

string cycleShaderInputTypeDescription = GameloopExamples.Instance.InputActionCycleShaders.GetInputTypeDescription(InputDeviceType.Keyboard, true, 1, false);
Expand Down
6 changes: 3 additions & 3 deletions ShapeEngine/Core/GameDef/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,11 @@ public int ClearScreenTextures()
/// <param name="gameInfo">Information about the game screen area.</param>
/// <param name="gameUiInfo">Information about the game UI screen area.</param>
/// <param name="uiInfo">Information about the general UI screen area.</param>

protected virtual void UpdateCursor(float dt, ScreenInfo gameInfo, ScreenInfo gameUiInfo, ScreenInfo uiInfo)
{

}

/// <summary>
/// Draws the cursor in the game world space.
/// </summary>
Expand All @@ -814,6 +814,7 @@ protected virtual void DrawCursorGame(ScreenInfo gameInfo)
{

}

/// <summary>
/// Draws the cursor on the game UI. This method is called during the UI rendering phase when the mouse is on the screen.
/// </summary>
Expand All @@ -822,11 +823,11 @@ protected virtual void DrawCursorGame(ScreenInfo gameInfo)
/// This is a virtual method intended to be overridden by derived classes to implement custom cursor rendering.
/// The base implementation does not draw anything.
/// </remarks>

protected virtual void DrawCursorGameUi(ScreenInfo gameUiInfo)
{

}

/// <summary>
/// Draws cursor UI elements on the screen.
/// </summary>
Expand All @@ -835,7 +836,6 @@ protected virtual void DrawCursorGameUi(ScreenInfo gameUiInfo)
/// This is a virtual method that can be overridden by derived classes to implement custom cursor drawing.
/// It's called during the rendering process when the mouse is detected on the screen.
/// </remarks>

protected virtual void DrawCursorUi(ScreenInfo uiInfo)
{

Expand Down
9 changes: 6 additions & 3 deletions ShapeEngine/Core/GameDef/GameGameloop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ private void DrawToScreen()

ResolveDrawUI(UIScreenInfo);

if (Window.MouseOnScreen) DrawCursorUi(UIScreenInfo);
// if (Window.MouseOnScreen) DrawCursorUi(UIScreenInfo);
DrawCursorUi(UIScreenInfo);

Raylib.EndDrawing();
}
Expand All @@ -394,13 +395,15 @@ private void EndGameloop()
private void GameTextureOnDrawGame(ScreenInfo gameScreenInfo, ScreenTexture texture)
{
ResolveDrawGame(gameScreenInfo);
if (Window.MouseOnScreen) DrawCursorGame(gameScreenInfo);
// if (Window.MouseOnScreen) DrawCursorGame(gameScreenInfo);
DrawCursorGame(gameScreenInfo);
}

private void GameTextureOnDrawUI(ScreenInfo gameUiScreenInfo, ScreenTexture texture)
{
ResolveDrawGameUI(gameUiScreenInfo);
if (Window.MouseOnScreen) DrawCursorGameUi(gameUiScreenInfo);
// if (Window.MouseOnScreen) DrawCursorGameUi(gameUiScreenInfo);
DrawCursorGameUi(gameUiScreenInfo);
}

private void GameTextureOnTextureResized(int w, int h)
Expand Down
Loading
Loading