Skip to content

Implemented Scriptable Windows#949

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

Implemented Scriptable Windows#949
ItsLJcool wants to merge 2 commits intoCodenameCrew: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
Copy link
Copy Markdown
Member

Raltyro commented Apr 3, 2026

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
Copy link
Copy Markdown
Contributor

MRK2009 commented Apr 3, 2026

I hope it's going to be worth it.

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.

5 participants