File tree 3 files changed +22
-8
lines changed
3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 16
16
< div id ="botbtns " class ="btnblock "> </ div >
17
17
< div id ="controls ">
18
18
< input type ="text " id ="buffer ">
19
- < button class ="ctrlbtn " id =" clear "> Clear</ button >
20
- < button class ="ctrlbtn " id =" add "> Add</ button >
21
- < button class ="ctrlbtn " id ="reset "> Reset</ button >
19
+ < button class ="ctrlbtn " onclick =" clearbuffer() "> Clear</ button >
20
+ < button class ="ctrlbtn " onclick =" addchar() "> Add</ button >
21
+ < button class ="ctrlbtn " onclick ="reset() "> Reset</ button >
22
22
</ div >
23
23
</ div >
24
24
</ body >
Original file line number Diff line number Diff line change @@ -25,9 +25,6 @@ long.src = "assets/long.png";
25
25
var topbar = document . getElementById ( "topbtns" ) ;
26
26
var botbar = document . getElementById ( "botbtns" ) ;
27
27
28
- var tophalf = document . getElementById ( "half-top" ) ;
29
- var bothalf = document . getElementById ( "half-bot" ) ;
30
-
31
28
var toppart = 0 ;
32
29
var botpart = 0 ;
33
30
@@ -50,6 +47,23 @@ function update()
50
47
document . getElementById ( "dp-kix" ) . innerText = grid [ toppart ] [ botpart ] ;
51
48
}
52
49
50
+ function reset ( )
51
+ {
52
+ toppart = botpart = 0 ;
53
+ update ( ) ;
54
+ }
55
+
56
+ function clearbuffer ( )
57
+ {
58
+ document . getElementById ( "buffer" ) . value = "" ;
59
+ }
60
+
61
+ function addchar ( )
62
+ {
63
+ document . getElementById ( "buffer" ) . value += grid [ toppart ] [ botpart ] ;
64
+ reset ( ) ;
65
+ }
66
+
53
67
( function ( ) {
54
68
for ( var i = 0 ; i < blocks . length ; i ++ )
55
69
{
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ html, body {
5
5
6
6
# wrapper {
7
7
position : absolute;
8
- top : 10 % ;
8
+ top : 50 % ;
9
9
left : 50% ;
10
10
margin-right : -50% ;
11
- transform : translate (-50% , -10 % );
11
+ transform : translate (-50% , -50 % );
12
12
}
13
13
14
14
.stripe {
You can’t perform that action at this time.
0 commit comments