|
@@ -441,25 +441,19 @@ export default {
|
|
|
});
|
|
|
|
|
|
// the sub items for one concernement
|
|
|
- // this.addNewPaperSymbolInstance('boussole_bg');
|
|
|
this.paper_main_object.addChild(this.setPaperContour());
|
|
|
- // this.paper_main_object.addChild(this.setPaperEntites());
|
|
|
|
|
|
if (this.concernement.has_puissancedagir) {
|
|
|
- // this.addNewPaperSymbolInstance('puissanceagir_bg');
|
|
|
this.addNewPaperSymbolInstance('puissanceagir_icon');
|
|
|
- // this.paper_main_object.addChild(this.setPaperPuissanceagirBesoins());
|
|
|
}
|
|
|
if (this.concernement.has_agissantes) {
|
|
|
+ // TODO icons
|
|
|
// this.paper_main_object.addChild(this.setPaperAgissantes());
|
|
|
}
|
|
|
if (this.concernement.has_doleance) {
|
|
|
- // this.addNewPaperSymbolInstance('doleance_bg');
|
|
|
this.addNewPaperSymbolInstance('doleance_icon');
|
|
|
- // this.paper_main_object.addChild(this.setPaperDoleances());
|
|
|
}
|
|
|
- // console.log(`initPaperObjects ${this.id}`, this.paper_main_object);
|
|
|
-
|
|
|
+
|
|
|
this.initPaperEvents()
|
|
|
},
|
|
|
setPaperContents(){
|
|
@@ -999,71 +993,21 @@ export default {
|
|
|
this.paper_main_object.children['contours'].visible = false;
|
|
|
}
|
|
|
|
|
|
- // backgrounds
|
|
|
- if (this.is_opened) {
|
|
|
- // hide all bgs
|
|
|
- // this.paper_main_object.children.boussole_bg.visible = false;
|
|
|
- // if (this.concernement.has_puissancedagir) {
|
|
|
- // this.paper_main_object.children.puissanceagir_bg.visible = false;
|
|
|
- // }
|
|
|
- // if (this.concernement.has_doleance) {
|
|
|
- // this.paper_main_object.children.doleance_bg.visible = false;
|
|
|
- // }
|
|
|
- // choose wich one to show, if one
|
|
|
- switch (this.map_mode) {
|
|
|
- case 'terraindevie':
|
|
|
- case 'action':
|
|
|
- // this.paper_main_object.children.boussole_bg.visible = true;
|
|
|
- break;
|
|
|
- case 'puissancedagir':
|
|
|
- // if (this.concernement.has_puissancedagir) {
|
|
|
- // this.paper_main_object.children.puissanceagir_bg.visible = true;
|
|
|
- // }
|
|
|
- break;
|
|
|
- case 'doleancer':
|
|
|
- // if (this.concernement.has_doleance) {
|
|
|
- // this.paper_main_object.children.doleance_bg.visible = true;
|
|
|
- // }
|
|
|
- break;
|
|
|
- }
|
|
|
- }else{
|
|
|
- // this.paper_main_object.children.boussole_bg.visible = false;
|
|
|
- // if (this.concernement.has_puissancedagir) {
|
|
|
- // this.paper_main_object.children.puissanceagir_bg.visible = false;
|
|
|
- // }
|
|
|
- // if (this.concernement.has_doleance) {
|
|
|
- // this.paper_main_object.children.doleance_bg.visible = false;
|
|
|
- // }
|
|
|
- }
|
|
|
-
|
|
|
- // entites
|
|
|
- // if (this.is_opened
|
|
|
- // && this.map_mode !== 'puissancedagir'
|
|
|
- // && this.map_mode !== 'doleancer'
|
|
|
- // && this.map_mode !== 'action' ) {
|
|
|
- // this.paper_main_object.children.entites.visible = true;
|
|
|
- // } else {
|
|
|
- // this.paper_main_object.children.entites.visible = false;
|
|
|
- // }
|
|
|
-
|
|
|
|
|
|
// puissance d'agir
|
|
|
if (this.concernement.has_puissancedagir) {
|
|
|
if (this.map_mode === "puissancedagir") {
|
|
|
if (!this.is_opened) {
|
|
|
this.paper_main_object.children.puissanceagir_icon.visible = true; // if not opened and has_puissancedagir draw the puissance d'agir icone
|
|
|
- // this.paper_main_object.children.puissanceagir_besoins.visible = false;
|
|
|
} else {
|
|
|
this.paper_main_object.children.puissanceagir_icon.visible = false;
|
|
|
- // this.paper_main_object.children.puissanceagir_besoins.visible = true;
|
|
|
- // this.drawBesoins();
|
|
|
}
|
|
|
} else {
|
|
|
this.paper_main_object.children.puissanceagir_icon.visible = false;
|
|
|
- // this.paper_main_object.children.puissanceagir_besoins.visible = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // TODO icons
|
|
|
// // agissantes
|
|
|
// // console.log('this.concernement.has_agissantes', this.concernement.has_agissantes);
|
|
|
// if (this.concernement.has_agissantes) {
|
|
@@ -1079,10 +1023,8 @@ export default {
|
|
|
if (this.map_mode === "doleancer") {
|
|
|
if (!this.is_opened) {
|
|
|
this.paper_main_object.children.doleance_icon.visible = true;
|
|
|
- // this.paper_main_object.children.doleances.visible = false;
|
|
|
} else {
|
|
|
this.paper_main_object.children.doleance_icon.visible = false;
|
|
|
- // this.paper_main_object.children.doleances.visible = true;
|
|
|
// display the right (opened) doleance
|
|
|
this.concernement.doleances.forEach((d) => {
|
|
|
this.paper_main_object.children.doleances.children[`doleance_${d.id}`].visible = d.id === this.concernement.opened_doleance.id;
|
|
@@ -1090,7 +1032,6 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
this.paper_main_object.children.doleance_icon.visible = false;
|
|
|
- // this.paper_main_object.children.doleances.visible = false;
|
|
|
}
|
|
|
}
|
|
|
|