{navigationData.map((nav)=>(nav.duplicate===undefined&&nav.hr===undefined)&&
+
{APP_TITLE+" - Admin Panel: "+nav.page}
- {nav.page}
-
- )}
+ {nav.render??
}
+ )}
-
+
+
+
>}
diff --git a/src/skilltree/skillTreeEditor.js b/src/skilltree/skillTreeEditor.js
index 9fdd25e..48bc57e 100644
--- a/src/skilltree/skillTreeEditor.js
+++ b/src/skilltree/skillTreeEditor.js
@@ -7,7 +7,8 @@ function SkillTreeEditor(p) {
const ADJUSTMENT = [-32,-32]
- const [classList,setClassList] = useState([])
+ const [classList,setClassList] = useState({})
+ const [skillTreeData,setSkillTreeData] = useState({})
const [cl,setCl] = useState(0)
const [lineColor,setLineColor] = useState("#000000")
const [lineWidth,setLineWidth] = useState(3)
@@ -18,18 +19,27 @@ function SkillTreeEditor(p) {
const [gridPaddingX,setGridPaddingX] = useState(10)
const [gridPaddingY,setGridPaddingY] = useState(10)
const [renderedInputs,setRenderedInputs] = useState([])
- const [skillLines,setSkillLines] = useState([
- "□ □ ", //─ □
- "└□─┘□□", //│ ├┤┼
- " │ ││", //
- " │ □│", //┌ ┐ ┬
- " □─□┼□", //└ ┘ ┴
- " □ "])
+ const [skillLines,setSkillLines] = useState([])
useEffect(()=>{
setClassList(p.GetData("class",undefined,undefined,true))
+ setSkillTreeData(p.GetData("skill_tree_data",undefined,undefined,true))
},[p.GetData])
+ useEffect(()=>{
+ var keys = Object.keys(skillTreeData)
+ for (var id of keys) {
+ //console.log(cl+"/"+skillTreeData[id].class_id)
+ if (skillTreeData[id].class_id==cl) {
+ var data = skillTreeData[id].data.split(',')
+ setSkillLines(data)
+ setDimensionX(data[0].length)
+ setDimensionY(data.length)
+ setLineColor(skillTreeData[id].line_color)
+ }
+ }
+ },[skillTreeData,cl])
+
useEffect(()=>{
setCl(Object.keys(classList)[0])
},[classList])
@@ -69,15 +79,15 @@ function SkillTreeEditor(p) {
},[skillLines,gridSizeX,gridSizeY,gridPaddingX,gridPaddingY,cl])
return <>
+