ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   How to create aus menu Button (https://www.esoui.com/forums/showthread.php?t=7663)

Numetashi 03/08/18 09:25 PM

How to create aus menu Button
 
Hi, how can i create a clickable menu Button with function?

Dolgubon 03/08/18 10:59 PM

The easiest way to create buttons is using XML files. If you need it to be 'on demand' in a sense, then you can create a virtual control in an XML file, and create a button from that virtual template whenever you need it.

However, if you really want to create it from scratch in Lua, you can use WindowManager:CreateControl(string arg1, object parent, number type), with CT_BUTTON as the type. Or you can use WindowManager:CreateControlFromVirtual with some ZOS defined virtual template.

Baertram 03/09/18 09:52 AM

You mean a button in the top row menu if you open the inventory e.g.?
There's a librray to add a button, I think votan has provided it within some addons like PotionMaker.
Check the libs folder there for "LibMainMenu-2.0" (be sure to use libMainMenu 2, not LibMainMenu as this is another library provided by Ayantir within Superstar e.g. if I remember correctly, adding a scene for some menus!).

Search for code in the addon files (search for "LibMainMenu-2.0").


All times are GMT -6. The time now is 10:22 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI