From 2d76fb3b9592e402074a2270ad5a3d60598ac670 Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Tue, 17 Aug 2021 21:52:53 +0900 Subject: [PATCH] Sub and main class are now selectable in the popup --- src/TestPanel.js | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/TestPanel.js b/src/TestPanel.js index 65fdcaa..306a601 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)&&
    @@ -126,7 +133,22 @@ function SelectorWindow(p) { } function ClassSelectorWindow(p) { - return { + 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) @@ -514,7 +536,7 @@ AUGMENT
    - +