Log In  


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

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

24


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.


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 :)


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.


@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


1

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


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

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 :)


I did it... I finally did it! After 10 minutes!



[Please log in to post a comment]