diff --git a/package.json b/package.json
index 9ed70df..72da5dd 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "homepage": "https://sigonasr2.github.io/ngsplanner/#",
+ "homepage": "https://ngsplanner.com/#",
"name": "ngsplanner",
"version": "0.1.0",
"private": true,
diff --git a/src/TestPanel.js b/src/TestPanel.js
index f3095a7..3aa3e10 100644
--- a/src/TestPanel.js
+++ b/src/TestPanel.js
@@ -1,5 +1,7 @@
import React, { useEffect,useState,useRef } from 'react';
import Tooltip from 'react-simple-tooltip' //Mess with all tooltip props here: https://cedricdelpoux.github.io/react-simple-tooltip/
+import Modal from 'react-modal'
+import {XSquare} from 'react-bootstrap-icons'
/**
* Hook that alerts clicks outside of the passed ref
@@ -33,7 +35,7 @@ function EditBox(p) {
return () => {
clearTimeout(timer1);
};
- })
+ },[p.edit])
return {
if (e.key==="Enter") {p.setEdit(false)}
else if (e.key==="Escape") {p.setEdit(false)}
@@ -53,12 +55,26 @@ function EditBoxInput(p) {
return <>
{setEdit(true)}}>
{edit?
-
+
:<>{p.prefix}{p.data}>}
>
}
+function PageControlButton(p) {
+ return {p.setCurrentPage(p.page)}} className={(p.currentPage===p.page)?"selected":""}>{p.pageName?p.pageName:p.page}
+}
+
+function PageControl(p) {
+ var pages = []
+ for (var i=0;i)
+ }
+ return
+ {pages.map((page,i)=>{return {page}})}
+
+}
+
function ExpandTooltip(p) {
return {p.mouseOverText}
}
-function TestPanel(p) {
-const [bpGraphMax,setbpGraphMax] = useState(1000)
-const [hpGraphMax,sethpGraphMax] = useState(1000)
-const [ppGraphMax,setppGraphMax] = useState(1000)
-const [atkGraphMax,setatkGraphMax] = useState(1000)
-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 [level,setLevel] = useState(1)
-const [secondaryLevel,setsecondaryLevel] = useState(1)
-
function Class(p) {
const CLASSES = p.GetData("class")
const class_obj = CLASSES[p.name]
@@ -115,6 +117,33 @@ function EditableClass(p){
>
}
+function PopupWindow(p) {
+ return {p.setModalOpen(false)}} shouldFocusAfterRender={true} shouldCloseOnOverlayClick={true} shouldCloseOnEsc={true} className="modal" overlayClassName="modalOverlay">
+ {p.title}{p.showCloseButton&&{p.setModalOpen(false)}} className="modalCloseButton"/>}
+ {p.children}
+
+}
+
+function TestPanel(p) {
+const [bpGraphMax,setbpGraphMax] = useState(1000)
+const [hpGraphMax,sethpGraphMax] = useState(1000)
+const [ppGraphMax,setppGraphMax] = useState(1000)
+const [atkGraphMax,setatkGraphMax] = useState(1000)
+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 [level,setLevel] = useState(1)
+const [secondaryLevel,setsecondaryLevel] = useState(1)
+
+const [effectPage,setEffectPage] = useState(1)
+const [weaponPage,setWeaponPage] = useState(1)
+const [statPage,setStatPage] = useState(1)
+
+const [modalOpen,setModalOpen] = useState(true)
+
useEffect(()=>{
if (p.bp>1000) {
setbpGraphMax(3000)
@@ -134,6 +163,8 @@ useEffect(()=>{
//console.log(p.GetData("class",p.className,"icon"))
return ( //Futasuke is a genius
+
+ <>
@@ -221,14 +251,7 @@ useEffect(()=>{
Resurgir Rifle+40
-
+
Abilitiy Details
@@ -311,11 +334,7 @@ useEffect(()=>{
Damage Stats
-
+
Critical Hit Rate |
@@ -341,6 +360,10 @@ useEffect(()=>{
+
+Modal content goes here.
+
+>
)
}
diff --git a/src/style.css b/src/style.css
index 8548429..e0e30d1 100644
--- a/src/style.css
+++ b/src/style.css
@@ -941,7 +941,23 @@ button{
.table-padding{
padding: 4px;
}
-
+.modal {
+ position: absolute;
+ top: 40px;
+ left: 40px;
+ right: 40px;
+ bottom: 40px;
+ background-color: papayawhip;
+ outline: 0;
+ }
+.modalOverlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0,0,0,.33);
+}
.webicon{
color:maroon;
}