Skip to content

How to resize window #452

Closed Answered by PetscopF
KadePleaseHelpMe asked this question in Q&A
Nov 23, 2024 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

My best guess would be to do it something like this:

function preStateSwitch() {
    FlxG.resizeWindow(1440, 810);
    FlxG.resizeGame(1440, 810); // comment or remove this line if you don't need to resize the game itself
}

Since this script likely won't be in an addons folder, I did not include a mod folder name check, but you may use one if you're putting this in an addon (just import funkin.backend.assets.ModsFolder and include an if statement for whether or not ModsFolder.currentModFolder is equivalent to your mod's name). Here, the preStateSwitch callback is used, as I don't know if there is a callback for loading mods specifically and in case the player might've resized the window o…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@KadePleaseHelpMe
Comment options

@PetscopF
Comment options

@KadePleaseHelpMe
Comment options

@PetscopF
Comment options

Answer selected by KadePleaseHelpMe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants