@stephen, I replied and then realized I hadn't read your post fully. I then deleted and purged it. Sorry for the confusion. I would code it the some way you did. I do like @mikael 's method, very pythonic. Many thanks to both of you for supporting this wonderful app.
Awesome thank you for clearing that up! and same to you!
@JonB This worked wonderfully 😊🤓 after adding the local functions and Action calls i just just needed to check if UIButton was enabled inside my EventManager otherwise for some reson it would bypass the dissabled block if i did a if node.enabled: check anywhere else. which i think is odd but i guess the EventManager is the best place for it anyway..
note: posted code will stay up for anyone needed it for themselves. normally if i get a solution after posting such a large script i would remove old posts that were irrelevant so save scrollinh
This project is Still Active 😁 i did take a quick break to write Space Escape to help people new to Creating game with scene and Pythonista. its not a tutorial but more a Playable mini-game. but the code is written as a group of examples of ways to implement diferent aspects of a game. all the image are built-in so only thing needed is the script. i recently added a version that works on iphone but still has a few sizing isues but code is the same. if your new to Video Game Programing there is a Tutorial in the Examples Folder and i suggest doing that first because there is some basics that you might need to understand in order to fully follow my example. you can find that post here. if you are experienced in this area and would like to participate in my RPG Template project you can let me know on this thread or e-mail me at email@example.com. And if you just would like to sit back and watch from an update by update manner thats ok too 🙃
if you ever have any questions please dont hesitate to ask
@cvp ah yes i curently use size. what im trying to acomplish here isnt just sizing but sizing with inset.. ui.resizable_image does exactly this but seems to reformat completly when i make a scene.Texture to use in SpriteNode 😕
I see what your saying but what you cannot see is originally (and before i fixed the duplicate streams) i had somthing similar to this:
img = Image.open('my_image.png')
img_rs = img.resize((256, 256), 1)
with io.BytesIO() as iodata:
i changed it to img=img... to reduce code knowing ill never need that exact ref to original again during this loop session.reason is i place the Texture object in a cache dict and from here on is called from there 🤓🤓
I also forgot to include my finally block that handles any mishaps once caching is complete..
for x in locals():