-
Notifications
You must be signed in to change notification settings - Fork 1
Tile Documentation
The solid is a boolean variable that represents whether the tile is solid or not. It is associated with a Checkbutton in the user interface. Here's the corresponding code snippet:
solid = BooleanVar()
Checkbutton(root, text="Solid", variable=solid).place(x=152, y=500)
replaces['<SOLID>'] = "str(solid.get()).lower()"
The mergeDirt is a boolean variable that indicates whether the dirt should be merged with the tile visually. It is associated with a Checkbutton in the user interface. Here's the corresponding code snippet:
mergeDirt = BooleanVar()
Checkbutton(root, text="Merge dirt", variable=mergeDirt).place(x=302, y=500)
replaces['<MERGEDIRT>'] = "str(mergeDirt.get()).lower()"
The blockLight is a boolean variable that determines if the tile blocks light. It is associated with a Checkbutton in the user interface. Here's the corresponding code snippet:
blockLight = BooleanVar()
Checkbutton(root, text="Block light", variable=blockLight).place(x=452, y=500)
replaces['<BLOCKLIGHT>'] = "str(blockLight.get()).lower()"
The dust is a variable obtained from the selection in a Listbox named dust
. It represents the dust associated with the tile. Here's the corresponding code snippet:
dusts = ["DustID.Stone"]
dust = Listbox(root)
for item in dusts:
dust.insert(END, item)
dust.place(x=152, y=2)
replaces['<DUST>'] = "dust.get(ACTIVE)"
The mapr, mapg, and mapb are variables that store the red, green, and blue components of the tile's map color, respectively. They are associated with Spinbox widgets in the user interface. Here's the corresponding code snippet:
mapr = IntVar()
mapg = IntVar()
mapb = IntVar()
Label(root, text="Map R").place(x=152, y=180)
Spinbox(root, from_=-2147483647, to=2147483647, textvariable=mapr).place(x=152, y=200)
Label(root, text="Map G").place(x=302, y=180)
Spinbox(root, from_=-2147483647, to=2147483647, textvariable=mapg).place(x=302, y=200)
Label(root, text="Map B").place(x=452, y=180)
Spinbox(root, from_=-2147483647, to=2147483647, textvariable=mapb).place(x=452, y=200)
replaces['<MAPR>'] = "str(mapr.get())"
replaces['<MAPG>'] = "str(mapg.get())"
replaces['<MAPB>'] = "str(mapb.get())"