directories needed: * build - for cmake output * deps - stuff needed to compile McRogueface (headers) libtcod -> ../modules/libtcod/src/libtcod sfml -> ../modules/SFML/include/SFML python -> ../modules/cpython/Include * lib - stuff needed to link McRogueFace (shared objects); also required at runtime libtcod -> `../modules/libtcod/buildsys/autotools/.libs/libtcod.so.1.0.24` sfml -> `../modules/SFML/build/lib/*` python -> `../modules/cpython/libpython3.12.so`; standard lib at ../modules/cpython/build/lib.linux-x86_64-3.12 & ../modules/cpython/Lib You can get dependencies by: - Build from source (i.e. all submodules) - Go download them from each project's website - install packages from your distro and symlink them to deps/lib directories
37 lines
766 B
Python
37 lines
766 B
Python
import mcrfpy
|
|
mcrfpy.createTexture("./assets/test_portraits.png", 32, 8, 8)
|
|
from random import choice, randint
|
|
|
|
box_colors = [
|
|
(0, 0, 192),
|
|
(0, 192, 0),
|
|
(192, 0, 0),
|
|
(192, 192, 0),
|
|
(0, 192, 192),
|
|
(192, 0, 192)
|
|
]
|
|
|
|
text_colors = [
|
|
(0, 0, 255),
|
|
(0, 255, 0),
|
|
(255, 0, 0),
|
|
(255, 255, 0),
|
|
(0, 255, 255),
|
|
(255, 0, 255)
|
|
]
|
|
|
|
test_x = 500
|
|
test_y = 10
|
|
for i in range(40):
|
|
ui_name = f"test{i}"
|
|
mcrfpy.createMenu(ui_name, test_x, test_y, 400, 200)
|
|
mcrfpy.createCaption(ui_name, "Hello There", 18, choice(text_colors))
|
|
mcrfpy.createButton(ui_name, 250, 20, 100, 50, choice(box_colors), (0, 0, 0), "asdf", "testaction")
|
|
|
|
mcrfpy.createSprite(ui_name, 0, randint(0, 3), 650, 60, 5.0)
|
|
|
|
test_x -= 50
|
|
test_y += 50
|
|
if (test_x <= 50):
|
|
test_x = 500
|
|
#print(test_x)
|