8000 Add support for whole layer rarities by Montspy · Pull Request #99 · Montspy/LooPyGen · GitHub
[go: up one dir, main page]

Skip to content
Prev Previous commit
Next Next commit
chore[ui]: move rarity percentage to the right in edit collection page
  • Loading branch information
Montspy authored and Nomad committed Jul 12, 2022
commit 506161433efeaf56ba8ce24b5e0eb18b0a0a620f
16 changes: 8 additions & 8 deletions php/edit/3.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@
<input required type="text" class="form wide" id="trait<?php echo $trait_var ?>_name" name="trait<?php echo $trait_var ?>_name" placeholder="Color Display Name" value="<?php echo isset($var_name) ? $var_name : null; ?>" />
</div>
<div class="trait-row">
<div data-tooltip="Rarity: Chance for this variation to be pick 8000 ed, in percent">
<label for="trait<?php echo $trait_var ?>_rarity">Set Rarity:</label><br />
<input required type="number" step="any" class="form small" id="trait<?php echo $trait_var ?>_rarity" min="0" max="100" name="trait<?php echo $trait_var ?>_rarity" placeholder="0-100" value="<?php echo isset($var_name) ? $layer['weights'][$v-1] : null; ?>">&nbsp;%
</div>
<div data-tooltip="Color: The color of this background variation">
<label for="trait<?php echo $trait_var ?>_r">Color:</label><br />
<input required type="color" class="form small" id="trait<?php echo $trait_var ?>_color" name="trait<?php echo $trait_var ?>_color" value="<?php echo isset($var_name) ? $color_hex : '#000000'; ?>" />
Expand All @@ -125,6 +121,10 @@
<label for="trait<?php echo $trait_var ?>_a">Opacity:</label><br />
<input required type="number" class="form small" id="trait<?php echo $trait_var ?>_alpha" min="0" max="255" name="trait<?php echo $trait_var ?>_alpha" placeholder="0-255" value="<?php echo isset($var_name) ? $opacity : 255; ?>" />
</div>
<div data-tooltip="Rarity: Chance for this variation to be picked, in percent">
<label for="trait<?php echo $trait_var ?>_rarity">Set Rarity:</label><br />
<input required type="number" step="any" class="form small" id="trait<?php echo $trait_var ?>_rarity" min="0" max="100" name="trait<?php echo $trait_var ?>_rarity" placeholder="0-100" value="<?php echo isset($var_name) ? $layer['weights'][$v-1] : null; ?>">&nbsp;%
</div>
</div>
</div>
<hr />
Expand Down Expand Up @@ -156,10 +156,6 @@
<input required type="text" class="form wide" id="trait<?php echo $trait_var ?>_name" name="trait<?php echo $trait_var ?>_name" placeholder="Variation #<?php echo $v ?> Name" value="<?php echo isset($var_name) ? $var_name : null; ?>" />
</div>
<div class="trait-row">
<div data-tooltip="Rarity: Chance for this variation to be picked, in percent">
<label for="trait<?php echo $trait_var ?>_rarity">Set Rarity:</label><br />
<input required type="number" step="any" class="form small" id="trait<?php echo $trait_var ?>_rarity" min="0" max="100" name="trait<?php echo $trait_var ?>_rarity" placeholder="0-100" value="<?php echo isset($var_name) ? $layer['weights'][$v-1] : null; ?>">&nbsp;%
</div>
<div data-tooltip="Image: Pick the image file for this variation.&#xa;(Browse or drag'n'drop)">
<label for="trait<?php echo $trait_var ?>_r">Filename:</label><br />
<?php if (isset($var_name) and $file_exists) { // File exists, pre-fill field with filename (no need to upload it again) ?>
Expand All @@ -168,6 +164,10 @@
<input required type="file" class="form med" id="trait<?php echo $trait_var ?>_file" name="trait<?php echo $trait_var ?>_file" onChange="setNameFromFilename(this);" />
<?php } ?>
</div>
<div data-tooltip="Rarity: Chance for this variation to be picked, in percent">
<label for="trait<?php echo $trait_var ?>_rarity">Set Rarity:</label><br />
<input required type="number" step="any" class="form small" id="trait<?php echo $trait_var ?>_rarity" min="0" max="100" name="trait<?php echo $trait_var ?>_rarity" placeholder="0-100" value="<?php echo isset($var_name) ? $layer['weights'][$v-1] : null; ?>">&nbsp;%
</div>
</div>
<hr />
<?php $v = $v + 1; }
Expand Down
0