modified stance internal usage checkboxes->radio
This commit is contained in:
@@ -174,7 +174,7 @@
|
|||||||
"focustip": "Air + Feu",
|
"focustip": "Air + Feu",
|
||||||
"vigilante": "Vigilance",
|
"vigilante": "Vigilance",
|
||||||
"vigilantetip": "(Air + Eau) /2",
|
"vigilantetip": "(Air + Eau) /2",
|
||||||
"voidPoints": "Points de Vide",
|
"voidpoints": "Points de Vide",
|
||||||
"fatigue": "Fatigue",
|
"fatigue": "Fatigue",
|
||||||
"strife": "Conflit"
|
"strife": "Conflit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -61,8 +61,9 @@ Hooks.once("init", async function () {
|
|||||||
Items.registerSheet("l5r5e", FeatSheetL5r5e, { types: ["feat"], makeDefault: true });
|
Items.registerSheet("l5r5e", FeatSheetL5r5e, { types: ["feat"], makeDefault: true });
|
||||||
|
|
||||||
// for debug
|
// for debug
|
||||||
Handlebars.registerHelper("json", function (object) {
|
Handlebars.registerHelper("json", function (...objects) {
|
||||||
return new Handlebars.SafeString(JSON.stringify(object));
|
objects.pop(); // remove this function call
|
||||||
|
return new Handlebars.SafeString(objects.map((e) => `<textarea>${JSON.stringify(e)}</textarea>`));
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper("localizeSkillCategory", function (skillName) {
|
Handlebars.registerHelper("localizeSkillCategory", function (skillName) {
|
||||||
@@ -70,6 +71,11 @@ Hooks.once("init", async function () {
|
|||||||
return game.i18n.localize(key);
|
return game.i18n.localize(key);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add props "checked" if a and b are equal ({{radioChecked a b}}
|
||||||
|
Handlebars.registerHelper("radioChecked", function (a, b) {
|
||||||
|
return a === b ? new Handlebars.SafeString('checked="checked"') : "";
|
||||||
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper("localizeSkill", function (skillCategory, skillName) {
|
Handlebars.registerHelper("localizeSkill", function (skillCategory, skillName) {
|
||||||
const key = "l5r5e.skills." + skillCategory.toLowerCase() + "." + skillName.toLowerCase();
|
const key = "l5r5e.skills." + skillCategory.toLowerCase() + "." + skillName.toLowerCase();
|
||||||
return game.i18n.localize(key);
|
return game.i18n.localize(key);
|
||||||
@@ -115,7 +121,7 @@ Hooks.once("setup", function () {
|
|||||||
Hooks.once("ready", function () {
|
Hooks.once("ready", function () {
|
||||||
// Do anything once the system is ready
|
// Do anything once the system is ready
|
||||||
// Add title on button dice icon
|
// Add title on button dice icon
|
||||||
$.find(".chat-control-icon")[0].title = game.i18n.localize("l5r5e.chatdices.dicepicker");
|
$(".chat-control-icon")[0].title = game.i18n.localize("l5r5e.chatdices.dicepicker");
|
||||||
});
|
});
|
||||||
|
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
@@ -175,7 +181,6 @@ Hooks.once("diceSoNiceReady", (dice3d) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Logo & Menu options
|
// Logo & Menu options
|
||||||
|
|
||||||
Hooks.once("ready", async function () {
|
Hooks.once("ready", async function () {
|
||||||
// -- Function Open Edge-Studio Website
|
// -- Function Open Edge-Studio Website
|
||||||
function openEdge() {
|
function openEdge() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const PreloadTemplates = async function () {
|
|||||||
"systems/l5r5e/templates/sheets/actor/stance.html",
|
"systems/l5r5e/templates/sheets/actor/stance.html",
|
||||||
"systems/l5r5e/templates/sheets/actor/feats.html",
|
"systems/l5r5e/templates/sheets/actor/feats.html",
|
||||||
"systems/l5r5e/templates/sheets/actor/experience.html",
|
"systems/l5r5e/templates/sheets/actor/experience.html",
|
||||||
"systems/l5r5e/templates/sheets/actor/adquisition.html",
|
"systems/l5r5e/templates/sheets/actor/acquisition.html",
|
||||||
// items
|
// items
|
||||||
"systems/l5r5e/templates/item/weapon-sheet.html",
|
"systems/l5r5e/templates/item/weapon-sheet.html",
|
||||||
"systems/l5r5e/templates/item/items.html",
|
"systems/l5r5e/templates/item/items.html",
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sidebar-tab {
|
.sidebar-tab {
|
||||||
|
.chat-control-icon {
|
||||||
|
cursor: url("../l5r-ui/ui/cursors/pointer.webp"), pointer;
|
||||||
|
}
|
||||||
.action-buttons button {
|
.action-buttons button {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
color: $white;
|
color: $white;
|
||||||
|
|||||||
@@ -77,23 +77,7 @@
|
|||||||
},
|
},
|
||||||
"fatigue": 0,
|
"fatigue": 0,
|
||||||
"strife": 0,
|
"strife": 0,
|
||||||
"stances": {
|
"stance": "air"
|
||||||
"air": {
|
|
||||||
"isSelected": false
|
|
||||||
},
|
|
||||||
"earth": {
|
|
||||||
"isSelected": false
|
|
||||||
},
|
|
||||||
"fire": {
|
|
||||||
"isSelected": false
|
|
||||||
},
|
|
||||||
"water": {
|
|
||||||
"isSelected": false
|
|
||||||
},
|
|
||||||
"void": {
|
|
||||||
"isSelected": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"xp": {
|
"xp": {
|
||||||
"xp_total": 0,
|
"xp_total": 0,
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div class="conflict-top-content">
|
<div class="conflict-top-content">
|
||||||
<div class="conflict-stances-content">
|
<div class="conflict-stances-content">
|
||||||
<h4 class="section-header">{{ localize 'l5r5e.conflict.stance' }}</h4>
|
<h4 class="section-header">{{ localize 'l5r5e.conflict.stance' }}</h4>
|
||||||
{{#each data.stances as |stance stanceId|}}
|
{{#each data.rings as |ringValue ringId|}}
|
||||||
{{> 'systems/l5r5e/templates/sheets/actor/stance.html' stance=stance stanceId=stanceId }}
|
{{> 'systems/l5r5e/templates/sheets/actor/stance.html' stance=../data.stance ringId=ringId }}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{> 'systems/l5r5e/templates/item/weapons.html' }}
|
{{> 'systems/l5r5e/templates/item/weapons.html' }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="stance-content">
|
<div class="stance-content">
|
||||||
<input type="checkbox" name="data.stances.{{stanceId}}.isSelected.value" {{ checked stance.isSelected.value }}/>
|
<input id="stance_{{ringId}}" type="radio" name="data.stance" value="{{ringId}}" {{radioChecked ringId stance}}/>
|
||||||
<label class="stance-title {{stanceId}}">{{ localizeRing stanceId }}</label>
|
<label for="stance_{{ringId}}" class="stance-title {{ringId}}">{{ localizeRing ringId }}</label>
|
||||||
<p class="quick-rules" style="display: inline;"> {{ localizeStanceTip stanceId }}</p>
|
<p class="quick-rules" style="display: inline;"> {{ localizeStanceTip ringId }}</p>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user