7DRL 2024 Day 4 updates - UIGrid / mcrfpy.Grid
Massive new set of behaviors: * Move, resize*, zoom, and pan mcrfpy.Grid instances from Python. Note: there's a rendering error with resizing, which will have to wait for after 7DRL. * Add, remove, and create mcrfpy.Entity instances from Python. The fields can be edited to change position and sprite. They can be removed from a grid and/or added to another. the Entity class is closely related to the EntityCollection class, the Python interface to UIGrid's std::vector of UIEntities. * mcrfpy.GridPoint and mcrfyp.GridPointState objects. The GridPoint class allows access to the "physical" parts of a grid. The GridPointState class allows access to an entity's knowledge of it. Grids and Entities have an "at" method that takes a tuple (x,y) and returns one of these objects. __repr__ and many other nice things are notably absent - many TODOs were added to the codebase today. They can get picked up after 7DRL.
This commit is contained in:
parent
08772111de
commit
6de3f0e8cf
4 changed files with 252 additions and 16 deletions
|
|
@ -140,6 +140,10 @@ PyObject* PyInit_mcrfpy()
|
|||
PyModule_AddType(m, &mcrfpydef::PyUIGridPointType);
|
||||
PyModule_AddType(m, &mcrfpydef::PyUIGridPointStateType);
|
||||
PyModule_AddType(m, &mcrfpydef::PyUIEntityType);
|
||||
|
||||
PyModule_AddType(m, &mcrfpydef::PyUIEntityCollectionIterType);
|
||||
PyModule_AddType(m, &mcrfpydef::PyUIEntityCollectionType);
|
||||
|
||||
PyModule_AddType(m, &mcrfpydef::PyUIGridType);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue