-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
734afc4
commit 3c1d73d
Showing
5 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/scala/scatan/controllers/setup/SetUpController.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
package scatan.controllers.setup | ||
|
||
import scatan.mvc.lib.Controller | ||
import scatan.views.setup.SetUpView | ||
import scatan.mvc.lib.Model | ||
import scatan.example.model.CounterAppState | ||
|
||
trait SetUpController extends Controller | ||
|
||
class SetUpControllerImpl(dependencies: Controller.Requirements[SetUpView, CounterAppState]) extends SetUpController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package scatan.views.setup | ||
|
||
import scatan.mvc.lib.View | ||
import scatan.controllers.setup.SetUpController | ||
import com.raquo.laminar.api.L.* | ||
import scatan.mvc.lib.{NavigableApplicationManager, ScalaJSView, View} | ||
import scatan.Pages | ||
|
||
class ScalaJsSetUpView(requirements: View.Requirements[SetUpController], container: String) | ||
extends SetUpView | ||
with View.Dependencies(requirements) | ||
with ScalaJSView(container): | ||
|
||
def start(): Unit = | ||
print("Hello, world!") | ||
|
||
override def element: Element = | ||
// menu with 4 textbox for the players username and 4 dropdown for the players color and a button to start | ||
div( | ||
cls := "setup-view", | ||
// Title | ||
div( | ||
cls := "setup-title" | ||
), | ||
// Menu view with 3 buttons, play, settings and about, dispose them vertically | ||
div( | ||
cls := "setup-menu", | ||
button( | ||
cls := "setup-menu-button", | ||
onClick.mapTo(Pages.Home) --> NavigableApplicationManager.navigateTo, | ||
"Play" | ||
), | ||
button( | ||
cls := "setup-menu-button", | ||
onClick.mapTo(Pages.About) --> NavigableApplicationManager.navigateTo, | ||
"About" | ||
) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package scatan.views.setup | ||
|
||
import scatan.controllers.setup.SetUpController | ||
|
||
import scatan.Pages | ||
import scatan.mvc.lib.View | ||
|
||
trait SetUpView extends View: | ||
def start(): Unit |