Jump to content

MWSE - MCM - How to use dropdown component


Recommended Posts

Hello,

 

I try to use dropdown components for MCM but I can't figure out which parameters to pass at creation. There are no informations about this component in the easymcm doc (is it depreciated ?).

 

Any example code or doc is welcome.

 

Thanks

 

 

Link to comment
Share on other sites

Thanks a lot,

 

Is there way to limit the width of components (like dropdown, slider,...) in MCM ? I cannot find it.

 

For people looking how to use dropdown, Here is an example from Let There Be Darkness. You can use numbers for option values if you wish.

page:createDropdown{
    label = "Cell lighting value overrides. The override values are read from overrides.lua, and can be different for each cell.",
    options = {
        { label = "NONE", value = nil},
        { label = "True Lights and Darkness", value = "TLaD"},
        { label = "di.Still.ed Lights", value = "DL"},
    },
    variable = mwse.mcm.createTableVariable{
            id = "useOverrides",
            table = config
    },
    defaultSetting = "TLaD",
}
Edited by cpassuel
Link to comment
Share on other sites

Actually I was trying to change the color of an MCM element earlier. Talked with Merlord about it on discord. MCM elements are contained in

self.elements

for each component. So for me it was

self.elements.info.color = tes3ui.getPalette("fatigue_color")

but that's for an info component.

 

And you may have to put it in a postCreate() function.

postCreate = function(self)
self.elements.whatever...
end
Link to comment
Share on other sites

  • 1 month later...

I've seen from MWSE Journal Search and Edit than you can hide or show some parts of the menu with visible property.

 

There are lots of good informations/example in some mod but it's not always well documented. I should check on Discord.

 

I'm thinking about creating a lua MCM mod example with most components and config file support as a skeleton for other mods

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...