diff --git a/src/TestPanel.js b/src/TestPanel.js index 388ceaf..4785d06 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -43,13 +43,13 @@ function EditBoxInput(p) { } function PageControlButton(p) { - return
  • {p.setCurrentPage(p.page)}} className={(p.currentPage===p.page)?"selected":"unselected"}>{p.pageName?p.pageName:p.page}
  • + return
  • {if (p.onPageChange) {p.onPageChange(p.pageName)} p.setCurrentPage(p.page)}} className={(p.currentPage===p.page)?"selected":"unselected"}>{p.pageName?p.pageName:p.page}
  • } function PageControl(p) { var pages = [] for (var i=0;i) + pages.push() } if (p.children!==undefined) { pages.push(
  • {p.children}
  • ) @@ -80,7 +80,7 @@ function PopupWindow(p) {

    {p.title}

    {p.showCloseButton&&
    {p.setModalOpen(false)}}>
    } - + {p.children} @@ -100,10 +100,17 @@ function SelectorWindow(p) { setItemList(p.dataFunction()) } },[p]) + + useEffect(()=>{ + if (p.onModalOpen) { + p.onModalOpen(setTabPage) + } + },[p.modalOpen]) return {(p.sortItems||p.filter)&&
    @@ -134,6 +141,33 @@ function RightButton(p){ return } +function ClassSelectorWindow(p) { + const [title,setTitle] = useState("Select Main Class") + useEffect(()=>{ + setTitle((p.editClass)?"Select Sub Class":"Select Main Class") + },[p.editClass]) + return { + if (page==="Main Class") { + p.setEditClass(0) + } else { + p.setEditClass(1) + } + }} + onModalOpen={(pageSetter)=>{ + pageSetter((p.editClass)?2:1) + }} + dataFunction={() => { + var dat1 = p.GetData("class") + return Object.keys(dat1) + } + } + displayFunction={(key) => { + return
  • {if (p.editClass===0){p.setClassName(key);p.setSubClassName(p.subClass===key?p.class:p.subClass)}else{p.setSubClassName(key);p.setClassName(p.class===key?p.subClass:p.class)}; p.setModalOpen(false) }}> {p.GetData("class", key, "name")}
  • + }} +/> +} function GetSpecialWeaponName(item) { return item[WEAPON_EXISTENCE_DATA]!==undefined?(item[WEAPON_EXISTENCE_DATA].special_name?.length>0)?item[WEAPON_EXISTENCE_DATA].special_name:(item[WEAPON_WEAPON].name+" "+item[WEAPON_WEAPONTYPE].name):"" @@ -511,25 +545,7 @@ AUGMENT
    -{setClassSelectWindowOpen(false)}} shouldFocusAfterRender={true} shouldCloseOnOverlayClick={true} shouldCloseOnEsc={true} className="modal" overlayClassName="modalOverlay"> -
    -
    -

    Select Main Class

    -
    { setClassSkillTreeWindowOpen(false) }}>
    -
    -
    -
      -
    • Hunter
    • -
    • Fighter
    • -
    • Ranger
    • -
    • Gunner
    • -
    • Force
    • -
    • Techter
    • -
    • Braver
    • -
    -
    -
    -
    + diff --git a/src/skilltree/skillTree.js b/src/skilltree/skillTree.js index 959cadf..1d74f39 100644 --- a/src/skilltree/skillTree.js +++ b/src/skilltree/skillTree.js @@ -7,7 +7,7 @@ function SkillTree(p) { useEffect(() => { setWidth(p.gridSizeX*p.gridDimensionsX+p.gridPaddingX*(p.gridDimensionsX-1)) - setHeight(p.gridSizeY*Math.ceil(p.gridDimensionsY)+p.halflineheight*Math.floor(p.gridDimensionsY)+p.gridPaddingY*(p.gridDimensionsY-1)) + setHeight(p.gridSizeY*Math.ceil(p.gridDimensionsY/2)+p.halflineheight*Math.ceil((p.gridDimensionsY-1)/2)+p.gridPaddingY*(p.gridDimensionsY-1)) }, [p.halflineheight,p.skillLines,p.gridSizeX,p.gridSizeY,p.gridPaddingX,p.gridPaddingY,p.gridDimensionsX,p.gridDimensionsY]) useEffect(()=>{