diff --git a/src/TestPanel.js b/src/TestPanel.js index 11e787b..fe204f0 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -104,11 +104,22 @@ function ClassSelector(p){ } +function ClassSelectorWindow(p) { + return { + var dat1 = p.GetData("class") + return Object.keys(dat1) + } + } + displayFunction={(key) => { + return
  • { if (p.editClass===0){p.setClassName(key)}else{p.setSubClassName(key)}; p.setModalOpen(false) }}> {p.GetData("class", key, "name")}
  • + }} +/> +} + function EditableClass(p){ - const [edit,setEdit] = useState(false) - return <>
    {setEdit(!edit)}}> + return <>
    {p.setClassNameSetter(p.editClass);p.setClassSelectWindowOpen(true)}}>
    - {edit&&} } @@ -155,14 +166,13 @@ function SelectorWindow(p) { {p.filter?{setFilter(f.currentTarget.value)}} />:<>}
    - }
    + }
      {p.filter?itemList.filter((item)=>p.filterFunction(tabPage,item)).filter((item)=>p.searchFieldFunction(filter,item)).sort((a,b)=>p.sortOrderFunction(sortSelector,a,b)).map((item)=>p.displayFunction(item)):itemList.map((item)=>p.displayFunction(item))} {p.children}
    -
    } @@ -179,8 +189,8 @@ const [defGraphMax,setdefGraphMax] = useState(1000) const [author,setauthor] = useState("Player") const [buildName,setbuildName] = useState("Character") -const [className,setclassName] = useState("Hunter") -const [subclassName,setsubclassName] = useState("Force") +const [className,setClassName] = useState("Hunter") +const [subclassName,setSubClassName] = useState("Force") const [level,setLevel] = useState(20) const [secondaryLevel,setsecondaryLevel] = useState(20) @@ -212,6 +222,8 @@ const [skillTreeGridPaddingX,setSkillTreeGridPaddingX] = useState(10) const [skillTreeGridPaddingY,setSkillTreeGridPaddingY] = useState(48) const [halflineheight,setHalfLineHeight] = useState(60) +const [classNameSetter,setClassNameSetter] = useState(0) + function rarityCheck(v) { return v!==undefined?v.rarity!==undefined?" r"+v.rarity:"":"" @@ -276,9 +288,9 @@ useEffect(()=>{ - {setClassSelectWindowOpen(true)}} >Class + Class - + @@ -287,7 +299,7 @@ useEffect(()=>{ {setClassSkillTreeWindowOpen(true)}}>Sub-Class - + @@ -538,16 +550,7 @@ AUGMENT - { - var mythraSux = p.GetData("class") - return Object.keys(mythraSux) - } - } - displayFunction={(key) => { - return
  • { setclassName(key); setClassSelectWindowOpen(false) }}> {p.GetData("class", key, "name")}
  • - }} - /> + {setClassSkillTreeWindowOpen(false)}} shouldFocusAfterRender={true} shouldCloseOnOverlayClick={true} shouldCloseOnEsc={true} className="modalSkillTree" overlayClassName="modalOverlaySkillTree"> diff --git a/src/style.css b/src/style.css index aa82e57..3bb00f7 100644 --- a/src/style.css +++ b/src/style.css @@ -431,7 +431,6 @@ em { } .itemlist { margin: 0 10px; - } .itemlist li { background-color: rgba(128,128,128,0.33); @@ -441,7 +440,6 @@ em { background-repeat: no-repeat; background-position: right top; background-origin: content-box; - } .aug:before { content:url("./icons/UINGSItemSpecialAbility.png");