Jump to content

Recommended Posts

Posted (edited)

Hi,

 

I am trying to use the Checkbox. The MC implementation of the checkbox doesnt have a feature to save the current state if the checkbox is clicked. Therefore I added the save feature by extending the Checkbox class. Here you can see the source code:

 

GuiCheckBox:

  Reveal hidden contents

The CheckBoxOption is a field inside the config class to provide easy access to a setting.

 

CheckBoxOption:

  Reveal hidden contents

 

The Config is a simple class to store settings.

IConfig:

  Reveal hidden contents

 

And the initialization of a GuiCheckbox:

  Reveal hidden contents

 

There is no compile error, but if I open the Screen with the GuiCheckbox, the game is crashing and I get an error message which I do not understand:

 

  Reveal hidden contents

 

To fix the error I found a trivial solution, but its blowing up my code...

  Reveal hidden contents

Hence I want a better solution or fix the error above. Any ideas?

 

 

Edited by badner

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.