Skip to content

Commit

Permalink
basic buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
jayshrivastava committed Apr 4, 2024
1 parent 8060739 commit 0fc37f9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ fn App() -> impl IntoView {
</For>
</div>
<div class=styles::arrow_container>
<div class=styles::arrow_button> "◀️"</div>
<div class=styles::arrow_button> "🔽" </div>
<div class=styles::arrow_button> "⏬" </div>
<div class=styles::arrow_button> "▶️" </div>
<button class=styles::arrow_button on:click=move |_| { handle_key_press(KEY_A); }> "<"</button>
<button class=styles::arrow_button on:click=move |_| { handle_key_press(KEY_S); }> "."</button>
<button class=styles::arrow_button on:click=move |_| { handle_key_press(KEY_W); }> "^"</button>
<button class=styles::arrow_button on:click=move |_| { handle_key_press(KEY_D); }> ">"</button>

</div>
</div>
}
Expand Down
9 changes: 5 additions & 4 deletions src/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ body {
margin-top: 10px;
margin-left: auto;
margin-right: auto;
width: 150px;
width: 170px;

display: grid;
grid-template-columns: repeat(4, 25px);
gap: 15px;
gap: 20px;
}

.arrow-button{
text-align: center;
width: 25px;
height: 25px;
width: 35px;
height: 35px;
font-size: 25px;
padding: 0;
}
9 changes: 5 additions & 4 deletions styles/bundled.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ body {
margin-top: 10px;
margin-left: auto;
margin-right: auto;
width: 150px;
width: 170px;

display: grid;
grid-template-columns: repeat(4, 25px);
gap: 15px;
gap: 20px;
}

.arrow-button-94e563a{
text-align: center;
width: 25px;
height: 25px;
width: 35px;
height: 35px;
font-size: 25px;
padding: 0;
}

0 comments on commit 0fc37f9

Please sign in to comment.