From 00b616072caa25fed1eb7764af014ab6cb92e72d Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Sat, 14 Aug 2021 19:25:02 +0900 Subject: [PATCH] Setup sklil tree display grid --- src/TestPanel.js | 111 +++++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 46 deletions(-) diff --git a/src/TestPanel.js b/src/TestPanel.js index 94d7f05..3fef320 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -2,6 +2,7 @@ import React, { useEffect,useState,useRef } from 'react'; import Modal from 'react-modal' import { DisplayIcon } from './DEFAULTS'; import { ExpandTooltip } from './components/ExpandTooltip'; +import { SkillTree } from './skilltree/skillTree'; //Helper variables for Weapon selector with structure: [weapon_type,weapon,potential,potential_tooltip,weapon_existence_data] const WEAPON_WEAPONTYPE=0;const WEAPON_WEAPON=1;const WEAPON_POTENTIAL=2;const WEAPON_POTENTIAL_TOOLTIP=3;const WEAPON_EXISTENCE_DATA=4; @@ -198,6 +199,19 @@ const [selectedArmor2,setSelectedArmor2] = useState([]) const [selectedArmor3,setSelectedArmor3] = useState([]) const [armorSlotSelection,setArmorSlotSelection] = useState(1) +const [skillTreeClass,setSkillTreeClass] = useState(Object.keys(p.GetData("class",'','',true))[0]) +const [skillTreeData,setSkillTreeData] = useState([]) +const [skillTreeSkillData,setSkillTreeSkillData] = useState([]) +const [skillTreeLineColor,setSkillTreeLineColor] = useState("") +const [skillTreeLineWidth,setSkillTreeLineWidth] = useState(3) +const [skillTreeDimensionX,setSkillTreeDimensionX] = useState(6) +const [skillTreeDimensionY,setSkillTreeDimensionY] = useState(6) +const [skillTreeGridSizeX,setSkillTreeGridSizeX] = useState(171) +const [skillTreeGridSizeY,setSkillTreeGridSizeY] = useState(148) +const [skillTreeGridPaddingX,setSkillTreeGridPaddingX] = useState(10) +const [skillTreeGridPaddingY,setSkillTreeGridPaddingY] = useState(48) + + function rarityCheck(v) { return v!==undefined?v.rarity!==undefined?" r"+v.rarity:"":"" } @@ -218,6 +232,14 @@ useEffect(()=>{ } },[p.bp]) +useEffect(()=>{ + setSkillTreeClass(p.GetData("class",className,'id')) +},[className]) + +useEffect(()=>{ + +}) + //console.log(p.GetData("class",p.className,"icon")) return (<> @@ -506,53 +528,50 @@ AUGMENT ez pz {setClassSkillTreeWindowOpen(false)}} shouldFocusAfterRender={true} shouldCloseOnOverlayClick={true} shouldCloseOnEsc={true} className="modalSkillTree" overlayClassName="modalOverlaySkillTree"> +
+
+

Class Skill Tree

+
{ setClassSkillTreeWindowOpen(false) }}>
+
+
+
    + {Object.keys(p.GetData("class")).map((cl)=>
  • {cl}
  • )} +
+
+
- -
-
-

Class Skill Tree

-
{setClassSkillTreeWindowOpen(false)}}>
-
-
-
    -
  • Hunter
  • -
  • Fighter
  • -
  • Ranger
  • -
  • Gunner
  • -
  • Force
  • -
  • Techter
  • -
-
-
- -
-
-

Ranger01

-
{setClassSkillTreeWindowOpen(false)}}>
-
-
-
-
1/5Blight Rounds
-
 1/1Blight Rounds Reinforce
-
0/10Bad Condition Ward
-
0/1Spread Shot
-
 0/1Spread Shot Quick Getaway
-
0/10Bad Condition Reduction
-
0/1Rifle Grenadier
-
0/1Slide Shot Advance
-
0/1Sticky Bomb Quick Reload
-
0/1Launcher Charge Grouping
-
0/1Slow Landing Attack-Ranger
-
0/1Slow Landing Charge-Ranger
-
0/1Slow Landing Charge-Ranger
-
0/1Slow Landing Charge-Ranger
- - -
-
-
Your Skill Points  6   SP    0
-
ConfirmCancel
-
+
+
+

Ranger01

+
{ setClassSkillTreeWindowOpen(false) }}>
+
+
+
+ {} +
+
1/5Blight Rounds
+
 1/1Blight Rounds Reinforce
+
0/10Bad Condition Ward
+
0/1Spread Shot
+
 0/1Spread Shot Quick Getaway
+
0/10Bad Condition Reduction
+
0/1Rifle Grenadier
+
0/1Slide Shot Advance
+
0/1Sticky Bomb Quick Reload
+
0/1Launcher Charge Grouping
+
0/1Slow Landing Attack-Ranger
+
0/1Slow Landing Charge-Ranger
+
0/1Slow Landing Charge-Ranger
+
0/1Slow Landing Charge-Ranger
+
+
+
+
Your Skill Points  6   SP    0
+
ConfirmCancel
+