Skip to content

Implemented Scriptable Windows#949

Open
ItsLJcool wants to merge 2 commits into
CodenameCrew:mainfrom
ItsLJcool:scripted-windows
Open

Implemented Scriptable Windows#949
ItsLJcool wants to merge 2 commits into
CodenameCrew:mainfrom
ItsLJcool:scripted-windows

Conversation

@ItsLJcool

Copy link
Copy Markdown
Contributor

This PR implements Windows that scripts can initialize and modify without having the user killing themself

You call the new ScriptedWindow to initialize a new sub-window, and you can pass in WindowAttributes as a 2nd parameter.

import funkin.backend.utils.ScriptedWindow;
new ScriptedWindow(Paths.script("data/scripts/window script"), {
	alwaysOnTop: true,
	borderless: false,
	resizable: false
	// You can check
	// https://github.com/openfl/lime/blob/develop/src/lime/ui/WindowAttributes.hx
	// for the WindowAttributes you can add
});

You are required to path to a valid Script as the 1st parameter before the window can exist.
The Script's parent is the Window itself, so note that calling window.close(); closes the MAIN WINDOW, call close(); / this.close();

Note that game is a Sprite type and you should add to that instead of stage.addChild, since it's a seperate window, you are basically talking to OpenFL directly, so your working with Bitmap / BitmapData and Sprite all from OpenFL.

@sillyburg

Copy link
Copy Markdown
Contributor

PLEASEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

@anice-guy

Copy link
Copy Markdown

say wallahi bro say wallahi 🥹🥹🥹🥹🥹

@Raltyro

Raltyro commented Apr 3, 2026

Copy link
Copy Markdown
Member

i dont know about this personally but if you guys want this then ill look more into it

@Raltyro Raltyro added type:enhancement New feature or request type:help wanted Extra attention is needed labels Apr 3, 2026
@sillyburg

Copy link
Copy Markdown
Contributor

i dont know about this personally but if you guys want this then ill look more into it

please raltyro i need this.. my codename is kinda windowless..

@MRK2009

MRK2009 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

I hope it's going to be worth it.

@ItsLJcool

Copy link
Copy Markdown
Contributor Author

I do think it's lacking features cuz I want to be able to implement states into sub-windows at least

That's basically all this pr needs and then it can be merged

@ItsLJcool

Copy link
Copy Markdown
Contributor Author

i dont know about this personally but if you guys want this then ill look more into it

It will 100% be worth it because now people won't need to compile cne just to make a new window, at least in this pr more modpacks will be made

Also a good start to maybe introducing features like this into the powers of scripting

@KolzeYT

KolzeYT commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

i need this badly

@MRK2009

MRK2009 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Fr 💀

@BaldiLover2310

Copy link
Copy Markdown

this is genuinely game-changing

@ItsLJcool

Copy link
Copy Markdown
Contributor Author

This might not come because of things @Raltyro pointed out in dev server, and so if you want scriptable windows, we got to figure out a way to move it to a separate thread I think

@Raltyro

Raltyro commented Jul 26, 2026

Copy link
Copy Markdown
Member

Pending on merge because Multi Windows needs to be fixed in internal-merge

@MRK2009

MRK2009 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Makes sense huh

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

Labels

type:enhancement New feature or request type:help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants