Log In  

Cart #sandotron-8 | 2024-03-17 | Embed ▽ | License: CC4-BY-NC-SA
18

First tiny catridge for the Picotron!
Drop some celebratory sand into your tiny window and shake it around, why not? :)

P#143010 2024-03-14 23:03 ( Edited 2024-03-17 13:25)

Congrats for the release! I broke it by resizing the window, oops!

I wonder if you can listen easily to your own windows's move event. Adding sand shaking could be fun.

P#143024 2024-03-14 23:53

Yeah, I know! I haven't found a way to either make the window non-resizable or find out about it resizing, but I'm still poking at it a bit :)

P#143031 2024-03-15 00:49

This is really cool! And its the first picotron cartridge published to the BBS!
I like that its a little program you can have on the side while maybe working on the desktop or something.

P#143034 2024-03-15 01:04

@krajzeg You can check for resizing with the "resize" event :)

window {
    width = 100,
    height = 100,
    title = "test"
}

cls()

on_event("resize", function()
    resized = true
end)

function _update()

end

function _draw()
    if (resized) print("resized", 2, 2, 7)
end

P#143063 2024-03-15 07:00
1

@TeamPuzel Indeed! Updated and reworked completely so that it's not super-sluggish once you resize the window :)

P#143082 2024-03-15 10:42

window(160,90,{resizeable=false}) will make a non-resizable window. (It still changes the mouse cursor to the diagonal double-sided arrows when you hover over the corners, but attempting to click and drag won't do anything.) I haven't yet figured out a way to edit a currently existing window's size in code though...

EDIT: GOT IT! This code will adjust the size of the window by one pixel every second!

my_wind={resizeable=false,width=100,height=100}
window(my_wind)

function _draw()
    my_wind.width=100+flr(t())
    my_wind.height=100+flr(t())
    window(my_wind)
    cls(1)
    circfill(my_wind.width/2,my_wind.height/2,25+sin(t())*15,3)
end
P#143181 2024-03-15 18:59 ( Edited 2024-03-15 19:23)
2

@Kaius Neat! :)

@Eiyeron Had a longish train ride today, so you can now resize at will and shake the sand around with the window :)

P#143216 2024-03-15 22:46

[Please log in to post a comment]