From 48ee1a065debde5027fc17e49144d348258dc5e4 Mon Sep 17 00:00:00 2001 From: notoraptor Date: Thu, 25 Jul 2019 10:59:36 -0400 Subject: [Web] Added game creation interface - Replaced fancybox with react-confirm-alert + dialog box - Removed unused code - Default map can be selected with 1-click - Added ability to select map variants --- .../gui/wizards/gameCreation/panelChoosePlayers.js | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 diplomacy/web/src/gui/wizards/gameCreation/panelChoosePlayers.js (limited to 'diplomacy/web/src/gui/wizards/gameCreation/panelChoosePlayers.js') diff --git a/diplomacy/web/src/gui/wizards/gameCreation/panelChoosePlayers.js b/diplomacy/web/src/gui/wizards/gameCreation/panelChoosePlayers.js new file mode 100644 index 0000000..84a47a0 --- /dev/null +++ b/diplomacy/web/src/gui/wizards/gameCreation/panelChoosePlayers.js @@ -0,0 +1,61 @@ +import React from "react"; +import {FancyBox} from "../../components/fancyBox"; +import PropTypes from "prop-types"; +import Octicon, {ArrowLeft} from "@primer/octicons-react"; + +export class PanelChoosePlayers extends React.Component { + render() { + return ( + +
+
+ +
+
+ +
+
+
+ {(() => { + const choice = []; + for (let i = 0; i < this.props.nbPowers; ++i) { + choice.push( + + ); + } + return choice; + })()} +
+
+ +
+
+ ); + } +} + +PanelChoosePlayers.propTypes = { + backward: PropTypes.func.isRequired, + forward: PropTypes.func.isRequired, + cancel: PropTypes.func.isRequired, + onUpdateParams: PropTypes.func.isRequired, + nbPowers: PropTypes.number.isRequired +}; -- cgit v1.2.3