ImpulseAdventure / GUIslice-Builder

Cross-platform drag & drop GUI builder for GUIslice
Other
166 stars 35 forks source link

Problem generating code with toggle button, delete code for Toggle button ON / OFF state #164

Closed JosekeyRandom closed 3 years ago

JosekeyRandom commented 3 years ago

If I add code in the toggle button event when generating again with guislice it disappears.

For example I add a simple Serial.print in event toggle button and save it with the arduino ide:

if ( eTouch == GSLC_TOUCH_UP_IN ) { // From the element's ID we can determine which button was pressed. switch (pElem->nId) { //<Button Enums !Start!> case E_ELEM_TOGGLE1: // TODO Add code for Toggle button ON/OFF state if (gslc_ElemXTogglebtnGetState(&m_gui, m_pElemToggle1)) { Serial.println("Toggle Button checked!!") ; } break;

Now I'm going to guislice to continue working but if I generate the code again, it deletes the Serial.println, it sets it all again by default, for now it has only happened to me with the Toggle Button.

if ( eTouch == GSLC_TOUCH_UP_IN ) { // From the element's ID we can determine which button was pressed. switch (pElem->nId) { //<Button Enums !Start!> case E_ELEM_TOGGLE1: // TODO Add code for Toggle button ON/OFF state if (gslc_ElemXTogglebtnGetState(&m_gui, m_pElemToggle1)) { ; } break; I am generating code for the platform "tft_espi".

Version

Thank you very much for this great project. I think the work you do is incredible.

Pconti31 commented 3 years ago

@JosekeyRandom This should be fixed in the latest release 0.16.b008 I'm not able to provide much in the way of support at moment so you will be better off posting new issues to GUIslice Issues Paul--

JosekeyRandom commented 3 years ago

@Pconti31, thanks, i will try to use the latest beta to see if the problem is solved.

JosekeyRandom commented 3 years ago

I confirm that with the latest release 0.16.b008 the problem has been solved. Thanks.