public InputRegion(IInputObject pInputObject) { this.m_pInputObject = pInputObject; // this.m_TextBox = new System.Windows.Forms.TextBox(); this.m_TextBox.ReadOnly = !this.m_pInputObject.CanEdit; this.m_TextBox.Font = this.m_pInputObject.InputFont; this.m_TextBox.ForeColor = this.m_pInputObject.InputForeColor; this.m_TextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.m_TextBox.Dock = System.Windows.Forms.DockStyle.Fill; this.m_TextBox.KeyDown += new KeyEventHandler(TextBox_KeyDown); this.m_TextBox.KeyPress += new KeyPressEventHandler(TextBox_KeyPress); this.m_TextBox.KeyUp += new KeyEventHandler(TextBox_KeyUp); this.m_TextBox.TextChanged += new EventHandler(TextBox_TextChanged); // Control textBoxContainer = new Control(); textBoxContainer.Dock = DockStyle.Fill; textBoxContainer.Controls.Add(this.m_TextBox); // this.m_ToolStripControlHost = new ToolStripControlHost(textBoxContainer); this.m_ToolStripControlHost.Dock = DockStyle.Fill; this.m_ToolStripControlHost.Margin = new Padding(0); this.m_ToolStripControlHost.Padding = new Padding(0); // this.Margin = new Padding(0); this.Padding = new Padding(0); this.DropShadowEnabled = false; this.Items.Add(this.m_ToolStripControlHost); // ((ISetOwnerHelper)this).SetOwner(this.m_pInputObject as IBaseItemOwner); }
public static void AssignInput(string commandName, IInputObject inpObj) { if (!cmds.ContainsKey(commandName)) { cmds[commandName] = new List <IInputObject>(); } cmds[commandName].Add(inpObj); }
public DoubleInputRegion(IInputObject pInputObject) : base(pInputObject) { this.AutoGetFocus = true; this.AutoSelectAll = false; //// //string[] strList = double.MaxValue.ToString().Split('.'); //if (strList.Length >= 2) READONLY_FLOATLENGTH = strList[1].Length; }
public static void RemoveInput(string commandName, IInputObject inpObj) { if (cmds.ContainsKey(commandName)) { cmds[commandName] = cmds[commandName].Where(x => x != inpObj).ToList(); if (cmds[commandName] == null || !cmds[commandName].Any()) { cmds.Remove(commandName); } } }
void ProcessEvent() { if (gameCamera == null) { gameCamera = Camera.main; } if (gameCamera.gameObject == null) { return; } pointer.mouseOrTouch = UICamera.currentTouch; pointer.ray = gameCamera.ScreenPointToRay(UICamera.currentTouch.pos); if (TownState.TownActive || G_GameInfo._GameInfo == null) { RaycastHit[] hits = Physics.RaycastAll(pointer.ray, Mathf.Infinity, InputCullingMask); for (int i = 0; i < hits.Length; i++) { // Terrain은 가장 가까운 객체 하나만 작동하도록 한다. int hitLayer = hits[i].collider.gameObject.layer; if (hitLayer == terrainLayer || hitLayer == terrainOutsideLayer) { if (prevTerrainLayer == terrainLayer) { continue; } prevTerrainLayer = hitLayer; } pointer.hitInfo = hits[i]; tempObj = (IInputObject)hits[i].collider.gameObject.GetComponent("IInputObject"); if (tempObj != null) { tempObj.InputEvent(pointer); //ppzz2 if (pointer.evt == POINTER_INFO.INPUT_EVENT.CLICK) { break; } } informNonUIHit(pointer); } } prevTerrainLayer = -1; }
public IntegerInputRegion(IInputObject pInputObject) : base(pInputObject) { this.AutoGetFocus = true; this.AutoSelectAll = false; }