UI pour l'appel au moral
This commit is contained in:
@ -203,22 +203,22 @@ export class RdDRoll extends Dialog {
|
||||
console.log(html.find('.iconeSmile'));
|
||||
this.updateRollResult();
|
||||
});
|
||||
html.find('#useAppelAuMoralCheckbox').change((event) => { /* l'appel au moral, qui donne un bonus de +1 */
|
||||
this.rollData.appelAuMoralDemander = event.currentTarget.checked
|
||||
if ( this.rollData.appelAuMoralDemander ) {
|
||||
if ( this.rollData.moral > 0 ) {
|
||||
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-heureux.svg";
|
||||
html.find('#textSmile')[0].innerHTML = "Appel au moral";
|
||||
html.find('#iconeSmile').click((event) => { /* l'appel au moral, qui donne un bonus de +1 */
|
||||
this.rollData.appelAuMoralDemander = ! this.rollData.appelAuMoralDemander;
|
||||
if ( this.rollData.appelAuMoralDemander ) {
|
||||
if ( this.rollData.moral > 0 ) {
|
||||
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-heureux.svg";
|
||||
html.find('#tooltipAppelAuMoralText')[0].innerHTML = "Appel au moral";
|
||||
} else {
|
||||
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg";
|
||||
html.find('#tooltipAppelAuMoralText')[0].innerHTML = "Appel à l'énergie du désespoir";
|
||||
}
|
||||
} else {
|
||||
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg";
|
||||
html.find('#textSmile')[0].innerHTML = "Appel à l'énergie du désespoir";
|
||||
}
|
||||
} else {
|
||||
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg";
|
||||
html.find('#textSmile')[0].innerHTML = "Sans appel au moral";
|
||||
}
|
||||
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg";
|
||||
html.find('#tooltipAppelAuMoralText')[0].innerHTML = "Sans appel au moral";
|
||||
}
|
||||
this.updateRollResult();
|
||||
});
|
||||
});
|
||||
// Section Méditation
|
||||
html.find('.conditionMeditation').change((event) => {
|
||||
let condition = event.currentTarget.attributes['id'].value;
|
||||
|
Reference in New Issue
Block a user