-
-
Save microloop/cd25c084cafde4ed1f2739c555e2a5cc to your computer and use it in GitHub Desktop.
Main Init for Super Pico Maker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function _init() | |
| -- GLOBAL VARIABLES | |
| SCREEN_WIDTH = 128 | |
| SCREEN_HEIGHT = 128 | |
| pointer = icons = {} | |
| -- Initialice our icons that will be part of the toolbar | |
| -- IMPORTANT! Make sure the sprite value is set with the position of sprite of your PICO-8 Editor | |
| -- Initialice our icons that will be part of the toolbar | |
| pointer = Icon:new({name=”Pointer”,posx=106,posy=0,sprite=84, | |
| sprite_pressed=100,active_sprite=116,type=”Pointer”}) | |
| ground = Icon:new({name=”Ground”,posx=116,posy=0,sprite=85, | |
| sprite_pressed=101,active_sprite=117,type=”Ground”}) | |
| rubber = Icon:new({name=”Rubber”,posx=106,posy=0,sprite=83, | |
| sprite_pressed=99,active_sprite=115,type=”Rubber”}) | |
| -- Adding icons to the global icons list | |
| add(icons,pointer) | |
| add(icons,ground) | |
| add(icons,rubber) | |
| -- Create the toolbar | |
| toolbar = Toolbar:new({posx=SCREEN_WIDTH/2-16,posy=12,sizex=40,sizey=15,round=1,icons=icons}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment