Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OrbGame
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
OrbGame
Commits
086c63b7
Commit
086c63b7
authored
Jul 22, 2020
by
Florian Blasius
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update.
parent
c4ba74ca
Pipeline
#8082
failed with stages
in 2 minutes and 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
crates/api/src/render_object/tile_map.rs
crates/api/src/render_object/tile_map.rs
+1
-1
examples/dungeon.rs
examples/dungeon.rs
+4
-3
No files found.
crates/api/src/render_object/tile_map.rs
View file @
086c63b7
...
...
@@ -45,7 +45,7 @@ impl Into<Box<dyn RenderObject>> for TileMapRenderObject {
}
impl
RenderObject
for
TileMapRenderObject
{
fn
render_self
(
&
self
,
context
:
&
mut
Context
<
'_
>
,
_
:
&
Point
)
{
fn
render_self
(
&
self
,
context
:
&
mut
Context
,
_
:
&
Point
)
{
let
(
bounds
,
camera
,
map
,
mut
image
)
=
{
let
widget
=
context
.widget
();
(
...
...
examples/dungeon.rs
View file @
086c63b7
...
...
@@ -33,8 +33,9 @@ impl MapViewState {
}
impl
State
for
MapViewState
{
fn
update
(
&
mut
self
,
_
:
&
mut
Registry
,
ctx
:
&
mut
Context
<
'_
>
)
{
fn
update
(
&
mut
self
,
_
:
&
mut
Registry
,
ctx
:
&
mut
Context
)
{
if
let
Some
(
action
)
=
self
.action
{
// todo use same mechanism as in doit
match
action
{
MapViewAction
::
OpenMenu
=>
{
ctx
.push_event_by_window
(
GameEvent
::
OpenMenu
);
...
...
@@ -112,7 +113,7 @@ impl MenuViewState {
}
impl
State
for
MenuViewState
{
fn
update
(
&
mut
self
,
_
:
&
mut
Registry
,
ctx
:
&
mut
Context
<
'_
>
)
{
fn
update
(
&
mut
self
,
_
:
&
mut
Registry
,
ctx
:
&
mut
Context
)
{
if
let
Some
(
action
)
=
self
.action
{
match
action
{
MenuAction
::
Start
=>
{
...
...
@@ -246,7 +247,7 @@ impl State for GameViewState {
.expect
(
"GameViewState.init: menu_view box could not be found."
);
}
fn
update
(
&
mut
self
,
_
:
&
mut
Registry
,
ctx
:
&
mut
Context
<
'_
>
)
{
fn
update
(
&
mut
self
,
_
:
&
mut
Registry
,
ctx
:
&
mut
Context
)
{
if
let
Some
(
event
)
=
self
.event
{
match
event
{
GameEvent
::
OpenMenu
=>
{
...
...
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