mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-12 22:31:02 +00:00
Some visual change on Hero T4
Some visual change on Hero T4
This commit is contained in:
+158
-42
@@ -83,56 +83,172 @@ $t4Equipped = $t4HeroItems->getEquipped($session->uid);
|
||||
<p class="message" style="font-weight:bold;"><?php echo $t4Msg; ?></p>
|
||||
<?php } ?>
|
||||
|
||||
<style>
|
||||
<style type="text/css">
|
||||
/* ---------------------------------------------------------------------------
|
||||
Acelasi limbaj vizual ca pagina de licitatii (37_auction.tpl): badge de tier,
|
||||
bonus palid dedesubt, butoane verzi si latimi stranse. Toate clasele au
|
||||
prefixul "t4items" / "t4it-" ca sa nu atinga nimic altceva din interfata.
|
||||
Fara CSS grid si fara "gap": jocul e deschis si din browsere vechi.
|
||||
--------------------------------------------------------------------------- */
|
||||
|
||||
/* Cap de tabel pentru coloane: fara el nu se intelegea ce e fiecare valoare. */
|
||||
table.t4items tr.t4cols th{background:#e8e8ea;color:#444;font-size:11px;
|
||||
font-weight:bold;text-align:center;padding:3px 5px;border-bottom:1px solid #d0d0d4}
|
||||
table.t4items tr.t4cols th {
|
||||
background: #e8e8ea;
|
||||
color: #444;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 3px 5px;
|
||||
border-bottom: 1px solid #d0d0d4;
|
||||
}
|
||||
|
||||
table.t4items td { padding: 5px 4px; vertical-align: middle; }
|
||||
|
||||
/* Latimile, intr-un singur loc. Stranse ca sa incapa in zona de continut
|
||||
(~505px) fara scroll orizontal: 78+40+150+96 = 364px fixi, restul ramane
|
||||
coloanei cu numele. Inainte, 110+46+230+170 = 556px depaseau singuri
|
||||
latimea paginii, iar numele se rupeau pe trei randuri. */
|
||||
table.t4items th.c-type { width: 78px; }
|
||||
table.t4items th.c-img { width: 40px; }
|
||||
table.t4items th.c-name { width: auto; }
|
||||
table.t4items th.c-tier { width: 150px; }
|
||||
table.t4items th.c-act { width: 96px; }
|
||||
|
||||
/* Slotul (Coif, Arma, ...) */
|
||||
table.t4items td.t4slot { text-align: left; font-size: 11px; }
|
||||
|
||||
/* Imaginea are coloana proprie, centrata. */
|
||||
table.t4items td.t4img{text-align:center;vertical-align:middle;width:46px}
|
||||
table.t4items td.t4tier{text-align:center;white-space:normal}
|
||||
/* Bonusul, discret, langa tier. */
|
||||
table.t4items .t4bonus{display:block;color:#777;font-size:10px;line-height:1.3;font-weight:normal}
|
||||
table.t4items td.t4img { text-align: center; vertical-align: middle; }
|
||||
|
||||
/* Numele obiectului */
|
||||
table.t4items td.t4name { text-align: left; font-size: 11px; }
|
||||
|
||||
/* Tier + bonus, ca in tabelul de licitatii */
|
||||
table.t4items td.t4tier { text-align: center; white-space: normal; }
|
||||
|
||||
table.t4items .t4badge {
|
||||
display: inline-block;
|
||||
min-width: 30px;
|
||||
padding: 1px 6px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
color: #5c5850;
|
||||
background: #eceae5;
|
||||
border: 1px solid #cfccc5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* consumabilele n-au tier, arata cantitatea - alt accent, ca sa se distinga */
|
||||
table.t4items .t4badge.t4qty { color: #3f5f22; background: #e4f0d0; border-color: #a3bf7c; }
|
||||
|
||||
/* Bonusul, discret, sub badge. */
|
||||
table.t4items .t4bonus {
|
||||
display: block;
|
||||
margin-top: 3px;
|
||||
color: #9b978f;
|
||||
font-size: 10px;
|
||||
line-height: 1.35;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Slot gol */
|
||||
table.t4items td.t4empty { color: #a5a19a; font-style: normal; }
|
||||
|
||||
/* --- Actiuni --- */
|
||||
table.t4items td.t4act { text-align: center; }
|
||||
table.t4items .t4form { margin: 0; text-align: center; }
|
||||
|
||||
table.t4items .t4btn {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
color: #3f5f22;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
background: #e4f0d0;
|
||||
background: linear-gradient(#fbfdf6, #dcebc6);
|
||||
border: 1px solid #a3bf7c;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
table.t4items .t4btn:hover {
|
||||
background: #d6e8bd;
|
||||
background: linear-gradient(#ffffff, #cfe4b0);
|
||||
border-color: #8bab61;
|
||||
}
|
||||
|
||||
table.t4items .t4btn:active {
|
||||
background: linear-gradient(#d5e6b8, #e9f3da);
|
||||
border-color: #8bab61;
|
||||
}
|
||||
|
||||
/* butonul de dezechipare: neutru, nu verde - e o actiune "de retragere" */
|
||||
table.t4items .t4btn.t4btn-off {
|
||||
color: #6b6862;
|
||||
background: linear-gradient(#fdfdfc, #e8e6e1);
|
||||
border-color: #c3c0b9;
|
||||
}
|
||||
|
||||
table.t4items .t4btn.t4btn-off:hover {
|
||||
background: linear-gradient(#ffffff, #dedbd4);
|
||||
border-color: #aeaba4;
|
||||
}
|
||||
|
||||
/* casuta de cantitate stivuita peste buton, ca la licitatii */
|
||||
table.t4items .t4qtynum {
|
||||
display: block;
|
||||
width: 52px;
|
||||
margin: 0 auto 4px auto;
|
||||
padding: 2px 4px;
|
||||
text-align: right;
|
||||
border: 1px solid #b9b6b0;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
table.t4items .t4none { color: #a5a19a; }
|
||||
</style>
|
||||
<table id="distribution" class="t4items" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr><th colspan="5"><?php echo HERO_ITEMS_EQUIPPED; ?></th></tr>
|
||||
<tr class="t4cols">
|
||||
<th style="width:110px;"><?php echo HERO_COL_TYPE; ?></th>
|
||||
<th style="width:46px;"><?php echo HERO_COL_IMAGE; ?></th>
|
||||
<th><?php echo HERO_COL_NAME; ?></th>
|
||||
<th style="width:230px;"><?php echo HERO_COL_TIER; ?></th>
|
||||
<th style="width:110px;"><?php echo HERO_COL_ACTION; ?></th>
|
||||
<th class="c-type"><?php echo HERO_COL_TYPE; ?></th>
|
||||
<th class="c-img"><?php echo HERO_COL_IMAGE; ?></th>
|
||||
<th class="c-name"><?php echo HERO_COL_NAME; ?></th>
|
||||
<th class="c-tier"><?php echo HERO_COL_TIER; ?></th>
|
||||
<th class="c-act"><?php echo HERO_COL_ACTION; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($t4Slot = 1; $t4Slot <= 6; $t4Slot++) { ?>
|
||||
<tr>
|
||||
<td style="width:110px;"><b><?php echo constant('HERO_SLOT_' . $t4Slot); ?></b></td>
|
||||
<td class="t4slot"><b><?php echo constant('HERO_SLOT_' . $t4Slot); ?></b></td>
|
||||
<?php if (isset($t4Equipped[$t4Slot])) {
|
||||
$t4Row = $t4Equipped[$t4Slot];
|
||||
$t4Bonus = heroItemBonusText((int) $t4Row['itemid']);
|
||||
?>
|
||||
<td class="t4img"><span class="heroT4Item item<?php echo (int) $t4Row['itemid']; ?>"></span></td>
|
||||
<td><?php echo $t4Row['name']; ?></td>
|
||||
<td class="t4name"><?php echo $t4Row['name']; ?></td>
|
||||
<td class="t4tier">
|
||||
T<?php echo (int) $t4Row['def']['tier']; ?>
|
||||
<span class="t4badge"><?php echo HERO_COL_TIER; ?> <?php echo (int) $t4Row['def']['tier']; ?></span>
|
||||
<?php if ($t4Bonus !== '') { ?>
|
||||
<span class="t4bonus">(<?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?>)</span>
|
||||
<span class="t4bonus"><?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td style="width:110px;text-align:center;">
|
||||
<td class="t4act">
|
||||
<?php if ($t4AwayReason === '') { ?>
|
||||
<form action="" method="POST" style="margin:0;">
|
||||
<form action="" method="POST" class="t4form">
|
||||
<input type="hidden" name="t4action" value="unequip">
|
||||
<input type="hidden" name="rowid" value="<?php echo (int) $t4Row['id']; ?>">
|
||||
<input type="submit" value="<?php echo HERO_UNEQUIP; ?>">
|
||||
<button type="submit" class="t4btn t4btn-off"><?php echo HERO_UNEQUIP; ?></button>
|
||||
</form>
|
||||
<?php } else { ?>
|
||||
<span style="color:#999;">—</span>
|
||||
<span class="t4none">—</span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
<td colspan="4" style="color:#888;">-</td>
|
||||
<td colspan="4" class="t4empty">—</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@@ -143,11 +259,11 @@ table.t4items .t4bonus{display:block;color:#777;font-size:10px;line-height:1.3;f
|
||||
<thead>
|
||||
<tr><th colspan="5"><?php echo HERO_ITEMS_BAG; ?></th></tr>
|
||||
<tr class="t4cols">
|
||||
<th style="width:110px;"><?php echo HERO_COL_TYPE; ?></th>
|
||||
<th style="width:46px;"><?php echo HERO_COL_IMAGE; ?></th>
|
||||
<th><?php echo HERO_COL_NAME; ?></th>
|
||||
<th style="width:230px;"><?php echo HERO_COL_TIER; ?></th>
|
||||
<th style="width:170px;"><?php echo HERO_COL_ACTION; ?></th>
|
||||
<th class="c-type"><?php echo HERO_COL_TYPE; ?></th>
|
||||
<th class="c-img"><?php echo HERO_COL_IMAGE; ?></th>
|
||||
<th class="c-name"><?php echo HERO_COL_NAME; ?></th>
|
||||
<th class="c-tier"><?php echo HERO_COL_TIER; ?></th>
|
||||
<th class="c-act"><?php echo HERO_COL_ACTION; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -162,39 +278,39 @@ table.t4items .t4bonus{display:block;color:#777;font-size:10px;line-height:1.3;f
|
||||
?>
|
||||
<?php $t4Bonus = heroItemBonusText((int) $t4Row['itemid']); ?>
|
||||
<tr>
|
||||
<td style="width:110px;"><b><?php echo constant('HERO_SLOT_' . (int) $t4Row['def']['slot']); ?></b></td>
|
||||
<td class="t4slot"><b><?php echo constant('HERO_SLOT_' . (int) $t4Row['def']['slot']); ?></b></td>
|
||||
<td class="t4img"><span class="heroT4Item item<?php echo (int) $t4Row['itemid']; ?>"></span></td>
|
||||
<td><?php echo $t4Row['name']; ?></td>
|
||||
<td class="t4name"><?php echo $t4Row['name']; ?></td>
|
||||
<td class="t4tier">
|
||||
<?php
|
||||
// consumabilele n-au tier: afisam cate bucati sunt
|
||||
echo $t4IsBag
|
||||
? (int) $t4Row['quantity'] . 'x'
|
||||
: 'T' . (int) $t4Row['def']['tier'];
|
||||
?>
|
||||
<?php if ($t4IsBag) { ?>
|
||||
<?php // consumabilele n-au tier: afisam cate bucati sunt ?>
|
||||
<span class="t4badge t4qty"><?php echo (int) $t4Row['quantity']; ?>x</span>
|
||||
<?php } else { ?>
|
||||
<span class="t4badge"><?php echo HERO_COL_TIER; ?> <?php echo (int) $t4Row['def']['tier']; ?></span>
|
||||
<?php } ?>
|
||||
<?php if ($t4Bonus !== '') { ?>
|
||||
<span class="t4bonus">(<?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?>)</span>
|
||||
<span class="t4bonus"><?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td style="width:170px;text-align:center;">
|
||||
<form action="" method="POST" style="margin:0;">
|
||||
<td class="t4act">
|
||||
<form action="" method="POST" class="t4form">
|
||||
<input type="hidden" name="rowid" value="<?php echo (int) $t4Row['id']; ?>">
|
||||
<?php if ($t4IsBag) { ?>
|
||||
<input type="hidden" name="t4action" value="useitem">
|
||||
<input type="text" name="qty" value="1" size="3" style="text-align:center;">
|
||||
<input type="submit" value="<?php echo HERO_USE_ITEM; ?>">
|
||||
<input type="text" name="qty" value="1" class="t4qtynum">
|
||||
<button type="submit" class="t4btn"><?php echo HERO_USE_ITEM; ?></button>
|
||||
<?php } elseif ($t4AwayReason === '') { ?>
|
||||
<input type="hidden" name="t4action" value="equip">
|
||||
<input type="submit" value="<?php echo HERO_EQUIP; ?>">
|
||||
<button type="submit" class="t4btn"><?php echo HERO_EQUIP; ?></button>
|
||||
<?php } else { ?>
|
||||
<span style="color:#999;">—</span>
|
||||
<span class="t4none">—</span>
|
||||
<?php } ?>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if (!$t4HasUnequipped) { ?>
|
||||
<tr><td colspan="5"><?php echo HERO_ITEMS_EMPTY; ?></td></tr>
|
||||
<tr><td colspan="5" class="t4empty"><?php echo HERO_ITEMS_EMPTY; ?></td></tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user