Closed tbillion closed 1 year ago
@tbillion The first issue is with ChatGPT. The technology must always return an answer even if its doesn't know what the answer should be. Sometimes I have even found that if it does know the answer and gives it correctly, a second request a few minutes alter will give an incorrect answer. Much research is being done on this problem but no solution has proven workable... In other words it will (like in your case) simply make crap up. If you tried the code you would notice the various draw functions do not exist.
There are a couple of ways to do what you want but I think the easiest is to simply define two images on top of each other. Than edit your project c file after the InitGUIslice() code make one image visible and the other hidden. Just make sure and define two different ElemeRefs to your two images. From my faq.pdf
How can I Hide a UI Element until some external event occurs? You just make it visible or not.
gslc_tsElemRef* m_pElemName = _address of your ui element_
gslc_ElemSetVisible(&m_gui,m_pElemName,true|false);
Paul--
@tbillion Since no response has come from you I'm going to assume your question has been answered.
i am not sure if this is already a function that is not documented or if it is not part of the code at all but:
the use case i have entered is an icon based status bar, greyed out icon for not enabled or a color icon for enabled. I figure this is something a lot of people could use, but i cannot figure how to either have two images and hide the one that isn't right or to swap the image in an image location in the app.
the solution could be as simple as enable disable the image view, or a more comprehensive control that would allow the dynamic changing of its image.
i did search this out as far as discussions and documentation but i didn't fin a concise answer.
i asked chatgpt about this and the answer it generated was this, however i am unable to test it currently based on the issue with SD.h :
In this example, the SetImageBitmap function is called with the new bitmap data, and then the DrawImage function is called again to redraw the image on the screen. The delay function is used to wait for a moment before modifying the image again
.
Thanks!