/// <summary> /// Edits the given object value using the editor style provided by /// GetEditorStyle. A service provider is provided so that any /// required editing services can be obtained. /// </summary> public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { object returnValue = value; if (provider == null) { return(value); } IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { if (cursorUI == null) { cursorUI = new CursorUI(this); } cursorUI.Start(edSvc, value); edSvc.DropDownControl(cursorUI); value = cursorUI.Value; cursorUI.End(); } return(value); }
void Start() { im = GlobalVars.interact_mode; aui = GlobalVars.action_text_ui; cui = GlobalVars.cursor_ui; inv = GlobalVars.inventory; }
public void OnBeginDrag(PointerEventData eventData) { //print (eventData.pointerDrag); GameManager.GetMenu("InvButton").GetComponentInChildren <SelectedSlotScript>().UpdateSlot(item); GameManager.slotItem = item; GameManager.currentItem = item; //CursorScript.EnableCursor (); CursorUI.EnableCursor(); isOn = true; }
public TextFieldUI() { cursor = new CursorUI(this) { PanelColor = Theme.SpecialColor }; Add(currentDisplay); Add(editingDisplay); editingDisplay.Add(cursor); }
void Update() { if (Input.GetMouseButtonDown(0) && IsOn(GetMenu("Speech"))) { TurnOffMenu(GetMenu("Speech")); } if (!Input.GetMouseButton(0)) { currentItem = null; CursorUI.DisbleCursor(); } }
public override object EditValue (ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider == null) return value; IWindowsFormsEditorService service = (IWindowsFormsEditorService)provider.GetService (typeof (IWindowsFormsEditorService)); if (service == null) return value; CursorUI ui = new CursorUI (this, service, value); service.DropDownControl (ui); return ui.Value; }
public void Start() { im = GlobalVars.interact_mode; dm = GlobalVars.dialogue_manager; cui = GlobalVars.cursor_ui; dui = GlobalVars.description_ui; aui = GlobalVars.action_text_ui; if(GlobalVars.database == null || dm == null || im == null || GlobalVars.database == null) this.enabled = false; // dont run script if we are missing dependacies else myData = GlobalVars.database.GetCharacter(CharacterId); MouseOver = false; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService) provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc == null) { return value; } if (this.cursorUI == null) { this.cursorUI = new CursorUI(this); } this.cursorUI.Start(edSvc, value); edSvc.DropDownControl(this.cursorUI); value = this.cursorUI.Value; this.cursorUI.End(); } return value; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider == null) { return(value); } IWindowsFormsEditorService service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (service == null) { return(value); } CursorUI ui = new CursorUI(this, service, value); service.DropDownControl(ui); return(ui.Value); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider is null) { return(value); } if (!(provider.GetService(typeof(IWindowsFormsEditorService)) is IWindowsFormsEditorService edSvc)) { return(value); } if (_cursorUI is null) { _cursorUI = new CursorUI(this); } _cursorUI.Start(edSvc, value); edSvc.DropDownControl(_cursorUI); value = _cursorUI.Value; _cursorUI.End(); return(value); }
private void Awake() { cursorMaterial = Renderer.material; terrainEditor = GetComponent <TerrainEditor>(); CursorUI = GetComponentInChildren <CursorUI>(); }
public void OnBeginDrag(PointerEventData eventData) { GameManager.currentItem = item; //CursorScript.EnableCursor (); CursorUI.EnableCursor(); }
void Start() { rm = GlobalVars.room_manager; im = GlobalVars.interact_mode; aui = GlobalVars.action_text_ui; cui = GlobalVars.cursor_ui; MouseOver = false; }
void Start() { db = GlobalVars.database; if(db == null) // no database, means script cant do shit this.enabled = false; else { myObjectData = db.GetObject(object_id); if(myObjectData == null) this.enabled = false; } im = GlobalVars.interact_mode; aui = GlobalVars.action_text_ui; di = GlobalVars.description_ui; inv = GlobalVars.inventory; cui = GlobalVars.cursor_ui; MouseOver = false; }