CustomUI

Plugins + Scripts CustomUI

Download [<1 MB]
Crazy shit! very nice.

Btw could you help me on something? I'm failing to set a list with the addChooser that doesn't start with "None". Looking at the code, it seems that none of your "BaseChooserUI" are calling the methods with the List parameter sent to them. Which makes them always init with a null list, which as a result set the default value to "None".

Am I missing something?
 
Crazy shit! very nice.

Btw could you help me on something? I'm failing to set a list with the addChooser that doesn't start with "None". Looking at the code, it seems that none of your "BaseChooserUI" are calling the methods with the List parameter sent to them. Which makes them always init with a null list, which as a result set the default value to "None".

Am I missing something?
Please provide the code snippet.
 
Please provide the code snippet.

As simple as that :

C#:
//initialized in the class above
protected List<string>stylesList = new List<string>(){"Style01", "Style02"};

// in the UI main init
tab.add( CustomUI.addChooser(this, true, "Style", 1).setPopList(stylesList).setCallback((name, val) => { OnBubbleChanged(); }).register("GlobalOptBubbleType"));

I'm using your demo as the base to understand and learn your lib. I don't see any example not using a dropdown/select without the "None" in there.
 
As simple as that :

C#:
//initialized in the class above
protected List<string>stylesList = new List<string>(){"Style01", "Style02"};

// in the UI main init
tab.add( CustomUI.addChooser(this, true, "Style", 1).setPopList(stylesList).setCallback((name, val) => { OnBubbleChanged(); }).register("GlobalOptBubbleType"));

I'm using your demo as the base to understand and learn your lib. I don't see any example not using a dropdown/select without the "None" in there.
Try implementing it by adding setValue as shown below.
C#:
protected List<string>stylesList = new List<string>(){"Style01", "Style02"}; //initialized in the class above
// in the UI main init
tab.add( CustomUI.addChooser(this, true, "Style", 1).setPopList(stylesList).setValue(stylesList[0]).setCallback((name, val) => { OnBubbleChanged(); }).register("GlobalOptBubbleType"));
Since I always implement it this way, could it be that I don’t notice anything strange because of that? :rolleyes:
 
Since I always implement it this way, could it be that I don’t notice anything strange because of that? :rolleyes:

Maybe yeap! I suppose the ideal situation would be to have something like that :

C#:
tab.add( CustomUI.addChooser(this, true, "Style", 1, stylesList).setCallback((name, val) => { OnBubbleChanged(); }).register("GlobalOptBubbleType"));

Where you simply shoot the stylesList as a default parameter and it would grab the first one as the "defaultValue" sent to the JSONStringChooser. ( for both simple or normal choosers )
Not a deal breaker tho, I will use the setValue ^^

I just wanted to know if I was missing something. Thank you very much!
 
14mhz updated CustomUI with a new update entry:

CustomUI v1.2 20260621

● add : implemented API structure to support CustomUI3D
● add : added an object data variable to CustomUIInterface.cs.
● fix : modified to respond only to left-click events for valude change.
● fix : fixed an hidden error when creating a new GameObject with both RectTransform and Image components specified simultaneously.

Read the rest of this update entry...
 
Hey 14mhz!

I'm wrapping a new plugin for VAMS, and I'm stumbling upon that:
bug-dropdown.jpg


I have a Dictionary where I store all curves, I convert it to a list for the dropdown. When I load the scene from scratch, as you see in the shot, the SetValue returns a "Single fast" with a broken case (the F is in caps as you see below with the second arrow).

The very strange thing is that, if you reload the plugin after loading the scene, the bug fixes itself.
I tried to manually do the value like this:

C#:
tabContracUpperSettings.add( CustomUI.addChooser(this, false, "Curve", 0).setPopList(contracCurvesChoices).setValue("Single Fast")...

And it behaves exactly the same (to ensure there was not something fishy with the List/Dict). I still haven't checked the code, but I find that behavior super weird as it's not "stable" ( one behavior at first load, another behavior at plugin reload )... any clue?
 
Back
Top Bottom