Gear-Planer Guide: Hotbar wie das Skill-Fenster im Spiel (Reihen 3-0 je Taste, Tastenreihe mit dem Skill aus Reihe 0, Stufe als St.); Maustasten heissen wie im Spiel R (linke) und T (rechte Maustaste)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
950a9cddf3
commit
a8b1ecfdbb
3 changed files with 82 additions and 13 deletions
|
|
@ -6727,6 +6727,36 @@ button.gear-guide-skill:hover { border-color: var(--gold); transform: translateY
|
||||||
/* Makro wie die Liste im Spiel: grosse Nummer, Skill mit Tasten-Abzeichen und Stufe, Verzoegerung auf der Trennlinie */
|
/* Makro wie die Liste im Spiel: grosse Nummer, Skill mit Tasten-Abzeichen und Stufe, Verzoegerung auf der Trennlinie */
|
||||||
.gear-guide-macro {
|
.gear-guide-macro {
|
||||||
margin: 0; padding: 0.2rem 0 0; list-style: none; counter-reset: macro;
|
margin: 0; padding: 0.2rem 0 0; list-style: none; counter-reset: macro;
|
||||||
|
.gear-guide-hotbar { margin-top: 0.9rem; }
|
||||||
|
/* Skill-Leiste wie das Skill-Fenster im Spiel (includes/gear_guide.php): Spalten je Taste, Reihen 3-0, Tastenreihe unten */
|
||||||
|
.gear-guide-skillbar-wrap { overflow-x: auto; padding-bottom: 2px; }
|
||||||
|
.gear-guide-skillbar { display: flex; gap: 4px; min-width: 470px; }
|
||||||
|
.gear-guide-skillbar-key { display: flex; flex: 1 1 0; flex-direction: column; gap: 4px; min-width: 0; }
|
||||||
|
.gear-guide-skillbar-key.is-group-end { margin-right: 6px; }
|
||||||
|
.gear-guide-skillbar-cell {
|
||||||
|
position: relative; display: block; aspect-ratio: 1; border-radius: 2px;
|
||||||
|
background: #353b46; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); overflow: hidden;
|
||||||
|
}
|
||||||
|
.gear-guide-skillbar-cell.is-empty::before {
|
||||||
|
content: '✦'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
||||||
|
color: rgba(225, 232, 245, 0.35); font-size: 0.65rem;
|
||||||
|
}
|
||||||
|
.gear-guide-skillbar-cell.is-hotkey { margin-top: 8px; background: #2c323c; }
|
||||||
|
.gear-guide-skillbar-cell.is-hotkey .gear-guide-skillbar-skill { filter: brightness(0.6); }
|
||||||
|
.gear-guide-skillbar-skill { position: absolute; inset: 0; display: block; }
|
||||||
|
.gear-guide-skillbar-skill img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||||
|
.gear-guide-skillbar-skill .gear-macro-initial { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--text-muted); font-weight: 700; }
|
||||||
|
.gear-guide-skillbar-lv { position: absolute; right: 3px; bottom: 1px; color: #fff; font-size: clamp(0.5rem, 0.95vw, 0.72rem); font-weight: 700; line-height: 1.2; text-shadow: 0 0 3px #000, 0 0 2px #000; }
|
||||||
|
.gear-guide-skillbar-keyname { position: absolute; left: 1px; top: 1px; z-index: 1; }
|
||||||
|
.gear-guide-skillbar .gear-guide-skillbar-keyname .gear-macro-key {
|
||||||
|
min-width: 13px; height: 13px; padding: 0 2px; border-radius: 2px; background: rgba(10, 12, 16, 0.85); color: #fff; font-size: 0.6rem; font-weight: 700;
|
||||||
|
}
|
||||||
|
.gear-guide-skillbar-keyname .gear-macro-key-mouse svg { width: 7px; height: 10px; }
|
||||||
|
.gear-guide-skillbar-rows { display: flex; flex: 0 0 1.6rem; flex-direction: column; gap: 4px; }
|
||||||
|
.gear-guide-skillbar-rows span { display: flex; flex: 1 1 0; align-items: center; justify-content: center; color: #f2f2f2; font-size: 1.15rem; font-weight: 700; }
|
||||||
|
.gear-guide-skillbar-rows span:last-child { margin-top: 8px; }
|
||||||
|
/* Maustasten: "R (Maus)" bzw. "T (Maus)" */
|
||||||
|
.gear-macro-key-mouse { display: inline-flex; align-items: center; margin-left: 2px; font-weight: 400; opacity: 0.85; }
|
||||||
}
|
}
|
||||||
.gear-guide-macro li { position: relative; counter-increment: macro; display: flex; flex-direction: column; align-items: center; padding-top: 0.5rem; }
|
.gear-guide-macro li { position: relative; counter-increment: macro; display: flex; flex-direction: column; align-items: center; padding-top: 0.5rem; }
|
||||||
.gear-guide-macro li::before { content: counter(macro); position: absolute; left: 0.2rem; top: 1.4rem; color: #d8cdb4; font-size: 2rem; font-weight: 700; line-height: 1; }
|
.gear-guide-macro li::before { content: counter(macro); position: absolute; left: 0.2rem; top: 1.4rem; color: #d8cdb4; font-size: 2rem; font-weight: 700; line-height: 1; }
|
||||||
|
|
|
||||||
|
|
@ -737,18 +737,55 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
<p class="text-muted">Für Preset <?= $preset ?> ist noch keine Skill-Leiste geplant<?= $isOwn ? ' – belege sie im Reiter „Makro“, dann kannst du hier jede Taste erklären' : '' ?>.</p>
|
<p class="text-muted">Für Preset <?= $preset ?> ist noch keine Skill-Leiste geplant<?= $isOwn ? ' – belege sie im Reiter „Makro“, dann kannst du hier jede Taste erklären' : '' ?>.</p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php if ($usedKeys): ?>
|
<?php if ($usedKeys): ?>
|
||||||
|
<?php
|
||||||
|
// Skill-Leiste wie das Skill-Fenster im Spiel: je Taste die Reihen 3 bis 0, darunter die Tastenreihe
|
||||||
|
// (zeigt den Skill aus Reihe 0); Reihennummern rechts, Gruppen 1-4, 5-8, Q E, R T
|
||||||
|
$hotbarCell = static function (int $skillId) use ($macroSkills, $macroLevels): string {
|
||||||
|
if ($skillId <= 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$skill = $macroSkills[$skillId] ?? null;
|
||||||
|
$url = gear_skill_icon_url($skill);
|
||||||
|
$level = $macroLevels[$skillId] ?? 0;
|
||||||
|
$tip = $skill !== null ? gear_guide_tip_attrs($skill) : '';
|
||||||
|
return '<span class="gear-guide-skillbar-skill"' . ($tip !== '' ? $tip : ' title="' . e(gear_macro_skill_name($skillId, $macroSkills)) . '"') . '>'
|
||||||
|
. ($url !== null ? '<img src="' . e($url) . '" alt="' . e(gear_macro_skill_name($skillId, $macroSkills)) . '" loading="lazy">'
|
||||||
|
: '<span class="gear-macro-initial">' . e(mb_substr(gear_macro_skill_name($skillId, $macroSkills), 0, 1)) . '</span>')
|
||||||
|
. ($level > 0 ? '<span class="gear-guide-skillbar-lv">St. ' . $level . '</span>' : '') . '</span>';
|
||||||
|
};
|
||||||
|
?>
|
||||||
|
<div class="gear-guide-skillbar-wrap">
|
||||||
|
<div class="gear-guide-skillbar">
|
||||||
|
<?php foreach ($macroKeys as $index => $key): ?>
|
||||||
|
<?php $ids = array_values(array_map('intval', (array) ($bar[$key] ?? []))); ?>
|
||||||
|
<div class="gear-guide-skillbar-key<?= in_array($index, [3, 7, 9], true) ? ' is-group-end' : '' ?>">
|
||||||
|
<?php for ($row = GEAR_MACRO_KEY_ROWS - 1; $row >= 0; $row--): ?>
|
||||||
|
<span class="gear-guide-skillbar-cell<?= empty($ids[$row]) ? ' is-empty' : '' ?>"><?= $hotbarCell($ids[$row] ?? 0) ?></span>
|
||||||
|
<?php endfor; ?>
|
||||||
|
<span class="gear-guide-skillbar-cell is-hotkey<?= empty($ids[0]) ? ' is-empty' : '' ?>">
|
||||||
|
<?= $hotbarCell($ids[0] ?? 0) ?>
|
||||||
|
<span class="gear-guide-skillbar-keyname"><?= gear_macro_key_html($key) ?></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<div class="gear-guide-skillbar-rows" aria-hidden="true">
|
||||||
|
<?php for ($row = GEAR_MACRO_KEY_ROWS - 1; $row >= 0; $row--): ?><span><?= $row ?></span><?php endfor; ?><span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php $notedKeys = array_values(array_filter($usedKeys, static fn (string $key): bool => isset($guide['keys'][$key]))); ?>
|
||||||
|
<?php if ($notedKeys): ?>
|
||||||
<ul class="gear-guide-hotbar">
|
<ul class="gear-guide-hotbar">
|
||||||
<?php foreach ($usedKeys as $key): ?>
|
<?php foreach ($notedKeys as $key): ?>
|
||||||
<li>
|
<li>
|
||||||
<?= gear_macro_key_html($key) ?>
|
<?= gear_macro_key_html($key) ?>
|
||||||
<span class="gear-guide-hotbar-icons"><?= $keyIcons($key) ?></span>
|
<span class="gear-guide-hotbar-icons"><?= $keyIcons($key) ?></span>
|
||||||
<?php if (isset($guide['keys'][$key])): ?>
|
|
||||||
<span class="gear-guide-hotbar-note"><?= gear_guide_chips(nl2br(e($guide['keys'][$key]), false), $set['class_name']) ?></span>
|
<span class="gear-guide-hotbar-note"><?= gear_guide_chips(nl2br(e($guide['keys'][$key]), false), $set['class_name']) ?></span>
|
||||||
<?php endif; ?>
|
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php endif; ?>
|
||||||
<?php if ($entries): ?>
|
<?php if ($entries): ?>
|
||||||
<h4 class="gear-guide-subhead">Makro <span class="text-muted">– Makro-Taste halten, läuft von oben nach unten</span></h4>
|
<h4 class="gear-guide-subhead">Makro <span class="text-muted">– Makro-Taste halten, läuft von oben nach unten</span></h4>
|
||||||
<?php // Wie die Makro-Liste im Spiel: Nummer, Skill der Taste mit Tasten-Abzeichen und Stufe, darunter die Verzoegerung ?>
|
<?php // Wie die Makro-Liste im Spiel: Nummer, Skill der Taste mit Tasten-Abzeichen und Stufe, darunter die Verzoegerung ?>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ const GEAR_MACRO_DELAY_DEFAULT = 10;
|
||||||
const GEAR_MACRO_KEYS = [
|
const GEAR_MACRO_KEYS = [
|
||||||
'1' => 'Taste 1', '2' => 'Taste 2', '3' => 'Taste 3', '4' => 'Taste 4',
|
'1' => 'Taste 1', '2' => 'Taste 2', '3' => 'Taste 3', '4' => 'Taste 4',
|
||||||
'5' => 'Taste 5', '6' => 'Taste 6', '7' => 'Taste 7', '8' => 'Taste 8',
|
'5' => 'Taste 5', '6' => 'Taste 6', '7' => 'Taste 7', '8' => 'Taste 8',
|
||||||
'Q' => 'Taste Q', 'E' => 'Taste E', 'LM' => 'Linke Maustaste', 'RM' => 'Rechte Maustaste',
|
'Q' => 'Taste Q', 'E' => 'Taste E', 'LM' => 'Taste R (linke Maustaste)', 'RM' => 'Taste T (rechte Maustaste)',
|
||||||
];
|
];
|
||||||
// Skills je Taste: die Reihen 0-3 im Skill-Fenster. Reihe 0 zeigt die Leiste, das Makro nutzt sie der Reihe nach.
|
// Skills je Taste: die Reihen 0-3 im Skill-Fenster. Reihe 0 zeigt die Leiste, das Makro nutzt sie der Reihe nach.
|
||||||
const GEAR_MACRO_KEY_ROWS = 4;
|
const GEAR_MACRO_KEY_ROWS = 4;
|
||||||
|
|
@ -313,11 +313,13 @@ function gear_macro_key_html(string $key): string
|
||||||
if ($key !== 'LM' && $key !== 'RM') {
|
if ($key !== 'LM' && $key !== 'RM') {
|
||||||
return '<span class="gear-macro-key">' . e($key) . '</span>';
|
return '<span class="gear-macro-key">' . e($key) . '</span>';
|
||||||
}
|
}
|
||||||
|
// Im Spiel liegen die Maustasten auf R (links) und T (rechts): "R (Maus links)", "T (Maus rechts)"
|
||||||
$button = $key === 'LM' ? 'M5 1A4 4 0 0 0 1 5v1.5h4z' : 'M5 1a4 4 0 0 1 4 4v1.5H5z';
|
$button = $key === 'LM' ? 'M5 1A4 4 0 0 0 1 5v1.5h4z' : 'M5 1a4 4 0 0 1 4 4v1.5H5z';
|
||||||
|
$letter = $key === 'LM' ? 'R' : 'T';
|
||||||
return '<span class="gear-macro-key is-mouse" role="img" aria-label="' . e(GEAR_MACRO_KEYS[$key]) . '" title="' . e(GEAR_MACRO_KEYS[$key]) . '">'
|
return '<span class="gear-macro-key is-mouse" role="img" aria-label="' . e(GEAR_MACRO_KEYS[$key]) . '" title="' . e(GEAR_MACRO_KEYS[$key]) . '">'
|
||||||
. '<svg viewBox="0 0 10 14" width="10" height="14" aria-hidden="true"><path class="gear-macro-key-on" d="' . $button . '"/>'
|
. $letter . '<span class="gear-macro-key-mouse">(<svg viewBox="0 0 10 14" width="10" height="14" aria-hidden="true"><path class="gear-macro-key-on" d="' . $button . '"/>'
|
||||||
. '<rect x="1" y="1" width="8" height="12" rx="4" fill="none" stroke="currentColor" stroke-width="1.2"/>'
|
. '<rect x="1" y="1" width="8" height="12" rx="4" fill="none" stroke="currentColor" stroke-width="1.2"/>'
|
||||||
. '<path d="M1 6.5h8M5 1v5.5" fill="none" stroke="currentColor" stroke-width="1"/></svg></span>';
|
. '<path d="M1 6.5h8M5 1v5.5" fill="none" stroke="currentColor" stroke-width="1"/></svg>)</span></span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Name eines Skills der Leiste (auch fuer Skills, die nicht zur Klasse gehoeren). */
|
/** Name eines Skills der Leiste (auch fuer Skills, die nicht zur Klasse gehoeren). */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue