From b8479336501ad50994659aec26790ca2acc691ca Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Thu, 11 Mar 2021 11:32:26 -0500 Subject: [PATCH 1/7] Make some visual improvements to mcdu.html --- mcdu.html | 152 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 115 insertions(+), 37 deletions(-) diff --git a/mcdu.html b/mcdu.html index 28e57ea7..354af40e 100644 --- a/mcdu.html +++ b/mcdu.html @@ -1,8 +1,9 @@ + MCDU - + + - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
   
11
22
33
44
55
66
  
@@ -119,11 +196,11 @@ - - - - - + + + + + @@ -167,13 +244,13 @@ Z / SP - OVFY + OVFY
△ CLR - + @@ -204,8 +281,9 @@ - +
AIR
PORT
AIR
PORT
. 0-+/-
+ From 81a5f5ba01c88e42e65987cc6ad6ca7984783466 Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Thu, 11 Mar 2021 11:47:58 -0500 Subject: [PATCH 2/7] Make the "+/-" button take up less space --- mcdu.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mcdu.html b/mcdu.html index 354af40e..64b5acf1 100644 --- a/mcdu.html +++ b/mcdu.html @@ -150,10 +150,10 @@ - + - + @@ -281,7 +281,8 @@ - +
   
. 0+/-+/- +
From ff7c4e93f5ec6e9e13a5d4eb2c2ead4a39be0443 Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Thu, 11 Mar 2021 12:51:41 -0500 Subject: [PATCH 3/7] Add extra button at top to align buttons --- mcdu.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcdu.html b/mcdu.html index 64b5acf1..89a6185a 100644 --- a/mcdu.html +++ b/mcdu.html @@ -150,10 +150,10 @@ - + - + From 489d20e09bdf3f61ea6fc5cf95a0582fb8c9e213 Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Thu, 11 Mar 2021 14:12:20 -0500 Subject: [PATCH 4/7] Fix buttons --- mcdu.html | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/mcdu.html b/mcdu.html index 89a6185a..526d43e5 100644 --- a/mcdu.html +++ b/mcdu.html @@ -50,7 +50,8 @@ tds = document.querySelectorAll('.enter td'); for (const td of tds) { td.addEventListener('click', function () { - press_button(td.nextSibling ? "lskbutton" : "rskbutton", td.textContent); + press_button(td.nextSibling ? "lskbutton" : "rskbutton", td.getAttribute("button-id")); + console.log(td.getAttribute("button-id")); }, true); } tds = document.querySelectorAll('.menu td'); @@ -156,32 +157,32 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + +





@@ -196,11 +197,11 @@ - - - - - + + + + + @@ -281,7 +282,9 @@ . 0 - +/- + + +/- From 893c24cee1cc0e8f70d33f66dd214e9b879fd88b Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Thu, 11 Mar 2021 14:53:54 -0500 Subject: [PATCH 5/7] Bug fix Fix pressing right and left key both triggers left button bug. --- mcdu.html | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/mcdu.html b/mcdu.html index 526d43e5..5487fe9d 100644 --- a/mcdu.html +++ b/mcdu.html @@ -50,8 +50,7 @@ tds = document.querySelectorAll('.enter td'); for (const td of tds) { td.addEventListener('click', function () { - press_button(td.nextSibling ? "lskbutton" : "rskbutton", td.getAttribute("button-id")); - console.log(td.getAttribute("button-id")); + press_button(td.getAttribute("button-side") == "l" ? "lskbutton" : "rskbutton", td.getAttribute("button-id")); }, true); } tds = document.querySelectorAll('.menu td'); @@ -157,28 +156,28 @@
- — - — + — + — - — - — + — + — - — - — + — + — - — - — + — + — - — - — + — + — - — - — + — + —
From 32aa95febebcb5d5e9e592efa2f73ff900ec6cca Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Thu, 11 Mar 2021 15:43:04 -0500 Subject: [PATCH 6/7] Fix spacing --- mcdu.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mcdu.html b/mcdu.html index 5487fe9d..b94a45ee 100644 --- a/mcdu.html +++ b/mcdu.html @@ -148,7 +148,7 @@ - +


- + @@ -248,7 +248,7 @@ - +
From b242fe0feb16d6c9a03a36db34ee8d7f0c098fbe Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Thu, 11 Mar 2021 15:52:16 -0500 Subject: [PATCH 7/7] Sans-serif because serif looks worse --- mcdu.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mcdu.html b/mcdu.html index b94a45ee..ec2904ad 100644 --- a/mcdu.html +++ b/mcdu.html @@ -84,6 +84,7 @@ padding: 0; background-color: black; color: white; + font-family: sans-serif; } table {
AIR
PORT