Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion dev/src/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace olc
// Allow the window border to be hidden by user
bool bShowWindowBorder = true;
// Allow the window title bar to be hidden by user
bool bShowWindowTilebar = true;
bool bShowWindowTitlebar = true;
// Allow the windows minimise button to be hidden by user
bool bShowWindowMinimiseButton = true;
// Allow the windows maximised button to be hidden by user
Expand Down
4 changes: 2 additions & 2 deletions dev/src/host_apple_macos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ namespace olc::host {
uint16_t nsStyle = 0;

// Note for MacOS: You cannot fully hide both the title bar and border, therefore we return titled when both are disabled, which is the closest we can get to a borderless window
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTilebar) return static_cast<unsigned int>(NSWindowStyleMask::Titled);
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTitlebar) return static_cast<unsigned int>(NSWindowStyleMask::Titled);

// On MacOS, the maximize button is tied to the resizable style, therefore there is no need to implemenent a separate bShowWindowMaximiseButton config,
// For MacOS you can only disable the buttons, you can't hide them
if (pPrimaryPGE->config.bFullScreen) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::FullSizeContentView); // Fullscreen window
if (pPrimaryPGE->config.bShowWindowTilebar) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Titled); // Add a title bar
if (pPrimaryPGE->config.bShowWindowTitlebar) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Titled); // Add a title bar
if (pPrimaryPGE->config.bShowWindowBorder) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Titled); // Add a border
if (pPrimaryPGE->config.bResizeable) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Resizable); // Enable resizing
if (pPrimaryPGE->config.bShowWindowMinimiseButton) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Miniaturizable); // Add Min Button
Expand Down
4 changes: 2 additions & 2 deletions dev/src/host_win_winapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,11 @@ namespace olc::host
// Note for Microsoft: if you hide the border, it hides the title bar too, and via versa

// For fullscreen,borderless/noTitlebar we want to skip all the window furniture and just have a big ol canvas
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTilebar) return dwStyle |= WS_POPUP;
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTitlebar) return dwStyle |= WS_POPUP;

// If any max/min/close button(s) display the button menu
if (pPrimaryPGE->config.bShowWindowCloseButton || pPrimaryPGE->config.bShowWindowMaximiseButton || pPrimaryPGE->config.bShowWindowMinimiseButton) dwStyle |= WS_SYSMENU;
if (pPrimaryPGE->config.bShowWindowTilebar) dwStyle |= WS_CAPTION; // Add a title bar
if (pPrimaryPGE->config.bShowWindowTitlebar) dwStyle |= WS_CAPTION; // Add a title bar
if (pPrimaryPGE->config.bShowWindowBorder) dwStyle |= WS_BORDER; // Add a border
if (pPrimaryPGE->config.bResizeable) dwStyle |= WS_THICKFRAME; // Enable resizing
if (pPrimaryPGE->config.bShowWindowMinimiseButton) dwStyle |= WS_MINIMIZEBOX; // Add Min Button
Expand Down
10 changes: 5 additions & 5 deletions olcPixelGameEngine3.h
Original file line number Diff line number Diff line change
Expand Up @@ -4395,7 +4395,7 @@ namespace olc
// Allow the window border to be hidden by user
bool bShowWindowBorder = true;
// Allow the window title bar to be hidden by user
bool bShowWindowTilebar = true;
bool bShowWindowTitlebar = true;
// Allow the windows minimise button to be hidden by user
bool bShowWindowMinimiseButton = true;
// Allow the windows maximised button to be hidden by user
Expand Down Expand Up @@ -11182,11 +11182,11 @@ namespace olc::host
// Note for Microsoft: if you hide the border, it hides the title bar too, and via versa

// For fullscreen,borderless/noTitlebar we want to skip all the window furniture and just have a big ol canvas
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTilebar) return dwStyle |= WS_POPUP;
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTitlebar) return dwStyle |= WS_POPUP;

// If any max/min/close button(s) display the button menu
if (pPrimaryPGE->config.bShowWindowCloseButton || pPrimaryPGE->config.bShowWindowMaximiseButton || pPrimaryPGE->config.bShowWindowMinimiseButton) dwStyle |= WS_SYSMENU;
if (pPrimaryPGE->config.bShowWindowTilebar) dwStyle |= WS_CAPTION; // Add a title bar
if (pPrimaryPGE->config.bShowWindowTitlebar) dwStyle |= WS_CAPTION; // Add a title bar
if (pPrimaryPGE->config.bShowWindowBorder) dwStyle |= WS_BORDER; // Add a border
if (pPrimaryPGE->config.bResizeable) dwStyle |= WS_THICKFRAME; // Enable resizing
if (pPrimaryPGE->config.bShowWindowMinimiseButton) dwStyle |= WS_MINIMIZEBOX; // Add Min Button
Expand Down Expand Up @@ -11823,12 +11823,12 @@ namespace olc::host {
uint16_t nsStyle = 0;

// Note for MacOS: You cannot fully hide both the title bar and border, therefore we return titled when both are disabled, which is the closest we can get to a borderless window
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTilebar) return static_cast<unsigned int>(NSWindowStyleMask::Titled);
if (!pPrimaryPGE->config.bShowWindowBorder || !pPrimaryPGE->config.bShowWindowTitlebar) return static_cast<unsigned int>(NSWindowStyleMask::Titled);

// On MacOS, the maximize button is tied to the resizable style, therefore there is no need to implemenent a separate bShowWindowMaximiseButton config,
// For MacOS you can only disable the buttons, you can't hide them
if (pPrimaryPGE->config.bFullScreen) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::FullSizeContentView); // Fullscreen window
if (pPrimaryPGE->config.bShowWindowTilebar) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Titled); // Add a title bar
if (pPrimaryPGE->config.bShowWindowTitlebar) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Titled); // Add a title bar
if (pPrimaryPGE->config.bShowWindowBorder) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Titled); // Add a border
if (pPrimaryPGE->config.bResizeable) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Resizable); // Enable resizing
if (pPrimaryPGE->config.bShowWindowMinimiseButton) nsStyle |= static_cast<unsigned int>(NSWindowStyleMask::Miniaturizable); // Add Min Button
Expand Down
Loading