MenuView class
This is the View representation of our app, but not the game itself. This class is used for the menu navigation. These MenuView's are only rendered after click events or when a level is over. So they are static once they are called.
Constructors
- MenuView()
Properties
- content ↔ HtmlElement
-
This is the content what one MenuView will display when it's rendered
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
chooseLevelsView(
int nrAvailableLevels, int reachedLevel) → MenuView - This is the view where the user can choose between all the levels he already unlocked by accomplishing the levels. All levels are displayed as a button with the corresponding level number in it.
-
creditsView(
) → MenuView - This is the credits view to display the creators of the game and to give a donations opportunity.
-
getBottomButtonBox(
) → DivElement - Returns a Button Box for two Buttons on the bottom of the view
-
getLogo(
) → HeadingElement -
Returns a new
HeadingElement
with the Dozer Title. This method is used on every MenuView, with corporate identity in mind ;) -
levelOverview(
int level, String levelInstruction) → MenuView - The levelOverview is the main view of all the MenuView's. On it the active level can be started, the number of the active level is displayed, it's highscore, and the buttons to get to the credits and choose level view.
-
messageLose(
bool timeout) → MenuView - This is the view which gets displayed when the user looses a level. If he didn't make it in time, then a different loose message gets displayed as he would get if he looses because his dozer ran into a brick.
-
messageNoSuchLevel(
int level) → MenuView -
This message will only be displayed if the user accomplishes the last
available level. Which at the moment, with
AppController._nrAvailableLevels
levels, shouldn't happen. -
messageNoSupportForGyro(
) → MenuView - This message view will be displayed mainly on desktop devices without the gyro sensor support or on mobile devices where the device orientation is disabled. It displays the QR-Code to give the user the chance to play it on another device. Else he can also play it on the current device.
-
messageWelcomeScreenOnMobile(
) → MenuView - This welcome view will only be displayed on mobile devices where the device orientation is available but the app was not started in fullscreen mode. This view is only used for a user interaction (namely a click event) to request the fullscreen mode. Since we give the opportunity to add the Webapp to the homescreen, this view should not be displayed often.
-
messageWin(
int score, bool newHighscore, int tries) → MenuView - This is the view, which gets displayed when the user wins a level. If he reaches a new highscore, the highscore and the number of tries are displayed. Else just the score is displayed. This can be changed easily because the parameter 'tries' is mandatory.
-
render(
) → void - The method will change the DOM-Tree according to the content
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited