void Start() { this.flexibleWindow = new FlexibleWindow(); this.intGUI = new IntGUI() { Title = "Int Value" }; this.floatGUI = new FloatGUI() { Title = "Float Value" }; this.boolGUI = new BoolGUI() { Title = "Bool Value" }; this.stringGUI = new StringGUI() { Title = "String Value", Value = "aiueo" }; this.vector2GUI = new Vector2GUI() { Title = "Vector2 Value" }; this.vector3GUI = new Vector3GUI() { Title = "Vector3 Value", Decimals = 3 }; this.vector4GUI = new Vector4GUI() { Title = "Vector4 Value", WithSlider = false }; }
void Start() { this.flexibleWindow = new FlexibleWindow(); this.flexibleWindow.MaxHeight = 200; this.tabPanel = new TabPanel() { Labels = new string[] { "Basic", "Vectors", "Others" } }; this.foldoutPanel = new FoldoutPanel() { Title = "Vectors" }; this.scrollPanel = new ScrollPanel() { MinWidth = 500, MinHeight = 150, }; this.intGUI = new IntGUI() { Title = "Int Value" }; this.floatGUI = new FloatGUI() { Title = "Float Value" }; this.stringGUI = new StringGUI() { Title = "String Value" }; this.boolGUI = new BoolGUI() { Title = "Bool Value" }; this.vector2GUI = new Vector2GUI() { Title = "Vector2 Value" }; this.vector3GUI = new Vector3GUI() { Title = "Vector3 Value" }; this.vector4GUI = new Vector4GUI() { Title = "Vector4 Value" }; this.ipv4GUI = new IPv4GUI() { Title = "IPv4 Value" }; this.colorGUI = new ColorGUI() { Title = "Color Value" }; }
void Start() { // NOTE: // Any other settings. // this.flexibleWindow.IsVisible // this.flexibleWindow.IsDraggable // this.flexibleWindow.MinHeight/MaxHeight // this.flexibleWindow.MinWidth/MaxWidth this.flexibleWindow = new FlexibleWindow(); this.flexibleWindow.Title = "Sample01"; this.intGUI = new IntGUI() { Title = "Int Value", BoldTitle = true, Value = this.intValue, MinValue = -10, MaxValue = 10, }; this.floatGUI = new FloatGUI() { Title = "Float Value", Value = this.floatValue, MinValue = 0, MaxValue = 100, Decimals = 3, }; }
void Awake() { XJGUILayout.DefaultMinValueVector2Int = new Vector2Int(-999, -999); XJGUILayout.DefaultMaxValueVector2Int = new Vector2Int(999, 999); this.window = new FlexibleWindow("Basic Sample"); this.tabPanel = new TabPanel(); this.foldoutPanel = new FoldoutPanel("Click to Open/Close"); this.scrollPanel = new ScrollPanel() { MinHeight = 100 }; this.boolGUI = new BoolGUI("Bool", this.boolValue); this.stringGUI = new StringGUI("String", this.stringValue) { FieldWidth = 250 }; this.intGUI = new IntGUI("Int", this.intValue); this.floatGUI = new FloatGUI("Float", this.floatValue, -1, 1); this.vector2GUI = new Vector2GUI("Vector2", this.vector2Value) { Decimals = 1 }; this.vector3GUI = new Vector3GUI("Vector3", this.vector3Value) { MinValue = Vector3.zero }; this.vector4GUI = new Vector4GUI("Vector4", this.vector4Value) { WithSlider = false }; this.vector2IntGUI = new Vector2IntGUI("Vector2Int", this.vector2IntValue); this.vector3IntGUI = new Vector3IntGUI("Vector3Int", this.vector3IntValue, Vector3Int.zero, Vector3Int.one); this.colorGUI = new ColorGUI("Color", this.colorValue); this.matrixGUI = new Matrix4x4GUI("Matrix4x4", this.matrixValue); this.ipv4GUI = new IPv4GUI("IPv4", this.ipv4Value); this.enumGUI = new EnumGUI <CameraType>("Enum", this.enumValue); }
/// <summary> /// 新しいインスタンスを初期化します。 /// </summary> /// <param name="value"> /// 初期値。 /// </param> public Vector2GUI(Vector2 value) { this.x = new FloatGUI(value.x); this.y = new FloatGUI(value.y); this.value = value; }