Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
OrbGame
Commits
086c63b7
Commit
086c63b7
authored
Jul 22, 2020
by
Florian Blasius
🤘
Browse files
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
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
Supports
Markdown
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