public TextBox(HandlerAction h, Color textColor, Color placeHolderColor, Rectangle l = new Rectangle(), String val = "") : base(App.Game) { location = l; gs = new GameString(val, TextManager.EFont.AHARONI, textColor, 0.5f, new Vector2((float)l.X + 10, (float)(l.Y + 45))); Active = true; handler = h; placeHolder = new GameString("TAP HERE", TextManager.EFont.AHARONI, placeHolderColor, 0.5f); placeHolder.Pos = new Vector2((float)(l.Center.X - TextManager.Instance.getSizeString(TextManager.EFont.AHARONI, placeHolder.Value).X * placeHolder.Scale / 2), (float)(l.Y + 45)); }
private void ExecAction(HandlerAction action) { if (action.exception != null) { _settings.exception(this, action.exception); } else { Session session = OnAccept(action.socket); session.Start(); _settings.accept(this, session); } action.server = null; action.socket = null; action.exception = null; action.Release(); }