diff --git a/CMakeLists.txt b/CMakeLists.txt index 967e195..8dd20e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,20 +8,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -# --------------------------------------------------------------------------- -# Dependencies -# -# Native build: raylib + RmlUi come from nixpkgs / the `rmlui` derivation, -# found on the default system paths set up by the dev shell. -# -# Wasm build: raylib + RmlUi come from the `raylibWasm` / `rmluiWasm` -# derivations, located via -DCMAKE_PREFIX_PATH set by devShells.wasm. -# --------------------------------------------------------------------------- find_package(raylib REQUIRED) find_package(RmlUi REQUIRED) add_executable(gamejam src/main.cpp + src/Game.cpp src/Application.cpp src/backend/RaylibSystemInterface.cpp src/backend/RaylibRenderInterface.cpp @@ -39,9 +31,6 @@ target_include_directories(gamejam PRIVATE ${CMAKE_SOURCE_DIR}/src) set(ASSET_DIR ${CMAKE_SOURCE_DIR}/assets) if(EMSCRIPTEN) - # ----------------------------------------------------------------------- - # Wasm-specific settings - # ----------------------------------------------------------------------- set(CMAKE_EXECUTABLE_SUFFIX ".html") target_link_options(gamejam PRIVATE @@ -51,8 +40,7 @@ if(EMSCRIPTEN) "-sFORCE_FILESYSTEM=1" "--preload-file=${ASSET_DIR}@assets" # "--shell-file=${CMAKE_SOURCE_DIR}/shell.html" - ) - +) else() add_custom_command(TARGET gamejam POST_BUILD diff --git a/assets/main.rcss b/assets/main.rcss index 8cc2cf6..f194327 100644 --- a/assets/main.rcss +++ b/assets/main.rcss @@ -2,6 +2,8 @@ body { font-family: rmlui-debugger-font; font-size: 16px; color: white; + width: 100vw; + height: 100vh; } #panel { @@ -24,7 +26,11 @@ p { margin-bottom: 15px; } -#start-btn { +.hidden { + display: none; +} + +.menu-btn { display: block; width: 100px; padding: 8px; @@ -34,6 +40,6 @@ p { border: 1px #5a8ec5; } -#start-btn:hover { +.menu-btn:hover { background-color: #4a7eb5; } diff --git a/assets/main.rml b/assets/main.rml index 3a8102c..c959486 100644 --- a/assets/main.rml +++ b/assets/main.rml @@ -4,7 +4,7 @@
-