Viz cols first

This commit is contained in:
Hash Borgir 2023-09-11 12:49:47 -06:00
parent 974de24f6f
commit ac81143618

View File

@ -10,7 +10,7 @@ require_once './src/D2Functions.php';
require_once './src/D2ByteReader.php'; require_once './src/D2ByteReader.php';
require_once './src/D2BitReader.php'; require_once './src/D2BitReader.php';
error_reporting(E_ALL); //error_reporting(E_ALL);
set_time_limit(-1); set_time_limit(-1);
ini_set('max_input_time', '-1'); ini_set('max_input_time', '-1');
ini_set('max_execution_time', '0'); ini_set('max_execution_time', '0');
@ -76,10 +76,10 @@ unset($output[0]);
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Level Viz/Warp Editor</title> <title>Level Viz/Warp Editor</title>
<link rel="stylesheet" href="/res/bootstrap.min.css"> <link rel="stylesheet" href="/res/bootstrap.min.css">
<script src="/res/jquery-3.5.1.min.js"></script> <script src="/res/jquery-3.5.1.min.js"></script>
<script src="/res/popper.min.js"></script> <script src="/res/popper.min.js"></script>
<script src="/res/bootstrap.min.js"></script> <script src="/res/bootstrap.min.js"></script>
<style> <style>
.viz { .viz {
background-color: #fafafa; background-color: #fafafa;
@ -88,7 +88,7 @@ unset($output[0]);
background-color: #eef; background-color: #eef;
} }
</style> </style>
</head> </head>
<body> <body>
@ -100,7 +100,9 @@ unset($output[0]);
<th>Name</th> <th>Name</th>
<?php for ($i = 0; $i <= 7; $i++): ?> <?php for ($i = 0; $i <= 7; $i++): ?>
<th>Vis<?php echo $i; ?></th> <th>Vis<?php echo $i; ?></th>
<th>Warp<?php echo $i; ?></th> <!-- Add WarpX fields to header --> <?php endfor; ?>
<?php for ($i = 0; $i <= 7; $i++): ?>
<th>Warp<?php echo $i; ?></th>
<?php endfor; ?> <?php endfor; ?>
</tr> </tr>
</thead> </thead>
@ -120,8 +122,10 @@ unset($output[0]);
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</td> </td>
<?php endfor; ?>
<?php for ($i = 0; $i <= 7; $i++): ?>
<td class="warp"> <td class="warp">
<!-- Create WarpX dropdowns -->
<select name="Warp<?php echo $i; ?>" data-id="<?php echo $level['Id']; ?>"> <select name="Warp<?php echo $i; ?>" data-id="<?php echo $level['Id']; ?>">
<?php foreach ($lvlwarp as $key => $value): ?> <?php foreach ($lvlwarp as $key => $value): ?>
<option value="<?php echo $key; ?>"> <option value="<?php echo $key; ?>">
@ -135,6 +139,7 @@ unset($output[0]);
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<script> <script>
$("select[name^='Vis'], select[name^='Warp']").change(function () { $("select[name^='Vis'], select[name^='Warp']").change(function () {
var levelId = $(this).data('id'); var levelId = $(this).data('id');