-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
5 changed files
with
50 additions
and
3 deletions.
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
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 @@ | ||
module screens |
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,28 @@ | ||
module screens | ||
|
||
import engine | ||
import engine.types | ||
|
||
pub struct ServerConnectScreen { | ||
mut: | ||
ui engine.UI | ||
} | ||
|
||
pub fn (mut scs ServerConnectScreen) init(mut ctx types.Context, mut app types.App) ! { | ||
scs.ui = engine.UI{} | ||
scs.ui.init(mut ctx.r)! | ||
} | ||
|
||
pub fn (mut scs ServerConnectScreen) deinit() ! {} | ||
pub fn (mut scs ServerConnectScreen) update(delta f32, mut ctx types.Context) ! {} | ||
pub fn (mut scs ServerConnectScreen) draw(delta f32, mut ctx types.Context) ! { | ||
ctx.r.begin() | ||
|
||
scs.ui.begin() | ||
|
||
scs.ui.label(types.Rect{ x: 0.9, y: 0.95, w: 0.1, h: 0.05 }, "↻ connecting to server", mut types.Color{})! | ||
|
||
scs.ui.end() | ||
|
||
ctx.r.end() | ||
} |