mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-04 21:50:35 -04:00
Separate splash background and logo
- Ported empy_lot.xml and empy_lot_fso.xml to JSON format
This commit is contained in:
parent
027aa6ce73
commit
77a44a6c31
9 changed files with 11504 additions and 21 deletions
13
src/main.zig
13
src/main.zig
|
@ -1,6 +1,9 @@
|
|||
const std = @import("std");
|
||||
const rl = @import("raylib");
|
||||
|
||||
const MAX_INPUT_CHARS = 9;
|
||||
|
||||
// Still in the proof of concept phase, don't midn the mess
|
||||
pub fn main() anyerror!void {
|
||||
const screenWidth = 800;
|
||||
const screenHeight = 600;
|
||||
|
@ -10,15 +13,20 @@ pub fn main() anyerror!void {
|
|||
rl.initWindow(screenWidth, screenHeight, "My Simulation");
|
||||
defer rl.closeWindow();
|
||||
|
||||
// var textBox = rl.Rectangle.init(screenWidth / 2.0 - 100, 180, 50);
|
||||
// var mouseOnText = false;
|
||||
// var letterCount = 0;
|
||||
|
||||
rl.setTargetFPS(60);
|
||||
|
||||
// Media must be loaded after window init
|
||||
// rl.initAudioDevice();
|
||||
// const music = rl.loadMusicStream("resources/LeeRosevere-ThreeThingsYouNeedtoKnowAboutToday.mp3");
|
||||
// defer rl.closeAudioDevice();
|
||||
|
||||
const splash: rl.Texture = rl.Texture.init("resources/tsosplash.png");
|
||||
const logo = rl.Texture.init("resources/logo.png");
|
||||
const splash = rl.Texture.init("resources/tsosplash.png");
|
||||
defer rl.unloadTexture(splash);
|
||||
defer rl.unloadTexture(logo);
|
||||
|
||||
while (!rl.windowShouldClose()) {
|
||||
|
||||
|
@ -39,6 +47,7 @@ pub fn main() anyerror!void {
|
|||
|
||||
// Splash screen
|
||||
rl.drawTexture(splash, 0, 0, rl.Color.white);
|
||||
rl.drawTexture(logo, screenWidth / 2.0 - 240, 30, rl.Color.white);
|
||||
|
||||
// Loading text
|
||||
rl.drawText("Reticulating splines...", 20, screenHeight - 30, 20, rl.Color.white);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue