Jump to content

Mod settings (with implementation)


Recommended Posts

I know this has been suggested before, but I'd like a way to make an options screen for my mod. Something like Options > Mod options > mod name. I made a rough implementation attached below. (It doesn't scroll if there's enough mods that use it)


It requires a tweak to GuiOptions (Unless there's some other way of doing it)


In initGui():

this.buttonList.add(new GuiButton(9001, this.width/2-155+160, this.height / 6 -12 + 24*3, 150, 20, "Mod options"));


In actionPerformed()

if (par1GuiButton.id == 9001)
                GuiModOptions.getInstance().parentScreen = this;


A mod can register an options page like this:

GuiModOptions.addOptionPage("Button title", guiScreenWithParentSubclass);


Screenshots here


Since attachments aren't working:



Link to comment
Share on other sites

  • 3 weeks later...

That would be a good idea, but it might get a little annoying to work with, assuming that nobody makes a base for the Mod Option GUI pages. I could get to work on that right now, actually.


EDIT: I just realized that that might also require config updating, which I'm not good with...

width=300 height=100http://i.imgur.com/ivK3J.png[/img]

I'm a little surprised that I am still ranked as a "Forge Modder," having not posted a single mod since my animals mod... I have to complete Digging Deeper!, fast!

Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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