broadfield-dev commited on
Commit
5c5f1bc
·
verified ·
1 Parent(s): 11f49e4

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +12 -1
templates/index.html CHANGED
@@ -8,17 +8,28 @@
8
  #ui { font-family: Arial, sans-serif; position: absolute; top: 10px; }
9
  button { padding: 5px 10px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; }
10
  button:hover { background: #45a049; }
 
11
  </style>
12
  </head>
13
  <body>
14
  <div id="ui">
15
- <span id="resources">Food: 0</span> | <span id="population">Tribe: 1/5</span>
16
  <button onclick="gatherFood()">Gather Food</button>
17
  <button onclick="buildHut()">Build Hut</button>
 
 
 
 
 
 
 
 
 
18
  </div>
19
  <canvas id="gameCanvas" width="800" height="600"></canvas>
20
  <script src="{{ url_for('static', filename='game.js') }}"></script>
21
  <script src="{{ url_for('static', filename='tribalStage.js') }}"></script>
 
22
  <script>
23
  const game = new TribalStage(document.getElementById("gameCanvas"));
24
  game.init();
 
8
  #ui { font-family: Arial, sans-serif; position: absolute; top: 10px; }
9
  button { padding: 5px 10px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; }
10
  button:hover { background: #45a049; }
11
+ #editor { display: none; position: absolute; top: 50px; left: 10px; background: #fff; padding: 10px; border: 1px solid #000; }
12
  </style>
13
  </head>
14
  <body>
15
  <div id="ui">
16
+ <span id="resources">Food: 0</span> | <span id="population">Tribe: 1/5</span> | <span id="relations">Relations: Neutral</span>
17
  <button onclick="gatherFood()">Gather Food</button>
18
  <button onclick="buildHut()">Build Hut</button>
19
+ <button onclick="attackTribe()">Attack Tribe</button>
20
+ <button onclick="socializeTribe()">Socialize</button>
21
+ <button onclick="toggleEditor()">Edit Creature</button>
22
+ </div>
23
+ <div id="editor">
24
+ <h3>Creature Editor</h3>
25
+ <label>Color: <input type="color" id="creatureColor" value="#ff0000"></label><br>
26
+ <label>Size: <input type="range" id="creatureSize" min="16" max="48" value="32"></label><br>
27
+ <button onclick="applyChanges()">Apply</button>
28
  </div>
29
  <canvas id="gameCanvas" width="800" height="600"></canvas>
30
  <script src="{{ url_for('static', filename='game.js') }}"></script>
31
  <script src="{{ url_for('static', filename='tribalStage.js') }}"></script>
32
+ <script src="{{ url_for('static', filename='creatureEditor.js') }}"></script>
33
  <script>
34
  const game = new TribalStage(document.getElementById("gameCanvas"));
35
  game.init();