Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e9d5f411
Commit
e9d5f411
authored
Nov 04, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1889 from vlidholt/master
Fixes navigation back to main menu in demo game
parents
84b740a4
52c291a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
main.dart
examples/game/lib/main.dart
+4
-2
No files found.
examples/game/lib/main.dart
View file @
e9d5f411
...
...
@@ -96,6 +96,8 @@ class GameDemoState extends State<GameDemo> {
}
Widget
_buildMainScene
(
RouteArguments
args
)
{
NavigatorState
navigatorState
=
Navigator
.
of
(
args
.
context
);
return
new
Stack
(<
Widget
>[
new
SpriteWidget
(
new
MainScreenBackground
(),
SpriteBoxTransformMode
.
fixedWidth
),
new
Column
(<
Widget
>[
...
...
@@ -108,10 +110,10 @@ class GameDemoState extends State<GameDemo> {
_sounds
,
(
int
lastScore
)
{
setState
(()
{
_lastScore
=
lastScore
;
});
Navigator
.
of
(
args
.
context
)
.
pop
();
navigatorState
.
pop
();
}
);
Navigator
.
of
(
args
.
context
)
.
pushNamed
(
'/game'
);
navigatorState
.
pushNamed
(
'/game'
);
},
texture:
_spriteSheetUI
[
'btn_play_up.png'
],
textureDown:
_spriteSheetUI
[
'btn_play_down.png'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment