@ -104,11 +104,22 @@ function ClassSelector(p){
< / >
< / >
}
}
function ClassSelectorWindow ( p ) {
return < SelectorWindow title = { ( p . editClass ) ? "Select Sub Class" : "Select Main Class" } modalOpen = { p . modalOpen } setModalOpen = { p . setModalOpen } GetData = { p . GetData }
dataFunction = { ( ) => {
var dat1 = p . GetData ( "class" )
return Object . keys ( dat1 )
}
}
displayFunction = { ( key ) => {
return < li className = "classSelect" onClick = { ( ) => { if ( p . editClass === 0 ) { p . setClassName ( key ) } else { p . setSubClassName ( key ) } ; p . setModalOpen ( false ) } } > < img alt = "" src = { DisplayIcon ( p . GetData ( "class" , key , "icon" ) ) } / > { p . GetData ( "class" , key , "name" ) } < / l i >
} }
/ >
}
function EditableClass ( p ) {
function EditableClass ( p ) {
const [ edit , setEdit ] = useState ( false )
return < > < div className = "editClass" onClick = { ( ) => { p . setClassNameSetter ( p . editClass ) ; p . setClassSelectWindowOpen ( true ) } } > < Class GetData = { p . GetData } name = { p . name } / >
return < > < div className = "editClass" onClick = { ( ) => { setEdit ( ! edit ) } } > < Class GetData = { p . GetData } name = { p . class } / >
< / d i v >
< / d i v >
{ edit && < ClassSelector GetData = { p . GetData } setClassName = { p . setClassName } setEdit = { setEdit } / > }
< / >
< / >
}
}
@ -155,14 +166,13 @@ function SelectorWindow(p) {
{ p . filter ? < input className = "itemBarForm" type = "text" placeholder = "Filter" value = { filter } onChange = { ( f ) => { setFilter ( f . currentTarget . value ) } } / > : < > < / > }
{ p . filter ? < input className = "itemBarForm" type = "text" placeholder = "Filter" value = { filter } onChange = { ( f ) => { setFilter ( f . currentTarget . value ) } } / > : < > < / > }
< / d i v >
< / d i v >
< / d i v >
< / d i v >
} < div className = "tooltipAnchor" >
}
< div className = "modalItemListContainer customScrollbar" >
< div className = "modalItemListContainer customScrollbar" >
< ul className = "itemlist" >
< ul className = "itemlist" >
{ 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 . 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 }
{ p . children }
< / u l >
< / u l >
< / d i v >
< / d i v >
< / d i v >
< / P o p u p W i n d o w >
< / P o p u p W i n d o w >
}
}
@ -179,8 +189,8 @@ const [defGraphMax,setdefGraphMax] = useState(1000)
const [ author , setauthor ] = useState ( "Player" )
const [ author , setauthor ] = useState ( "Player" )
const [ buildName , setbuildName ] = useState ( "Character" )
const [ buildName , setbuildName ] = useState ( "Character" )
const [ className , setc lassName ] = useState ( "Hunter" )
const [ className , setC lassName ] = useState ( "Hunter" )
const [ subclassName , setsubc lassName ] = useState ( "Force" )
const [ subclassName , setSubC lassName ] = useState ( "Force" )
const [ level , setLevel ] = useState ( 20 )
const [ level , setLevel ] = useState ( 20 )
const [ secondaryLevel , setsecondaryLevel ] = useState ( 20 )
const [ secondaryLevel , setsecondaryLevel ] = useState ( 20 )
@ -212,6 +222,8 @@ const [skillTreeGridPaddingX,setSkillTreeGridPaddingX] = useState(10)
const [ skillTreeGridPaddingY , setSkillTreeGridPaddingY ] = useState ( 48 )
const [ skillTreeGridPaddingY , setSkillTreeGridPaddingY ] = useState ( 48 )
const [ halflineheight , setHalfLineHeight ] = useState ( 60 )
const [ halflineheight , setHalfLineHeight ] = useState ( 60 )
const [ classNameSetter , setClassNameSetter ] = useState ( 0 )
function rarityCheck ( v ) {
function rarityCheck ( v ) {
return v !== undefined ? v . rarity !== undefined ? " r" + v . rarity : "" : ""
return v !== undefined ? v . rarity !== undefined ? " r" + v . rarity : "" : ""
@ -276,9 +288,9 @@ useEffect(()=>{
< td colSpan = "2" > < EditBoxInput setData = { setbuildName } data = { buildName } / > < / t d >
< td colSpan = "2" > < EditBoxInput setData = { setbuildName } data = { buildName } / > < / t d >
< / t r >
< / t r >
< tr >
< tr >
< td onClick = { ( ) => { setClassSelectWindowOpen ( true ) } } > Class < / t d >
< td > Class < / t d >
< td >
< td >
< EditableClass GetData = { p . GetData } setClassName = { setclassName } class = { className } > < / E d i t a b l e C l a s s >
< EditableClass editClass = { 0 } setClassNameSetter = { setClassNameSetter } GetData = { p . GetData } setClassName = { setClassName } name = { className } setClassSelectWindowOpen = { setClassSelectWindowOpen } > < / E d i t a b l e C l a s s >
< / t d >
< / t d >
< td >
< td >
< span className = "ye" > < EditBoxInput prefix = "Lv." setData = { setLevel } data = { level } type = "number" / > < / s p a n >
< span className = "ye" > < EditBoxInput prefix = "Lv." setData = { setLevel } data = { level } type = "number" / > < / s p a n >
@ -287,7 +299,7 @@ useEffect(()=>{
< tr >
< tr >
< td onClick = { ( ) => { setClassSkillTreeWindowOpen ( true ) } } > Sub - Class < / t d >
< td onClick = { ( ) => { setClassSkillTreeWindowOpen ( true ) } } > Sub - Class < / t d >
< td >
< td >
< EditableClass GetData = { p . GetData } setClassName = { setsubclassName } class = { subclassName } > < / E d i t a b l e C l a s s >
< EditableClass editClass = { 1 } setClassNameSetter = { setClassNameSetter } GetData = { p . GetData } setClassName = { setSubClassName } name = { subclassName } setClassSelectWindowOpen = { setClassSelectWindowOpen } > < / E d i t a b l e C l a s s >
< / t d >
< / t d >
< td >
< td >
< EditBoxInput prefix = "Lv." setData = { setsecondaryLevel } data = { secondaryLevel } type = "number" / >
< EditBoxInput prefix = "Lv." setData = { setsecondaryLevel } data = { secondaryLevel } type = "number" / >
@ -538,16 +550,7 @@ AUGMENT
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< SelectorWindow title = "Class Select" modalOpen = { classSelectWindowOpen } setModalOpen = { setClassSelectWindowOpen } GetData = { p . GetData }
< ClassSelectorWindow setClassName = { setClassName } editClass = { classNameSetter } setSubClassName = { setSubClassName } modalOpen = { classSelectWindowOpen } setModalOpen = { setClassSelectWindowOpen } GetData = { p . GetData } / >
dataFunction = { ( ) => {
var mythraSux = p . GetData ( "class" )
return Object . keys ( mythraSux )
}
}
displayFunction = { ( key ) => {
return < li className = "classSelect" onClick = { ( ) => { setclassName ( key ) ; setClassSelectWindowOpen ( false ) } } > < img alt = "" src = { DisplayIcon ( p . GetData ( "class" , key , "icon" ) ) } / > { p . GetData ( "class" , key , "name" ) } < / l i >
} }
/ >
< Modal isOpen = { classSkillTreeWindowOpen } onRequestClose = { ( ) => { setClassSkillTreeWindowOpen ( false ) } } shouldFocusAfterRender = { true } shouldCloseOnOverlayClick = { true } shouldCloseOnEsc = { true } className = "modalSkillTree" overlayClassName = "modalOverlaySkillTree" >
< Modal isOpen = { classSkillTreeWindowOpen } onRequestClose = { ( ) => { setClassSkillTreeWindowOpen ( false ) } } shouldFocusAfterRender = { true } shouldCloseOnOverlayClick = { true } shouldCloseOnEsc = { true } className = "modalSkillTree" overlayClassName = "modalOverlaySkillTree" >