Commit graph

16 commits

Author SHA1 Message Date
1bbb0aa5b8 Caption object seems to be instantiable with a Font object now. Can't test actual rendering without a way to add objects to a collection. 2023-09-07 23:10:21 -04:00
bec2b3294d Added PyFont/mcrfpy.Font object 2023-09-07 22:25:19 -04:00
9486104377 Converted py_instance to a macro (don't ask me why it doesn't work as a function) and first pass at UICaption functionality. UISprite C++ tests. 2023-09-03 20:40:52 -04:00
5267287b05 checkpoint: found that py_instance causes segfaults when called separately, but the same exact code inside of the _getitem method works fine. I can't explain that. I guess I'll turn it into a macro so the actions are inline and I can move on to finishing the other UI classes. 2023-09-03 12:46:23 -04:00
b8af8bc870 UIDrawable to Python object (untested, but compiling) 2023-09-02 20:02:07 -04:00
0ef0a5d506 Switched UIFrame and Scene to store their UIDrawables in shared_ptr to vector, instead of directly to vector. Every object that can be exposed to Python has to be safely shareable so it doesn't become a segfault, and that includes the UIDrawable collections AND the UIDrawable members. So we get the terrifying type for collections of child elements: 'std::shared_ptr<std::vector<std::shared_ptr<UIDrawable>>>'. May I be forgiven for my sins 2023-09-02 14:00:48 -04:00
a41d3d4a54 Iterator class fleshed out. Several implementations left to do, but it compiles, and I think every function definition for the PyUICollectionType and PyUICollectionIterType is now in place 2023-09-02 09:22:34 -04:00
6d4bc2989c UICollection work: fixed compilation, still quite a bit of stubs 2023-09-02 04:40:05 -04:00
d5a7cbca85 In progress: UICollection. mcrfpydef::PyUICollection_sqmethods needs to be made static or moved somewhere it won't be multiply defined 2023-09-01 23:31:31 -04:00
5d8510747c Color and Frame classes pretty well integrated from the Python perspective now 2023-09-01 18:28:59 -04:00
06052c81c9 PyUIFrame looking not half bad. There seems to be a glitch with the color values. 2023-09-01 12:14:24 -04:00
6fe7b842ef Successful use of a copy-modify-paste template of Python type (UIFrame -> PyUIFrameObject) 2023-08-31 22:32:58 -04:00
50d926fe37 Aug 30/31 updates. Tinkering with shared_ptr. Working towards exposing UI objects to Python UI. Color object updated for shared_ptr structure that will be repeated for the rest of the UI objects. Still a lot of open questions, but committing here to get back on track after a few hours wasted trying to solve this problem too generally via templates. 2023-08-31 13:51:56 -04:00
884a49a63a Switching UIFrame to sf::Color* for outline and fill members. Haven't tested with Python integration, but I wrote the methods to take a crack at it 2023-08-30 14:38:49 -04:00
c4d5a497d4 Color container type for Python working. I still need to implement UIFrame using it. 2023-08-28 05:44:26 -04:00
ac0ec4bb71 In-work: Python segfaults when adding new objects to module 2023-08-25 21:57:42 -04:00