Background of DropDown menu
Hello.
For example we have this dropdown menu. Lua Code:
Is there is any simple way to change background color/opacity only for this dropdown? In example, I want this: I've found only one way to do it, but it changes every dropdown in a game, because it's in dependecies with DropDownList: Lua Code:
I didn't find any similar threads, but it seems to me that this question was of interest to many people. I've tried SetBackdrop/different layouts, but it is not working. What I'm doing wrong? |
Hopefully someone has successfully done what you want and get throw suggestions on what might need changing for you but based on their description of the nineslicelayout system it sounds like it is designed to work with all frames of that type for theming purposes.
`Nine-slice utility for creating themed background frames without rewriting a lot of boilerplate code.` |
The problem being the dropdown menu is a common widget that gets updated depending on the initialise function.
This should work but because it's hooking the dropdown menus OnHide you never know what someone else might be doing. This is the same code duplicated to create two dropdowns. The initialise function checks which menu (based on UIDropDownMenuTemplate) it is and changes the backdrop colour. It doesn't do sub-menus... Lua Code:
The if self == HereWeGoAgainMenuDropDown then check shouldn't be needed if the function was only being used on a single frame (UIDropDownMenu_Initialize(...) call), just set the required BackdropColor |
I got that trick.Thank you for explanations
|
All times are GMT -6. The time now is 07:56 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI