Commit 3e31ecc9 authored by Gerard Gascón's avatar Gerard Gascón
Browse files

feat: accent obert A

parent 63d0524d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ namespace Domain {
			_readers.Add(typeof(TjReader), new TjReader(_history));
			_readers.Add(typeof(LlReader), new LlReader(_history));
			_readers.Add(typeof(SsReader), new SsReader(_history));
			_readers.Add(typeof(AObertaReader), new AObertaReader(_history));
		}

		public void UpdateInput() {
+8 −0
Original line number Diff line number Diff line
using System.Collections.Generic;
using System.Linq;

namespace Domain.Input {
	public class AObertaReader : SequentialInputReader {
		public AObertaReader(KeyHistory history) : base(history, new List<int>{ 0xBA, 0x41 }) { }
	}
}
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
fileFormatVersion: 2
guid: d9af0ad3cdac447e803e2d16325ec74f
timeCreated: 1713278245
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@ namespace Domain {
	public class KeyHistory {
		private readonly LimitedSizeList<int> _lastPresses = new(10);

		private readonly int[] _customKeys = { 191, 51, 222, 186 };
		private readonly bool[] _isPressed = new bool[26 + 5];
		private readonly bool[] _wasPressed = new bool[26 + 5];
		private readonly int[] _customKeys = { 191, 51, 222, 186, 0xBA };
		private readonly bool[] _isPressed = new bool[26 + 6];
		private readonly bool[] _wasPressed = new bool[26 + 6];

		public void KeyPressed(int key) => _lastPresses.Add(key);

+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ namespace View.UI {
				_click.Execute();
			if (_customInput.KeyDown(typeof(TxReader)))
				_click.Execute();
			if(_customInput.KeyDown(typeof(AObertaReader)))
				_click.Execute();
		}

		public void UpdateView(int score) {