Skip to content

window

The game window itself: move it, size it, shake it, take its frame away - or make it see-through, so the whole song plays right on the desktop.

How to use it

window is always there - while a song plays. Positions and sizes count from where the window was when the song started, so a script works on every screen. When the song ends (or on pause) the window goes back home by itself; resetWindow([duration]) does it earlier.

  • Not everywhere: moving and placing need a system that lets programs place windows (not Wayland); transparent (desktop mode) is Windows only. The player can switch all of it off (Options › MineFunkin › Window & desktop › "Let songs use windows"). Read canPlace, canSeeThrough, status to know what really happens.
  • Pop-out windows (parts of the game in windows of their own): popout. The monitor's size: monitor.

The whole picture: Game window and pop-outs.

Example code

-- The window shrinks to half its size and wanders to the right, then comes back.
function onEvent(p)
    tween(window.width, 0.5, beats(2), "cubicInOut")
    tween(window.height, 0.5, beats(2), "cubicInOut")
    tween(window.x, 300, beats(4), "sineInOut")
    after(beats(8), function() resetWindow(beats(2)) end)
end

Properties

Property Kind Default
window.x number 0 Moved to the right from where it was when the song started, in pixels.
window.y number 0 Moved down from where it was when the song started, in pixels.
window.width number 1 Its width as a share of the width it had (0.5 = half), around its middle.
window.height number 1 Its height as a share of the height it had, around its middle.
window.fullscreen choice "auto" "auto" = as the player has it, "on", "off".
window.border switch true Its title bar and frame; false = borderless.
window.alpha number 1 The whole window's opacity - never below 0.2, the game stays visible.
window.title text "" Its title; "" = the game's own.
window.transparent switch false Desktop mode: the world disappears and the desktop shows through - the fighters, lanes …
window.fill choice "none" "desktop" = borderless over the whole desktop above the taskbar, "screen" = over the …
window.homeX number, read 0 Where its top left corner was when the song started, from the left of the desktop, in …
window.homeY number, read 0 Where its top left corner was when the song started, from the top, in pixels.
window.homeWidth number, read 0 Its width when the song started, in pixels.
window.homeHeight number, read 0 Its height when the song started, in pixels.
window.status text, read "home" What the window really does: "home" (as the player has it), "applied" (a script's …
window.seeThrough switch, read false Whether it IS see-through right now (transparent only asks for it - it takes a few …
window.canSeeThrough switch, read false Whether desktop mode can work here (Windows, and the player allows it).
window.canPlace switch, read false Whether the window can be moved and sized here (not on Wayland, and the player allows it).
window.canPopOut switch, read false Whether pop-out windows can be opened here.

window.x

number window.x = 0

pixels

Moved to the right from where it was when the song started, in pixels.

window.y

number window.y = 0

pixels

Moved down from where it was when the song started, in pixels.

window.width

number window.width = 1

0.1 – 10

Its width as a share of the width it had (0.5 = half), around its middle.

window.height

number window.height = 1

0.1 – 10

Its height as a share of the height it had, around its middle.

window.fullscreen

choice window.fullscreen = "auto"

"auto" = as the player has it, "on", "off".

One of: "auto", "on", "off".

window.border

switch window.border = true

Its title bar and frame; false = borderless.

window.alpha

number window.alpha = 1

0 – 1share of the screen

The whole window's opacity - never below 0.2, the game stays visible.

window.title

text window.title = ""

Its title; "" = the game's own.

window.transparent

switch window.transparent = false

Windows only

Desktop mode: the world disappears and the desktop shows through - the fighters, lanes and HUD stay, on the player's wallpaper. Pictures with blend = "key" can cut more holes.

window.fill

choice window.fill = "none"

"desktop" = borderless over the whole desktop above the taskbar, "screen" = over the whole monitor (the full-screen size without real full screen), "none". x / y / width / height wait meanwhile.

One of: "none", "desktop", "screen".

window.homeX

number window.homeX = 0

read onlypixels

Where its top left corner was when the song started, from the left of the desktop, in pixels.

window.homeY

number window.homeY = 0

read onlypixels

Where its top left corner was when the song started, from the top, in pixels.

window.homeWidth

number window.homeWidth = 0

read onlypixels

Its width when the song started, in pixels.

window.homeHeight

number window.homeHeight = 0

read onlypixels

Its height when the song started, in pixels.

window.status

text window.status = "home"

read only

What the window really does: "home" (as the player has it), "applied" (a script's shape), "seethru" (desktop mode on), "restoring" (on its way home), "off" (the player switched song windows off).

window.seeThrough

switch window.seeThrough = false

read only

Whether it IS see-through right now (transparent only asks for it - it takes a few frames, or never happens on a system that can't).

window.canSeeThrough

switch window.canSeeThrough = false

read only

Whether desktop mode can work here (Windows, and the player allows it).

window.canPlace

switch window.canPlace = false

read only

Whether the window can be moved and sized here (not on Wayland, and the player allows it).

window.canPopOut

switch window.canPopOut = false

read only

Whether pop-out windows can be opened here.