ImpulseAdventure / GUIslice-Builder

Cross-platform drag & drop GUI builder for GUIslice
Other
163 stars 34 forks source link

Toggle Button switch/case user code deleted when re-generate from builder. #205

Closed nadjet09 closed 1 year ago

nadjet09 commented 2 years ago

Describe the bug so whenever I hit Generate code from the guibuilder, in CbBtnCommon switch/case of toggle button my code will be deleted and a default if(); statement is created. the issue is that it deletes the user code even if it is placed inside the if statement.

To Reproduce Steps to reproduce the behavior:

  1. create a toggle button
  2. go in the CbBtnCommon toggle btn case:
  3. insert custom code.
  4. re-generate from guislice builder

Expected behavior custom code is deleted an replaced by the default; // TODO Add code for Toggle button ON/OFF state if (gslc_ElemXTogglebtnGetState(&m_gui, m_pElemTog_Alive)) { ; }

Screenshots custom code inserted: tog-bug-ss1

this happen after re-generate the guislice code: tog-bug-ss2 Version

Additional context it only happens with toggle btn for now, didn't happen to me with text button.

Pconti31 commented 2 years ago

@nadjet09 Thanks for the information. I'll fix this in the 17 b12 release. Paul--

Pconti31 commented 1 year ago

fixed in release 17.b12