feat: accent obert A

This commit is contained in:
Gerard Gascón 2024-04-16 16:42:32 +02:00
parent 63d0524d3c
commit 3e31ecc943
5 changed files with 17 additions and 3 deletions

View file

@ -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() {

View file

@ -0,0 +1,8 @@
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 }) { }
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d9af0ad3cdac447e803e2d16325ec74f
timeCreated: 1713278245

View file

@ -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);

View file

@ -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) {