※ Reporting bugs or issues will help me improve the plugin and help others.
CustomUI
● This .cs for plugin UI component library for developer.
● This is licensed under CC-BY, so you are free to incorporate it into your own code and use it as you wish.
● This library doesn't aim to offer something novel, but rather simplifies and standardizes components that are commonly implemented by developers.
● Of course, there are also newly developed components such as Spinner/ThreeStateButton/RGBAColorPicker/PieStyleSlider.
● This library consists of two files (CustomUI.cs/CustomUIInterface.cs) and can be freely modified or used.
● You can refer to CustomUIExample1.cs/CustomUIExample2.cs/CustomUIExample3.cs/CustomUIExample4.cs for detailed examples of usage.
● All configurable functions of the UI component are implemented using the Builder-Pattern.
CustomUI
● This .cs for plugin UI component library for developer.
● This is licensed under CC-BY, so you are free to incorporate it into your own code and use it as you wish.
● This library doesn't aim to offer something novel, but rather simplifies and standardizes components that are commonly implemented by developers.
● Of course, there are also newly developed components such as Spinner/ThreeStateButton/RGBAColorPicker/PieStyleSlider.
● This library consists of two files (CustomUI.cs/CustomUIInterface.cs) and can be freely modified or used.
● You can refer to CustomUIExample1.cs/CustomUIExample2.cs/CustomUIExample3.cs/CustomUIExample4.cs for detailed examples of usage.
● All configurable functions of the UI component are implemented using the Builder-Pattern.
● add : Implementation of ConfirmBoxUI
● add : implemented the setDisplayChoices feature in BaseChooserUI and BaseChooserSimpleUI (request by @hazmhox )
● fix : UIUtil Coroutine bug in CustomUI.cs (report by @hazmhox )
As with most plugins, when saving or loading settings or files, overwriting often occurs without any warning,
and I’ve lost my work more than once because of it. My plugins are also developed in this rather unfriendly way.
For this purpose, I developed a customizable confirm box feature.
● add : implemented the setDisplayChoices feature in BaseChooserUI and BaseChooserSimpleUI (request by @hazmhox )
● fix : UIUtil Coroutine bug in CustomUI.cs (report by @hazmhox )
As with most plugins, when saving or loading settings or files, overwriting often occurs without any warning,
and I’ve lost my work more than once because of it. My plugins are also developed in this rather unfriendly way.
For this purpose, I developed a customizable confirm box feature.
C#:
var confirm = initConfirmUI(this, containingAtom, CreateUIElement, result =>
{
if (false) {}
else if (result == $"Save")
{
// do something
}
else if (result == $"Cancel")
{
// do something
}
});
confirm.showPopup(true);
● add : Implementation mouse wheel scrolling functionality for sliderUI elements (BaseSliderUI, BaseSliderSimpleUI, BaseSliderPieUI) using ui.setWheelSupport(true).
● fix : some minor bug fixed, missing close() implementation
● fix : some minor bug fixed, missing close() implementation
● fix : Embedding the Chooser inside CustomLayoutUI causes its popup to be visually obstructed by other UIDynamic/CustomUI components.
● fix : SliderToggleUI and DonutSliderUI are overflowing beyond the scrollable area of the plugin window.
● fix : SliderToggleUI and DonutSliderUI are overflowing beyond the scrollable area of the plugin window.
● fix : some minor bug fix, and refactor BaseSpinnerUI, BaseSliderSimpleUI
● add : implementation of slider-style toggle UI component
● add : implementation of slider-style toggle UI component
● fix : minor bug fixes related to ButtonToggleUI, ButtonThreeStateUI
● add : implementation of pie-style slider UI component
● add : implementation of pie-style slider UI component
● fix : some minor bug fix
● fix : callbacks issue through the alpha channel of ColorPickerRGBA.
● add : implementation of InputTextScrollBoxUI functionality, it is both scrollable and selectable.
● add : demo UI, CustomUIExample4.cs
● fix : callbacks issue through the alpha channel of ColorPickerRGBA.
● add : implementation of InputTextScrollBoxUI functionality, it is both scrollable and selectable.
● add : demo UI, CustomUIExample4.cs
● fix resizing issue of ButtonToggle
● fix resizing issue of ThreeStateButton
● fix resizing issue of ThreeStateButton
● fix : drag selection issue in textfield and refactor close method
● This is the default UI of VAM.
● Additionally, color and text features have been added.
● Additionally, color and text features have been added.
C#:
using CustomUI14mhz;
var a = CustomUI.addSpacer(this, true);
var b = CustomUI.addSpacer(this, true, 35);
var c = CustomUI.addSpacer(this, true, 100);
var d = CustomUI.addSpacer(this, true).setBackgroundColor(new Color(1, 0, 0, 0.3f));
var e = CustomUI.addSpacer(this, true, 35).setValue("simple text");
var f = CustomUI.addSpacer(this, true, 35).setValue("simple text").setTextAlign(TextAnchor.MiddleLeft);
var g = CustomUI.addSpacer(this, true, 35).setValue("simple text").setTextAlign(TextAnchor.MiddleRight);
var h = CustomUI.addSpacer(this, true, 50).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setTextFontSize(40).setTextColor(Color.black).setTextFontStyle(FontStyle.Bold);
h.val = "simple text";
● It automatically adjusts spacer padding based on the presence of left and right UI components.
● Additionally, color and text features have been added for debugging.
● Additionally, color and text features have been added for debugging.
C#:
using CustomUI14mhz;
CustomUI.addLabel(this, true, "dummy1").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
CustomUI.addLabel(this, true, "dummy2").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
CustomUI.addLabel(this, true, "dummy3").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var a = CustomUI.addSpacerAuto(this, CreateUIElement, 0f).setValue("Auto Padding Debug Text";
CustomUI.addLabel(this, false, "dummy1").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
CustomUI.addLabel(this, false, "dummy2").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
CustomUI.addLabel(this, false, "dummy3").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var b = CustomUI.addSpacerAuto(this, CreateUIElement).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setValue("Auto Padding Debug (default height 50f)";
CustomUI.addLabel(this, true, "dummy1").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
CustomUI.addLabel(this, true, "dummy2").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
CustomUI.addLabel(this, true, "dummy3").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var c = CustomUI.addSpacerAuto(this, CreateUIElement, 35f).setBackgroundColor(new Color(0, 1, 1, 0.3f)).setValue("Auto Padding Debug (height 35f)";
CustomUI.addLabel(this, true, "dummy1").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
CustomUI.addLabel(this, false, "dummy2").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
● This is a separator, and its thickness can be adjusted.
C#:
using CustomUI14mhz;
var a = CustomUI.addLabel(this, true, "dummy1").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var b = CustomUI.addSeparator(this, true);
var c = CustomUI.addLabel(this, true, "dummy2").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var d = CustomUI.addSeparator(this, true, 8f);
var e = CustomUI.addLabel(this, true, "dummy3").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var f = CustomUI.addSeparator(this, true, 16f);
var g = CustomUI.addLabel(this, true, "dummy4").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var h = CustomUI.addSeparator(this, true, 32f);
var i = CustomUI.addLabel(this, true, "dummy5").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var j = CustomUI.addSeparator(this, true).setBackgroundColor(Color.red);
var k = CustomUI.addLabel(this, true, "dummy6").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var l = CustomUI.addSeparator(this, true, 8f).setBackgroundColor(Color.magenta);
var m = CustomUI.addLabel(this, true, "dummy7").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var n = CustomUI.addSeparator(this, true).setValue(16f).setBackgroundColor(Color.green);
var o = CustomUI.addLabel(this, true, "dummy8").setBackgroundColor(new Color(0, 0, 0, 0.1f)).setTextColor(new Color(0, 0, 0, 0.3f));
var p = CustomUI.addSeparator(this, true).setBackgroundColor(Color.blue);
p.val = 32f;
● This is a label component with configurable background color and font settings.
C#:
using CustomUI14mhz;
var a = CustomUI.addLabel(this, true, "Test Label1");
var b = CustomUI.addLabel(this, true, "Test Label2", 50f);
var c = CustomUI.addLabel(this, true, "Test Label3", 100f);
var d = CustomUI.addLabel(this, true, "Test Label4").setBackgroundColor(new Color(1, 0, 0, 0.3f));
var e = CustomUI.addLabel(this, true, "Test Label5").setValue("Changed Text");
var f = CustomUI.addLabel(this, true, "Test Label6").setTextAlign(TextAnchor.MiddleLeft);
var g = CustomUI.addLabel(this, true, "Test Label7").setTextAlign(TextAnchor.MiddleRight);
var h = CustomUI.addLabel(this, true, "", 50).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setTextFontSize(40).setTextColor(Color.black).setTextFontStyle(FontStyle.Bold);
h.val = "Test Label";
● This is a read-only info-text element with configurable background color and font settings.
C#:
using CustomUI14mhz;
String text = "aaaaa <color=#A00><size=48>bbbbb</size></color> <color=#00A><b>ccccc</b></color>";
var a = CustomUI.addInfoText(this, true, "Test InfoText1", text);
var b = CustomUI.addInfoText(this, true, "Test InfoText2", text, 50);
var c = CustomUI.addInfoText(this, true, "Test InfoText3", text, 200);
var d = CustomUI.addInfoText(this, true, "Test InfoText4", text).setBackgroundColor(new Color(1, 0, 0, 0.3f));
var e = CustomUI.addInfoText(this, true, "Test InfoText5", text).setValue("Changed Text");
var f = CustomUI.addInfoText(this, true, "Test InfoText6", text).setTextAlign(TextAnchor.MiddleLeft);
var g = CustomUI.addInfoText(this, true, "Test InfoText7", text).setTextAlign(TextAnchor.MiddleRight);
var h = CustomUI.addInfoText(this, true, "Test InfoText8", text).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setTextFontSize(40).setTextColor(Color.black).setTextFontStyle(FontStyle.Bold);
h.val = "Test InfoText ...";
● This is a editable info-text element with configurable background color and font settings.
C#:
using CustomUI14mhz;
String text = "aaaaa <color=#A00><size=48>bbbbb</size></color> <color=#00A><b>ccccc</b></color>";
var a = CustomUI.addInputText(this, true, "Test InputText1", "aaaaa bbbbb ccccc");
var b = CustomUI.addInputText(this, true, "Test InputText2", "aaaaa bbbbb ccccc", 50);
var c = CustomUI.addInputText(this, true, "Test InputText3", text, 200);
var d = CustomUI.addInputText(this, true, "Test InputText4", "aaaaa bbbbb ccccc").setBackgroundColor(new Color(1, 0, 0, 0.3f));
var e = CustomUI.addInputText(this, true, "Test InputText5", "aaaaa bbbbb ccccc").setValue("Changed Text");
var f = CustomUI.addInputText(this, true, "Test InputText6", "aaaaa bbbbb ccccc").setTextAlign(TextAnchor.MiddleLeft);
var g = CustomUI.addInputText(this, true, "Test InputText7", "aaaaa bbbbb ccccc").setTextAlign(TextAnchor.MiddleRight);
var h = CustomUI.addInputText(this, true, "Test InputText8", "aaaaa bbbbb ccccc", 50).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setTextFontSize(40).setTextColor(Color.black).setTextFontStyle(FontStyle.Bold);
h.val = "Test InputText ...";
● This component is an editable info text paired with a label.
● It supports customization of background color and font, as well as flexible positioning of the label and input field.
● It supports customization of background color and font, as well as flexible positioning of the label and input field.
C#:
using CustomUI14mhz;
var a = CustomUI.addInputTextWithLabel(this, true, "InputText1", "aaaaa bbbbb ccccc");
var b = CustomUI.addInputTextWithLabel(this, true, "InputText2", "aaaaa bbbbb ccccc", 35).addTextOffset(0, 8);
var c = CustomUI.addInputTextWithLabel(this, true, "InputText3", "aaaaa bbbbb ccccc", 100);
var d = CustomUI.addInputTextWithLabel(this, true, "InputText4", "aaaaa bbbbb ccccc").setBackgroundColor(new Color(1, 0, 0, 0.3f));
var e = CustomUI.addInputTextWithLabel(this, true, "InputText5", "aaaaa bbbbb ccccc").setValue("Changed Text");
var f = CustomUI.addInputTextWithLabel(this, true, "InputText6", "aaaaa bbbbb ccccc").setTextAlign(TextAnchor.MiddleLeft);
var g = CustomUI.addInputTextWithLabel(this, true, "InputText7", "aaaaa bbbbb ccccc").setTextAlign(TextAnchor.MiddleRight);
var h = CustomUI.addInputTextWithLabel(this, true, "InputText8", "aaaaa bbbbb ccccc").setTextFontSize(32).setTextColor(Color.red).setTextFontStyle(FontStyle.Bold);
var i = CustomUI.addInputTextWithLabel(this, true, "InputText9", "aaaaa bbbbb ccccc").setLabelAlign(TextAnchor.MiddleLeft);
var j = CustomUI.addInputTextWithLabel(this, true, "InputText10", "aaaaa bbbbb ccccc").setLabelAlign(TextAnchor.MiddleRight);
var k = CustomUI.addInputTextWithLabel(this, true, "InputText11", "aaaaa bbbbb ccccc").setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold);
var l = CustomUI.addInputTextWithLabel(this, true, "InputText12", "aaaaa bbbbb ccccc").setLabelTextWeight(0.2f);
var m = CustomUI.addInputTextWithLabel(this, true, "InputText13", "aaaaa bbbbb ccccc").setLabelTextWeight(0.8f);
h.val = "Test InputText ...";
● This is also the default UI of VAM.
C#:
using CustomUI14mhz;
var a = CustomUI.addButton(this, true, "Button1").setCallback(callback);
var b = CustomUI.addButton(this, true, "Button2").setHeight(35).setCallback(callback);
var c = CustomUI.addButton(this, true, "Button3").setHeight(100).setCallback(callback);
var d = CustomUI.addButton(this, true, "Button4").setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback);
var e = CustomUI.addButton(this, true, "Button5").setValue("Changed Name").setCallback(callback);
var f = CustomUI.addButton(this, true, "Button6").setTextAlign(TextAnchor.MiddleLeft).setCallback(callback);
var g = CustomUI.addButton(this, true, "Button7").setTextAlign(TextAnchor.MiddleRight).setCallback(callback);
var h = CustomUI.addButton(this, true, "Button8").setHeight(60).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setTextFontSize(48).setTextColor(Color.yellow).setTextFontStyle(FontStyle.Bold).setCallback(callback);
h.val = "Test Button";
● This component is a button with a label.
● It supports customization of background color and font, as well as flexible positioning of the label and button.
● It supports customization of background color and font, as well as flexible positioning of the label and button.
C#:
using CustomUI14mhz;
var a = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel1").setCallback(callback);
var b = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel2").setHeight(35).setCallback(callback);
var c = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel3").setHeight(100).setCallback(callback);
var d = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel4").setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback);
var e = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel5").setValue("Changed Text").setCallback(callback);
var f = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel6").setTextAlign(TextAnchor.MiddleLeft).setCallback(callback);
var g = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel7").setTextAlign(TextAnchor.MiddleRight).setCallback(callback);
var h = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel8").setTextFontSize(32).setTextColor(Color.red).setTextFontStyle(FontStyle.Bold).setCallback(callback);
var i = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel9").setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback);
var j = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel10").setLabelAlign(TextAnchor.MiddleRight).setCallback(callback);
var k = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel11").setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback);
var l = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel12").setLabelTextWeight(0.2f).setCallback(callback);
var m = CustomUI.addButtonWithLabel(this, true, "Label", "ButtonLabel13").setLabelTextWeight(0.8f).setCallback(callback);
h.val = "Test Button";
● This is the default UI of VAM.
C#:
using CustomUI14mhz;
var a = CustomUI.addButtonToggle(this, true, "Toggle1", true).setCallback(callback).register();
var b = CustomUI.addButtonToggle(this, true, "Toggle2", true).setHeight(35).setCallback(callback).register();
var c = CustomUI.addButtonToggle(this, true, "Toggle3", true).setHeight(100).setCallback(callback).register();
var d = CustomUI.addButtonToggle(this, true, "Toggle4", true).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var e = CustomUI.addButtonToggle(this, true, "Toggle5", false).setValue(true).setCallback(callback).register();
var f = CustomUI.addButtonToggle(this, true, "Toggle6", false).setTextAlign(TextAnchor.MiddleCenter).setCallback(callback).register();
var g = CustomUI.addButtonToggle(this, true, "Toggle7", false).setTextAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var h = CustomUI.addButtonToggle(this, true, "Toggle8", false).setHeight(60).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setTextFontSize(48).setTextColor(Color.yellow).setTextFontStyle(FontStyle.Bold).setCallback(callback).register();
h.val = true;
● This toggle button supports three distinct states.
● The checkbox supports three states: 0 for empty, 1 for partially checked, and 2 for fully checked.
● Additionally, the component can be set up to handle an arbitrary number of states.
● The checkbox supports three states: 0 for empty, 1 for partially checked, and 2 for fully checked.
● Additionally, the component can be set up to handle an arbitrary number of states.
C#:
using CustomUI14mhz;
var a = CustomUI.addButtonThreeState(this, true, "ThreeState1", 0).setCallback(callback).register();
var b = CustomUI.addButtonThreeState(this, true, "ThreeState2", 0).setHeight(35).setCallback(callback).register();
var c = CustomUI.addButtonThreeState(this, true, "ThreeState3", 0).setHeight(100).setCallback(callback).register();
var d = CustomUI.addButtonThreeState(this, true, "ThreeState4", 0).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var e = CustomUI.addButtonThreeState(this, true, "ThreeState5", 1).setValue(0).setCallback(callback).register();
var f = CustomUI.addButtonThreeState(this, true, "ThreeState6", 1).setTextAlign(TextAnchor.MiddleCenter).setCallback(callback).register();
var g = CustomUI.addButtonThreeState(this, true, "ThreeState7", 2).setTextAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var h = CustomUI.addButtonThreeState(this, true, "ThreeState8", 2).setHeight(60).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setTextFontSize(48).setTextColor(Color.yellow).setTextFontStyle(FontStyle.Bold).setCallback(callback).register();
var i = CustomUI.addButtonThreeState(this, true, "5-States", 0, 5).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
h.val = 0;
● This component is a Spinner with a label.
● Similar to a Slider component, it allows setting a minimum value, maximum value, default value, and a customizable step size."
● It supports customization of background color and font, as well as flexible positioning of the label and inputfield.
● Similar to a Slider component, it allows setting a minimum value, maximum value, default value, and a customizable step size."
● It supports customization of background color and font, as well as flexible positioning of the label and inputfield.
C#:
using CustomUI14mhz;
var a = CustomUI.addSpinner(this, true, "Spinner1", 0, -10, +10).setCallback(callback).register();
var b = CustomUI.addSpinner(this, true, "Spinner2", 0, -10, +10).setHeight(35).setCallback(callback).addTextOffset(0, 8).register();
var c = CustomUI.addSpinner(this, true, "Spinner3", 0, -10, +10).setHeight(100).setCallback(callback).addTextOffset(0, -28).register();
var d = CustomUI.addSpinner(this, true, "Spinner4", 0, -10, +10).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var e = CustomUI.addSpinner(this, true, "Spinner5", 0, -10, +10, 0.1f, "F1").setValue(0.5f).setCallback(callback).register();
var f = CustomUI.addSpinner(this, true, "Spinner6", 0, -10, +10).setTextAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var g = CustomUI.addSpinner(this, true, "Spinner7", 0, -10, +10).setTextAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var h = CustomUI.addSpinner(this, true, "Spinner8", 0, -10, +10).setTextFontSize(32).setTextColor(Color.red).setTextFontStyle(FontStyle.Bold).setCallback(callback).register();
var i = CustomUI.addSpinner(this, true, "Spinner9", 0, -10, +10).setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var j = CustomUI.addSpinner(this, true, "Spinner10", 0, -10, +10).setLabelAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var k = CustomUI.addSpinner(this, true, "Spinner11", 0, -10, +10).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback).register();
var l = CustomUI.addSpinner(this, true, "Spinner12", 0, -10, +10, 0.1f, "F1").setLabelTextWeight(0.2f).setCallback(callback).register();
var m = CustomUI.addSpinner(this, true, "Spinner13", 0, -10, +10, 0.1f, "F1").setLabelTextWeight(0.6f).setCallback(callback).register();
h.val = -0.5f;
● This is a minimal slider component with a compact footprint.
● It supports customization of background color and font, as well as flexible positioning of the label and slider.
● It supports customization of background color and font, as well as flexible positioning of the label and slider.
C#:
using CustomUI14mhz;
var a = CustomUI.addSliderSimple(this, true, "SSlider1", 0, -10, +10).setCallback(callback).register();
var b = CustomUI.addSliderSimple(this, true, "SSlider2", 0, -10, +10).setHeight(35f).setCallback(callback).register();
var c = CustomUI.addSliderSimple(this, true, "SSlider3", 0, -10, +10).setHeight(200).setCallback(callback).register();
var d = CustomUI.addSliderSimple(this, true, "SSlider4", 0, -10, +10).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var e = CustomUI.addSliderSimple(this, true, "SSlider5", 0, -10, +10).setValue(0.5f).setCallback(callback).register();
var h = CustomUI.addSliderSimple(this, true, "SSlider8", 0, -10, +10).setTextFontSize(32).setTextColor(Color.red).setTextFontStyle(FontStyle.Bold).setCallback(callback).register();
var i = CustomUI.addSliderSimple(this, true, "SSlider9", 0, -10, +10).setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var j = CustomUI.addSliderSimple(this, true, "SSlider10", 0, -10, +10).setLabelAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var k = CustomUI.addSliderSimple(this, true, "SSlider11", 0, -10, +10).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback).register();
var l = CustomUI.addSliderSimple(this, true, "SSlider12", 0, -10, +10).setLabelTextWeight(0.2f).setCallback(callback).register();
var m = CustomUI.addSliderSimple(this, true, "SSlider13", 0, -10, +10).setLabelTextWeight(0.6f).setCallback(callback).register();
h.val = -0.5f;
● This is also the default UI of VAM.
C#:
using CustomUI14mhz;
var a = CustomUI.addSlider(this, true, "Slider1", 0, -10, +10).setCallback(callback).register();
var b = CustomUI.addSlider(this, true, "Slider2", 0, -10, +10).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var c = CustomUI.addSlider(this, true, "Slider3", 0, -10, +10).setValue(0.5f).setCallback(callback).register();
var d = CustomUI.addSlider(this, true, "Slider4", 0, -10, +10).setTextFontSize(32).setTextColor(Color.red).setTextFontStyle(FontStyle.Bold).setCallback(callback).register();
var e = CustomUI.addSlider(this, true, "Slider5", 0, -10, +10).setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var f = CustomUI.addSlider(this, true, "Slider6", 0, -10, +10).setLabelAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var g = CustomUI.addSlider(this, true, "Slider7", 0, -10, +10).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback).register();
d.val = -0.5f;
● This is a minimal chooser component with a compact footprint.
C#:
using CustomUI14mhz;
var a = CustomUI.addChooserSimple(this, true, "SChooser1").setPopList(list).setCallback(callback).register();
var b = CustomUI.addChooserSimple(this, true, "SChooser2").setPopList(list).setHeight(35f).setCallback(callback).register();
var c = CustomUI.addChooserSimple(this, true, "SChooser3").setPopList(list).setHeight(200).setCallback(callback).register();
var d = CustomUI.addChooserSimple(this, true, "SChooser4").setPopList(list).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setButtonColor(new Color(0.35f, 0.60f, 0.65f)).setCallback(callback).register();
var e = CustomUI.addChooserSimple(this, true, "SChooser5").setPopList(list).setValue("3").setCallback(callback).register();
var f = CustomUI.addChooserSimple(this, true, "SChooser6").setPopList(list).setButtonColor(new Color(0.55f, 0.30f, 0.30f)).setTextFontSize(32).setTextColor(Color.magenta).setTextFontStyle(FontStyle.Bold).setCallback(callback).register();
var g = CustomUI.addChooserSimple(this, true, "SChooser7").setPopList(list).setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var h = CustomUI.addChooserSimple(this, true, "SChooser8").setPopList(list).setLabelAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var i = CustomUI.addChooserSimple(this, true, "SChooser9").setPopList(list).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setButtonColor(new Color(0.35f, 0.60f, 0.65f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback).register();
var j = CustomUI.addChooserSimple(this, true, "SChooser10").setPopList(list).setLabelTextWeight(0.2f).setCallback(callback);
var k = CustomUI.addChooserSimple(this, true, "SChooser11").setPopList(list).setLabelTextWeight(0.6f).setCallback(callback);
f.val = "5";
● This is the default UI of VAM.
C#:
using CustomUI14mhz;
List<String>list = new[]{ "None", "1", "2", "3", "4", "5", "6" }.ToList();
var a = CustomUI.addChooser(this, true, "Chooser1", 0).setPopList(list).setCallback(callback).register();
var b = CustomUI.addChooser(this, true, "Chooser2", 1).setPopList(list).setCallback(callback).register();
var c = CustomUI.addChooser(this, true, "Chooser3").setPopList(list).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var d = CustomUI.addChooser(this, true, "Chooser4").setPopList(list).setValue("3").setCallback(callback).register();
var e = CustomUI.addChooser(this, true, "Chooser5").setPopList(list).setTextFontSize(32).setTextColor(Color.red).setTextFontStyle(FontStyle.Bold).setCallback(callback).register();
var f = CustomUI.addChooser(this, true, "Chooser6").setPopList(list).setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var g = CustomUI.addChooser(this, true, "Chooser7").setPopList(list).setLabelAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var h = CustomUI.addChooser(this, true, "Chooser8").setPopList(list).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback).register();
e.val = "5";
● This is a ColorPicker that stores values in RGBA format rather than HSV.
● Once the scene is saved, the .json file will contain data in the following format.
● Once the scene is saved, the .json file will contain data in the following format.
JSON:
"ColorRGBATest" : {
"r" : "0.245",
"g" : "0.9215686",
"b" : "0.01568627",
"a" : "0.415" }
C#:
using CustomUI14mhz;
var a = CustomUI.addColorPickerRGBA(this, true, "ColorRGBA1", Color.red).setCallback(callback).register();
var b = CustomUI.addColorPickerRGBA(this, true, "ColorRGBA2", Color.red).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var c = CustomUI.addColorPickerRGBA(this, true, "ColorRGBA3", Color.red).setValue(Color.cyan).setCallback(callback).register();
var d = CustomUI.addColorPickerRGBA(this, true, "ColorRGBA4", Color.red).setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var e = CustomUI.addColorPickerRGBA(this, true, "ColorRGBA5", Color.red).setLabelAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var f = CustomUI.addColorPickerRGBA(this, true, "ColorRGBA6", Color.red).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback).register();
f.val = Color.yellow;
● This is the default UI of VAM.
C#:
using CustomUI14mhz;
var a = CustomUI.addColorPicker(this, true, "ColorPicker1", Color.red).setCallback(callback).register();
var b = CustomUI.addColorPicker(this, true, "ColorPicker2", Color.red).setBackgroundColor(new Color(1, 0, 0, 0.3f)).setCallback(callback).register();
var c = CustomUI.addColorPicker(this, true, "ColorPicker3", Color.red).setValue(Color.cyan).setCallback(callback).register();
var d = CustomUI.addColorPicker(this, true, "ColorPicker4", Color.red).setLabelAlign(TextAnchor.MiddleLeft).setCallback(callback).register();
var e = CustomUI.addColorPicker(this, true, "ColorPicker5", Color.red).setLabelAlign(TextAnchor.MiddleRight).setCallback(callback).register();
var f = CustomUI.addColorPicker(this, true, "ColorPicker6", Color.red).setBackgroundColor(new Color(0, 0, 1, 0.6f)).setLabelFontSize(32).setLabelColor(Color.yellow).setLabelFontStyle(FontStyle.Bold).setCallback(callback).register();
f.val = Color.yellow;