Move static resources into their own directories

This commit is contained in:
csd4ni3l
2025-11-01 18:13:09 +01:00
parent e7293aeb09
commit cf70384239
10 changed files with 16 additions and 15 deletions

View File

Before

Width:  |  Height:  |  Size: 946 B

After

Width:  |  Height:  |  Size: 946 B

View File

@@ -6,7 +6,7 @@ function change_setting(category, setting, value) {
go("settings", category);
}
function show_settings(category) {
function show_settings(category, SETTINGS) {
const x = 400;
const label_x = 50;
const space_between = 100;
@@ -99,10 +99,10 @@ function start_game() {
horizontal_buttons(10, 10, generated_button_lists, 200, 75, 10);
if (setting_category != null) {
show_settings(setting_category);
show_settings(setting_category, SETTINGS);
}
else {
show_settings(Object.keys(SETTINGS)[0]);
show_settings(Object.keys(SETTINGS)[0], SETTINGS);
}
})

View File

@@ -171,7 +171,7 @@ function setup_pumpkin(canvas_id, clearbtn_id, lightbtn_id, form_id, pattern_fie
const canvas = document.getElementById(canvas_id);
const ctx = canvas.getContext('2d');
const img = new Image();
img.src = '/static/pumpkin.png';
img.src = '/static/graphics/pumpkin.png';
const GRID_SIZE = grid_size;
const CELL_SIZE = canvas.width / GRID_SIZE;

View File

@@ -1,5 +1,5 @@
function setup_game() {
loadSprite("pumpkin", "/static/pumpkin.png");
loadSprite("pumpkin", "/static/graphics/pumpkin.png");
const SETTINGS = {
"Graphics": {
"Anti-Aliasing": {"type": "bool", "default": true},

View File

@@ -1,5 +1,6 @@
function setup_game() {
loadSprite("pumpkin", "/static/pumpkin.png");
loadSprite("pumpkin", "/static/graphics/pumpkin.png");
loadSprite("gravestone", "/static/gravestone.png")
const SETTINGS = {
"Graphics": {
"Anti-Aliasing": {"type": "bool", "default": true},