mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-22 23:43:37 +02:00
.
This commit is contained in:
parent
154b518383
commit
b649ec5d08
5 changed files with 87 additions and 76 deletions
|
|
@ -2752,6 +2752,7 @@
|
||||||
"label": "Appearance Settings",
|
"label": "Appearance Settings",
|
||||||
"hint": "Modify the look of various parts of the system",
|
"hint": "Modify the look of various parts of the system",
|
||||||
"duality": "Duality Rolls",
|
"duality": "Duality Rolls",
|
||||||
|
"globalSettings": "GM Settings",
|
||||||
"globalAnimations": "Global Animations",
|
"globalAnimations": "Global Animations",
|
||||||
"diceAppearance": "Dice Appearance",
|
"diceAppearance": "Dice Appearance",
|
||||||
"animations": "Animations",
|
"animations": "Animations",
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,8 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App
|
||||||
{ id: 'hope', label: 'DAGGERHEART.GENERAL.hope' },
|
{ id: 'hope', label: 'DAGGERHEART.GENERAL.hope' },
|
||||||
{ id: 'fear', label: 'DAGGERHEART.GENERAL.fear' },
|
{ id: 'fear', label: 'DAGGERHEART.GENERAL.fear' },
|
||||||
{ id: 'advantage', label: 'DAGGERHEART.GENERAL.Advantage.full' },
|
{ id: 'advantage', label: 'DAGGERHEART.GENERAL.Advantage.full' },
|
||||||
{ id: 'disadvantage', label: 'DAGGERHEART.GENERAL.Disadvantage.full' }
|
{ id: 'disadvantage', label: 'DAGGERHEART.GENERAL.Disadvantage.full' },
|
||||||
|
{ id: 'general', label: 'DAGGERHEART.GENERAL.general' }
|
||||||
],
|
],
|
||||||
initial: 'hope'
|
initial: 'hope'
|
||||||
}
|
}
|
||||||
|
|
@ -102,6 +103,7 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App
|
||||||
|
|
||||||
context.tabs = this._prepareTabs('general');
|
context.tabs = this._prepareTabs('general');
|
||||||
context.dsnTabs = this._prepareTabs('diceSoNice');
|
context.dsnTabs = this._prepareTabs('diceSoNice');
|
||||||
|
|
||||||
context.isGM = game.user.isGM;
|
context.isGM = game.user.isGM;
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
|
|
@ -174,6 +176,7 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App
|
||||||
(acc, key) => ({
|
(acc, key) => ({
|
||||||
...acc,
|
...acc,
|
||||||
[key]: {
|
[key]: {
|
||||||
|
diceTab: key !== 'general',
|
||||||
values: this.setting.diceSoNice[key],
|
values: this.setting.diceSoNice[key],
|
||||||
fields: this.setting.schema.getField(`diceSoNice.${key}`).fields,
|
fields: this.setting.schema.getField(`diceSoNice.${key}`).fields,
|
||||||
animations: ['hope', 'fear'].includes(key) ? getAnimationsOptions(key) : {}
|
animations: ['hope', 'fear'].includes(key) ? getAnimationsOptions(key) : {}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ export const preloadHandlebarsTemplates = async function () {
|
||||||
'systems/daggerheart/templates/ui/chat/parts/target-part.hbs',
|
'systems/daggerheart/templates/ui/chat/parts/target-part.hbs',
|
||||||
'systems/daggerheart/templates/ui/chat/parts/button-part.hbs',
|
'systems/daggerheart/templates/ui/chat/parts/button-part.hbs',
|
||||||
'systems/daggerheart/templates/ui/itemBrowser/itemContainer.hbs',
|
'systems/daggerheart/templates/ui/itemBrowser/itemContainer.hbs',
|
||||||
'systems/daggerheart/templates/scene/dh-config.hbs'
|
'systems/daggerheart/templates/scene/dh-config.hbs',
|
||||||
|
'systems/daggerheart/templates/settings/appearance-settings/diceSoNiceTab.hbs'
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,6 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="title-hint">{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.hint"}}</div>
|
<div class="title-hint">{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.hint"}}</div>
|
||||||
|
|
||||||
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.globalAnimations"}}</h3>
|
|
||||||
<div class="split-section">
|
|
||||||
<div class="label-container full-width">
|
|
||||||
<label>{{localize "DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.critical.name"}}</label>
|
|
||||||
{{formInput fields.diceSoNice.fields.sfx.fields.critical.fields.class value=setting.diceSoNice.sfx.critical.class blank="" localize=true}}
|
|
||||||
</div>
|
|
||||||
{{#if isGM}}
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.defaultAnimations"}}</label>
|
|
||||||
<input type="checkbox" class="default-animations-input" {{checked globalOverrides.diceSoNice.sfx.overrideEnabled}} />
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section class='tab-navigation'>
|
<section class='tab-navigation'>
|
||||||
<div class='navigation-container'>
|
<div class='navigation-container'>
|
||||||
<div class="navigation-inner-container">
|
<div class="navigation-inner-container">
|
||||||
|
|
@ -33,67 +19,26 @@
|
||||||
</section>
|
</section>
|
||||||
{{#each dsnTabs as |dsnTab|}}
|
{{#each dsnTabs as |dsnTab|}}
|
||||||
<section class="tab {{#if dsnTab.active}} active{{/if}}" data-group="{{dsnTab.group}}" data-tab="{{dsnTab.id}}">
|
<section class="tab {{#if dsnTab.active}} active{{/if}}" data-group="{{dsnTab.group}}" data-tab="{{dsnTab.id}}">
|
||||||
|
{{#if dsnTab.diceTab}}
|
||||||
|
{{> "systems/daggerheart/templates/settings/appearance-settings/diceSoNiceTab.hbs" dsnTab }}
|
||||||
|
{{else}}
|
||||||
<div class="field-section">
|
<div class="field-section">
|
||||||
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceAppearance"}}</h3>
|
{{#if ../isGM}}
|
||||||
|
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.globalSettings"}}</h3>
|
||||||
<div class="label-container full-width">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.system"}}</label>
|
|
||||||
{{formInput fields.system value=values.system localize=true choices=@root.diceSoNiceSystems}}
|
|
||||||
</div>
|
|
||||||
<div class="split-section">
|
|
||||||
<div class="label-container">
|
<div class="label-container">
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.defaultAnimations"}}</label>
|
||||||
{{formInput fields.foreground value=values.foreground localize=true}}
|
<input type="checkbox" class="default-animations-input" {{checked ../globalOverrides.diceSoNice.sfx.overrideEnabled}} />
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
|
||||||
{{formInput fields.background value=values.background localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
|
||||||
{{formInput fields.outline value=values.outline localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
|
||||||
{{formInput fields.edge value=values.edge localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.colorset"}}</label>
|
|
||||||
{{formInput fields.colorset value=values.colorset choices=@root.diceSoNiceColorsets localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.texture"}}</label>
|
|
||||||
{{formInput fields.texture value=values.texture choices=@root.diceSoNiceTextures localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.material"}}</label>
|
|
||||||
{{formInput fields.material value=values.material choices=@root.diceSoNiceMaterials localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.font"}}</label>
|
|
||||||
{{formInput fields.font value=values.font choices=@root.diceSoNiceFonts localize=true}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{#if dsnTab.animations}}
|
|
||||||
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.animations"}}</h3>
|
|
||||||
<div class="label-container full-width">
|
|
||||||
<label>{{localize "DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.higher.name"}}</label>
|
|
||||||
{{formInput fields.sfx.fields.higher.fields.class value=values.sfx.higher.class blank="" localize=true}}
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.globalAnimations"}}</h3>
|
||||||
<div class="diceSoNice-footer">
|
<div class="split-section">
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.previewAnimation"}}</label>
|
<div class="label-container full-width">
|
||||||
<select name="{{concat dsnTab.id "PreviewAnimation"}}">
|
<label>{{localize "DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.critical.name"}}</label>
|
||||||
{{selectOptions @root.animationEvents selected=@root.previewAnimation blank="" localize=true }}
|
{{formInput ../fields.diceSoNice.fields.sfx.fields.critical.fields.class value=../setting.diceSoNice.sfx.critical.class blank="" localize=true}}
|
||||||
</select>
|
|
||||||
<button type="button" data-action="preview" data-key="{{dsnTab.id}}">
|
|
||||||
<i class="fa-solid fa-dice"></i>
|
|
||||||
<span>{{localize "DAGGERHEART.GENERAL.preview"}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</section>
|
</section>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
||||||
61
templates/settings/appearance-settings/diceSoNiceTab.hbs
Normal file
61
templates/settings/appearance-settings/diceSoNiceTab.hbs
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
<div class="field-section">
|
||||||
|
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceAppearance"}}</h3>
|
||||||
|
|
||||||
|
<div class="label-container full-width">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.system"}}</label>
|
||||||
|
{{formInput fields.system value=values.system localize=true choices=@root.diceSoNiceSystems}}
|
||||||
|
</div>
|
||||||
|
<div class="split-section">
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
||||||
|
{{formInput fields.foreground value=values.foreground localize=true}}
|
||||||
|
</div>
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
||||||
|
{{formInput fields.background value=values.background localize=true}}
|
||||||
|
</div>
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
||||||
|
{{formInput fields.outline value=values.outline localize=true}}
|
||||||
|
</div>
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
||||||
|
{{formInput fields.edge value=values.edge localize=true}}
|
||||||
|
</div>
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.colorset"}}</label>
|
||||||
|
{{formInput fields.colorset value=values.colorset choices=@root.diceSoNiceColorsets localize=true}}
|
||||||
|
</div>
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.texture"}}</label>
|
||||||
|
{{formInput fields.texture value=values.texture choices=@root.diceSoNiceTextures localize=true}}
|
||||||
|
</div>
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.material"}}</label>
|
||||||
|
{{formInput fields.material value=values.material choices=@root.diceSoNiceMaterials localize=true}}
|
||||||
|
</div>
|
||||||
|
<div class="label-container">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.font"}}</label>
|
||||||
|
{{formInput fields.font value=values.font choices=@root.diceSoNiceFonts localize=true}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if dsnTab.animations}}
|
||||||
|
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.animations"}}</h3>
|
||||||
|
<div class="label-container full-width">
|
||||||
|
<label>{{localize "DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.higher.name"}}</label>
|
||||||
|
{{formInput fields.sfx.fields.higher.fields.class value=values.sfx.higher.class blank="" localize=true}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="diceSoNice-footer">
|
||||||
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.previewAnimation"}}</label>
|
||||||
|
<select name="{{concat dsnTab.id "PreviewAnimation"}}">
|
||||||
|
{{selectOptions @root.animationEvents selected=@root.previewAnimation blank="" localize=true }}
|
||||||
|
</select>
|
||||||
|
<button type="button" data-action="preview" data-key="{{dsnTab.id}}">
|
||||||
|
<i class="fa-solid fa-dice"></i>
|
||||||
|
<span>{{localize "DAGGERHEART.GENERAL.preview"}}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue