Jump to content

Adding images to the modconfiguration screen


Recommended Posts

Hello Forum,

I'm currently trying to make a fully configurable recipe generating mod.

Instead of displaying the available options as text, I would like to put images in the options.

Is there anything of that nature out there already?

I want to insert images in the modconfigurationscreen on my mod.

Where usually the text of the label in the modconfiguration.lua is placed in the modconfigurationscreen I want to instead have an image and if possible in the options one might cycle through.

Is there a mod currently doing this or anything of this sort?

I looked at the Mod Toggler and I'm trying to figure out how to add images like the buttons were added in the Mod Toggler.

Would appreciate help :-)

Many thanks,

Edited by cptCalavera
Link to comment
Share on other sites

@TFGBenji, Well, you can definitely modify the modconfigurationscreen the same way you can modify other screens (AddClassPostConstruct), but it will only work while your mod is enabled. So you might get some weird behavior-- like the images won't appear if the mod wasn't enabled before you entered the mods screen, but will if it was.

 

But I don't think there's any nice, reliable way to do it. You can now specify text to appear on hover, though (both for settings and for each of the possible options for those settings).

Edited by rezecib
Link to comment
Share on other sites

Okay, I've managed to figure out how some of the widgets work and was able to add some images.

Yes you have to reopen the mods menu after you enable the mod.

If anyone has some sort of reload function for the modconfiguration screen would be much appreciated.

I guess I'll just stick with reopening the menu for now.

I've got a busy week coming up, so ill probably release my mod next week.
Thanks very much.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...