/// <summary> /// Initializes a new instance of the <see cref="Virtex.Lib.Vrtc.GUI.Controls.vxSettingsGUIItem"/> class. /// </summary> /// <param name="position">Position.</param> public vxSettingsGUIItem(vxEngine Engine, vxGuiManager GUIManager, string Title, string Value, Vector2 position) : base(position) { GUIManager.Add(this); Label = new vxLabel(Engine, Title, position + new Vector2(10, 5)); GUIManager.Add(Label); ValueComboBox = new vxComboBox(Engine, Value, position + new Vector2(200, 10)); GUIManager.Add(ValueComboBox); Height = 40; }
/// <summary> /// Initializes a new instance of the <see cref="T:Virtex.Lib.Vrtc.GUI.Controls.vxKeyBindingSettingsGUIItem"/> class. /// </summary> /// <param name="Engine">Engine.</param> /// <param name="GUIManager">GUI Manager.</param> /// <param name="Title">Title.</param> /// <param name="KeyBinding">Key binding.</param> /// <param name="position">Position.</param> public vxKeyBindingSettingsGUIItem(vxEngine Engine, vxGuiManager GUIManager, string Title, KeyBinding KeyBinding, object id, Vector2 position) : base(position) { GUIManager.Add(this); this.KeyBinding = KeyBinding; BindingID = id; Label = new vxLabel(Engine, Title, position + new Vector2(10, 5)); GUIManager.Add(Label); Button = new vxButton(Engine, KeyBinding.Key.ToString(), position + new Vector2(200, 10)); Button.Clicked += delegate { TakingInput = true; Button.Text = "Press Any Key..."; Button.Colour = Color.CornflowerBlue; Button.Color_Normal = Color.CornflowerBlue; Button.Color_Highlight = Color.CornflowerBlue; }; GUIManager.Add(Button); Height = 40; }