public void LoadContent(Console console) { Console = console; Console.FontChanged += (s, e) => { CalculateInputPrefixWidth(); _inputBuffer.Font = console.Font; SetDirty(); }; _inputBuffer.Font = console.Font; Console.WindowAreaChanged += (s, e) => SetDirty(); Caret.Moved += (s, e) => SetDirty(); CalculateInputPrefixWidth(); Caret.LoadContent(this); RepeatingInput.LoadContent(this); InputHistory.LoadContent(this); Autocompletion.LoadContent(this); CopyPasting.LoadContent(this); Movement.LoadContent(this); Tabbing.LoadContent(this); Deletion.LoadContent(this); CommandExecution.LoadContent(this); CaseSenitivity.LoadContent(this); Selection.LoadContent(this); _loaded = true; }
public void Update(float deltaSeconds) { Input.Update(); ProcessInput(Input); Caret.Update(deltaSeconds); RepeatingInput.Update(deltaSeconds); if (_dirty) { CalculateStartAndEndIndices(); _dirty = false; } }