Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2018] Replace titles with tooltips on sheets #2074

Merged
merged 3 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 27 additions & 16 deletions templates/actors/character-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{!-- Sheet Header --}}
<header class="sheet-header flexrow">
<img class="profile" src="{{actor.img}}" title="{{actor.name}}" data-edit="img"/>
<img class="profile" src="{{actor.img}}" data-tooltip="{{actor.name}}" data-edit="img"/>

<section class="header-details flexrow">
{{> "dnd5e.actor-warnings"}}
Expand All @@ -12,7 +12,7 @@
</h1>

<aside class="header-exp flexcol">
<div class="charlevel" title="{{multiclassLabels}}">
<div class="charlevel" data-tooltip="{{multiclassLabels}}">
<label>{{ localize "DND5E.Level" }} {{system.details.level}}</label>
<span class="levels">{{classLabels}}</span>
</div>
Expand All @@ -36,7 +36,7 @@
</li>
<li>
{{#if labels.background}}
<span title="{{localize 'DND5E.Background'}}">{{labels.background}}</span>
<span data-tooltip="{{localize 'DND5E.Background'}}">{{labels.background}}</span>
arbron marked this conversation as resolved.
Show resolved Hide resolved
{{else}}
<input type="text" name="system.details.background" value="{{system.details.background}}" placeholder="{{ localize 'DND5E.Background' }}"/>
{{/if}}
Expand Down Expand Up @@ -66,10 +66,10 @@
<footer class="attribute-footer">
<input name="system.attributes.hp.temp" type="text" class="temphp"
placeholder="+{{ localize 'DND5E.Temp' }}" value="{{hp.temp}}"
title="{{localize 'DND5E.HitPointsTemp'}}" data-dtype="Number">
data-tooltip="{{localize 'DND5E.HitPointsTemp'}}" data-dtype="Number">
<input name="system.attributes.hp.tempmax" type="text" class="temphp"
placeholder="+{{ localize 'DND5E.Max' }}" value="{{hp.tempmax}}"
title="{{localize 'DND5E.HitPointsTempMax'}}" data-dtype="Number">
data-tooltip="{{localize 'DND5E.HitPointsTempMax'}}" data-dtype="Number">
</footer>
</li>

Expand All @@ -80,14 +80,18 @@
</a>
<div class="attribute-value multiple">
<label class="hit-dice">
<span title="{{localize 'DND5E.HitDiceRemaining'}}">{{system.attributes.hd}}</span>
<span data-tooltip="{{localize 'DND5E.HitDiceRemaining'}}">{{system.attributes.hd}}</span>
<span class="sep"> / </span>
<span title="{{localize 'DND5E.HitDiceMax'}}">{{system.details.level}}</span>
<span data-tooltip="{{localize 'DND5E.HitDiceMax'}}">{{system.details.level}}</span>
</label>
</div>
<footer class="attribute-footer">
<a class="rest short-rest" title="{{localize 'DND5E.ShortRest'}}">{{ localize "DND5E.RestS" }}</a>
<a class="rest long-rest" title="{{localize 'DND5E.LongRest'}}">{{ localize "DND5E.RestL" }}</a>
<a class="rest short-rest" data-tooltip="{{localize 'DND5E.ShortRest'}}">
{{ localize "DND5E.RestS" }}
</a>
<a class="rest long-rest" data-tooltip="{{localize 'DND5E.LongRest'}}">
{{ localize "DND5E.RestL" }}
</a>
</footer>
</li>

Expand Down Expand Up @@ -155,10 +159,15 @@
<input type="text" name="system.abilities.{{id}}.value" value="{{ability.value}}"
class="ability-score" placeholder="10" data-dtype="Number">
<div class="ability-modifiers flexrow">
<span class="ability-mod" title="{{ localize 'DND5E.Modifier' }}">{{numberFormat ability.mod decimals=0 sign=true}}</span>
<span class="ability-mod" data-tooltip="{{ localize 'DND5E.Modifier' }}">
{{numberFormat ability.mod decimals=0 sign=true}}
</span>
<input type="hidden" name="system.abilities.{{id}}.proficient" value="{{ability.baseProf}}" data-dtype="Number"/>
<a class="proficiency-toggle ability-proficiency" title="{{ localize 'DND5E.Proficiency' }}">{{{ability.icon}}}</a>
<span class="ability-save" title="{{ localize 'DND5E.SavingThrow' }}">{{numberFormat ability.save decimals=0 sign=true}}</span>
<a class="proficiency-toggle ability-proficiency"
data-tooltip="{{ localize 'DND5E.Proficiency' }}">{{{ability.icon}}}</a>
<span class="ability-save" data-tooltip="{{ localize 'DND5E.SavingThrow' }}">
{{numberFormat ability.save decimals=0 sign=true}}
</span>
</div>
<a class="config-button" data-action="ability" data-tooltip="{{localize 'DND5E.AbilityConfigure'}}">
<i class="fas fa-cog"></i>
Expand All @@ -172,19 +181,21 @@
{{#each config.skills as |obj s|}}
{{#with (lookup ../skills s) as |skill|}}
<li class="skill flexrow {{#if skill.value}}proficient{{/if}}" data-skill="{{s}}">
<input type="hidden" name="system.skills.{{s}}.value" value="{{skill.baseValue}}" data-dtype="Number"/>
<a class="proficiency-toggle skill-proficiency" title="{{skill.hover}}">{{{skill.icon}}}</a>
<input type="hidden" name="system.skills.{{s}}.value" value="{{skill.baseValue}}"
data-dtype="Number"/>
<a class="proficiency-toggle skill-proficiency" data-tooltip="{{skill.hover}}">{{{skill.icon}}}</a>
<div class="skill-name-controls">
<h4 class="skill-name rollable">{{skill.label}}</h4>
<a class="config-button" data-action="skill" data-tooltip="{{localize 'DND5E.SkillConfigure'}}">
<i class="fas fa-cog"></i>
</a>
</div>
<span class="skill-ability">{{skill.ability}}</span>
<span class="skill-mod" title="{{ localize 'DND5E.SkillModifierHint' skill=skill.label }}">
<span class="skill-mod" data-tooltip="{{ localize 'DND5E.SkillModifierHint' skill=skill.label }}">
{{numberFormat skill.total decimals=0 sign=true}}
</span>
<span class="skill-passive" title="{{ localize 'DND5E.SkillPassiveHint' skill=skill.label }}">
<span class="skill-passive"
data-tooltip="{{ localize 'DND5E.SkillPassiveHint' skill=skill.label }}">
({{skill.passive}})
</span>
</li>
Expand Down
2 changes: 1 addition & 1 deletion templates/actors/group-sheet.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form class="{{cssClass}} flexcol" autocomplete="off">
<header class="sheet-header flexrow">
<img class="profile" src="{{actor.img}}" title="{{actor.name}}" alt="{{actor.name}}" data-edit="img">
<img class="profile" src="{{actor.img}}" data-tooltip="{{actor.name}}" alt="{{actor.name}}" data-edit="img">
<section class="header-details flexrow">
<h1 class="charname">
<input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'DND5E.Name'}}">
Expand Down
2 changes: 1 addition & 1 deletion templates/actors/limited-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{!-- Sheet Header --}}
<header class="sheet-header flexrow">
<img class="profile" src="{{actor.img}}" title="{{actor.name}}" data-edit="img"/>
<img class="profile" src="{{actor.img}}" data-tooltip="{{actor.name}}" data-edit="img"/>

<section class="header-details flexrow">
<h1 class="charname">
Expand Down
55 changes: 33 additions & 22 deletions templates/actors/npc-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{!-- NPC Sheet Header --}}
<header class="sheet-header flexrow">
<img class="profile" src="{{actor.img}}" title="{{actor.name}}" data-edit="img"/>
<img class="profile" src="{{actor.img}}" data-tooltip="{{actor.name}}" data-edit="img"/>

<section class="header-details flexrow">
{{> "dnd5e.actor-warnings"}}
Expand Down Expand Up @@ -35,8 +35,10 @@
<input type="text" name="system.details.alignment" value="{{system.details.alignment}}" placeholder="{{ localize 'DND5E.Alignment' }}"/>
</li>
<li class="creature-type">
<span title="{{labels.type}}">{{labels.type}}</span>
<a class="config-button" data-action="type" title="{{localize 'DND5E.CreatureTypeConfig'}}"><i class="fas fa-cog"></i></a>
<span data-tooltip="{{labels.type}}">{{labels.type}}</span>
<a class="config-button" data-action="type" data-tooltip="{{localize 'DND5E.CreatureTypeConfig'}}">
<i class="fas fa-cog"></i>
</a>
</li>
<li>
<input type="text" name="system.details.source" value="{{system.details.source}}" placeholder="{{ localize 'DND5E.Source' }}"/>
Expand All @@ -47,29 +49,30 @@
<ul class="attributes flexrow">
<li class="attribute health">
<h4 class="attribute-name box-title">{{ localize "DND5E.HitPoints" }}</h4>
<a class="config-button" data-action="hit-points" title="{{localize 'DND5E.HitPointsConfig'}}">
<a class="config-button" data-action="hit-points"
data-tooltip="{{localize 'DND5E.HitPointsConfig'}}">
<i class="fas fa-cog"></i>
</a>
<div class="attribute-value multiple">
<input name="system.attributes.hp.value" type="text" value="{{hp.value}}" placeholder="10"
title="{{localize 'DND5E.HitPointsCurrent'}}" data-dtype="Number">
data-tooltip="{{localize 'DND5E.HitPointsCurrent'}}" data-dtype="Number">
<span class="sep"> / </span>
<input name="system.attributes.hp.max" type="text" value="{{hp.max}}" placeholder="10"
title="{{localize 'DND5E.HitPointsMax'}}" data-dtype="Number">
data-tooltip="{{localize 'DND5E.HitPointsMax'}}" data-dtype="Number">
</div>
<footer class="attribute-footer flexrow">
<input name="system.attributes.hp.temp" type="text" class="temphp"
placeholder="+{{ localize 'DND5E.Temp' }}" value="{{hp.temp}}"
title="{{localize 'DND5E.HitPointsTemp'}}">
data-tooltip="{{localize 'DND5E.HitPointsTemp'}}">
<input name="system.attributes.hp.tempmax" type="text" class="temphp"
placeholder="+{{ localize 'DND5E.Max' }}" value="{{hp.tempmax}}"
title="{{localize 'DND5E.HitPointsTempMax'}}">
data-tooltip="{{localize 'DND5E.HitPointsTempMax'}}">
</footer>
</li>

<li class="attribute armor">
<h4 class="attribute-name box-title">{{ localize "DND5E.ArmorClass" }}</h4>
<a class="config-button" data-action="armor" title="{{localize 'DND5E.ArmorConfig'}}">
<a class="config-button" data-action="armor" data-tooltip="{{localize 'DND5E.ArmorConfig'}}">
<i class="fas fa-cog"></i>
</a>
<div class="attribute-value attributable" data-property="attributes.ac">
Expand All @@ -82,7 +85,7 @@

<li class="attribute movement">
<h4 class="attribute-name box-title">{{ localize "DND5E.Movement" }}</h4>
<a class="config-button" data-action="movement" title="{{localize 'DND5E.MovementConfig'}}">
<a class="config-button" data-action="movement" data-tooltip="{{localize 'DND5E.MovementConfig'}}">
<i class="fas fa-cog"></i>
</a>
<div class="attribute-value">
Expand Down Expand Up @@ -117,12 +120,18 @@
<input type="text" value="{{ability.value}}" name="{{concat "system.abilities." id ".value"}}"
class="ability-score" placeholder="10" data-dtype="Number">
<div class="ability-modifiers flexrow">
<span class="ability-mod" title="{{ localize 'DND5E.Modifier' }}">{{numberFormat ability.mod decimals=0 sign=true}}</span>
<input type="hidden" name="system.abilities.{{id}}.proficient" value="{{ability.baseProf}}" data-dtype="Number"/>
<a class="proficiency-toggle ability-proficiency" title="{{ localize 'DND5E.Proficiency' }}">{{{ability.icon}}}</a>
<span class="ability-save" title="{{ localize 'DND5E.SavingThrow' }}">{{numberFormat ability.save decimals=0 sign=true}}</span>
<span class="ability-mod" data-tooltip="{{ localize 'DND5E.Modifier' }}">
{{numberFormat ability.mod decimals=0 sign=true}}
</span>
<input type="hidden" name="system.abilities.{{id}}.proficient" value="{{ability.baseProf}}"
data-dtype="Number"/>
<a class="proficiency-toggle ability-proficiency"
data-tooltip="{{ localize 'DND5E.Proficiency' }}">{{{ability.icon}}}</a>
<span class="ability-save" data-tooltip="{{ localize 'DND5E.SavingThrow' }}">
{{numberFormat ability.save decimals=0 sign=true}}</span>
</div>
<a class="config-button" data-action="ability" title="{{localize 'DND5E.AbilityConfigure'}}"><i class="fas fa-cog"></i></a>
<a class="config-button" data-action="ability"
data-tooltip="{{localize 'DND5E.AbilityConfigure'}}"><i class="fas fa-cog"></i></a>
</li>
{{/each}}
</ul>
Expand All @@ -133,16 +142,18 @@
{{#with (lookup ../skills s) as |skill|}}
<li class="skill flexrow {{#if skill.value}}proficient{{/if}}" data-skill="{{s}}">
<input type="hidden" name="system.skills.{{s}}.value" value="{{skill.baseValue}}" data-dtype="Number"/>
<a class="proficiency-toggle skill-proficiency" title="{{skill.hover}}">{{{skill.icon}}}</a>
<a class="proficiency-toggle skill-proficiency" data-tooltip="{{skill.hover}}">{{{skill.icon}}}</a>
<div class="skill-name-controls">
<h4 class="skill-name rollable">{{skill.label}}</h4>
<a class="config-button" data-action="skill" title="{{localize 'DND5E.SkillConfigure'}}"><i class="fas fa-cog"></i></a>
<a class="config-button" data-action="skill"
data-tooltip="{{localize 'DND5E.SkillConfigure'}}"><i class="fas fa-cog"></i></a>
</div>
<span class="skill-ability">{{skill.ability}}</span>
<span class="skill-mod" title="{{ localize 'DND5E.SkillModifierHint' skill=skill.label }}">
<span class="skill-mod" data-tooltip="{{ localize 'DND5E.SkillModifierHint' skill=skill.label }}">
{{numberFormat skill.total decimals=0 sign=true}}
</span>
<span class="skill-passive" title="{{ localize 'DND5E.SkillPassiveHint' skill=skill.label }}">
<span class="skill-passive"
data-tooltip="{{ localize 'DND5E.SkillPassiveHint' skill=skill.label }}">
({{skill.passive}})
</span>
</li>
Expand All @@ -159,7 +170,7 @@
<div class="counter-value">
<input name="system.resources.legact.value" type="text" step="any"
value="{{system.resources.legact.value}}" placeholder="0"
title="{{localize 'DND5E.LegActRemaining'}}"
data-tooltip="{{localize 'DND5E.LegActRemaining'}}"
data-dtype="Number">
<span class="sep">/</span>
{{numberInput system.resources.legact.max name="system.resources.legact.max" min=0 step=1
Expand All @@ -171,7 +182,7 @@
<div class="counter-value">
<input name="system.resources.legres.value" type="text" step="any"
value="{{system.resources.legres.value}}" placeholder="0"
title="{{localize 'DND5E.LegResRemaining'}}"
data-tooltip="{{localize 'DND5E.LegResRemaining'}}"
data-dtype="Number">
<span class="sep">/</span>
{{numberInput system.resources.legres.max name="system.resources.legres.max" min=0 step=1
Expand All @@ -186,7 +197,7 @@
data-dtype="Boolean" {{checked system.resources.lair.value}}>
<input name="system.resources.lair.initiative" type="number" step="any"
value="{{system.resources.lair.initiative}}"
placeholder="20" title="{{localize 'DND5E.LairActionInitiative'}}">
placeholder="20" data-tooltip="{{localize 'DND5E.LairActionInitiative'}}">
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions templates/actors/parts/active-effects.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="effect-source">{{localize "DND5E.Duration"}}</div>
<div class="item-controls effect-controls flexrow">
{{#if @root.editable}}
<a class="effect-control" data-action="create" title="{{localize 'DND5E.EffectCreate'}}">
<a class="effect-control" data-action="create" data-tooltip="{{localize 'DND5E.EffectCreate'}}">
<i class="fas fa-plus"></i> {{localize "DND5E.Add"}}
</a>
{{/if}}
Expand All @@ -34,13 +34,13 @@
<div class="item-controls effect-controls flexrow">
{{#if @root.editable}}
<a class="effect-control" data-action="toggle"
title="{{#if effect.disabled}}{{localize 'DND5E.EffectEnable'}}{{else}}{{localize 'DND5E.EffectDisable'}}{{/if}}">
data-tooltip="{{#if effect.disabled}}{{localize 'DND5E.EffectEnable'}}{{else}}{{localize 'DND5E.EffectDisable'}}{{/if}}">
<i class="fas {{#if effect.disabled}}fa-check{{else}}fa-times{{/if}}"></i>
</a>
<a class="effect-control" data-action="edit" title="{{localize 'DND5E.EffectEdit'}}">
<a class="effect-control" data-action="edit" data-tooltip="{{localize 'DND5E.EffectEdit'}}">
<i class="fas fa-edit"></i>
</a>
<a class="effect-control" data-action="delete" title="{{localize 'DND5E.EffectDelete'}}">
<a class="effect-control" data-action="delete" data-tooltip="{{localize 'DND5E.EffectDelete'}}">
<i class="fas fa-trash"></i>
</a>
{{/if}}
Expand Down
Loading