Skip to content

f11 fullscreen#921

Open
HEIHUAa wants to merge 6 commits into
CodenameCrew:mainfrom
HEIHUAa:fullscreen
Open

f11 fullscreen#921
HEIHUAa wants to merge 6 commits into
CodenameCrew:mainfrom
HEIHUAa:fullscreen

Conversation

@HEIHUAa

@HEIHUAa HEIHUAa commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Add F11 fullscreen functionality.
Remove F key fullscreen functionality from TitleState.

@r6915ee

r6915ee commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Isn't this already provided through the Alt + Enter keybind?

@HEIHUAa

HEIHUAa commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Isn't this already provided through the Alt + Enter keybind?

It conflicts with the Enter confirmation key, causing unintended confirmation actions when I toggle fullscreen. Since I switch between fullscreen and windowed mode frequently, this is quite annoying.

@MRK2009 MRK2009 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that, nice.

public function new(gameWidth:Int, gameHeight:Int, entryState:Class<FlxState>, updateFramerate:Int = 60, drawFramerate:Int = 60, skipSplash:Bool = false, startFullscreen:Bool = false) {
super(gameWidth, gameHeight, entryState, updateFramerate, drawFramerate, skipSplash, startFullscreen);

fullscreenListener = function(e:KeyboardEvent) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be in override create(_):Void instead of in public function new?
and the fullscreenListener function should be just a normal function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I'll change it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants