use of com.playshogi.website.gwt.client.util.ElementWidget in project playshogi by Tellmarch.
the class MainPageViewBeta method getPracticePanel.
private Widget getPracticePanel() {
DecoratorPanel decoratorPanel = new DecoratorPanel();
FlowPanel panel = new FlowPanel();
panel.add(new HTML("<b>Practice</b>"));
panel.add(new HTML("Practice your playing skills against a computer."));
panel.add(new HTML("<br>"));
Grid grid = new Grid(1, 2);
grid.setWidget(0, 0, new Image(resources.practiceBackground()));
ElementWidget button = new ElementWidget(Button.createPrimary("Play").addClickListener(evt -> placeController.goTo(new PlayPlace())).element());
button.getElement().getStyle().setMarginLeft(1, Style.Unit.EM);
grid.setWidget(0, 1, button);
panel.add(grid);
decoratorPanel.setWidget(panel);
panel.setWidth("450px");
panel.setHeight("200px");
return decoratorPanel;
}
use of com.playshogi.website.gwt.client.util.ElementWidget in project playshogi by Tellmarch.
the class TsumeView method createLowerLeftPanel.
private FlowPanel createLowerLeftPanel() {
FlowPanel panel = new FlowPanel();
panel.add(BoardButtons.createSettingsWidget(shogiBoard));
panel.add(BoardButtons.createClearArrowsWidget(shogiBoard));
panel.add(new ElementWidget(org.dominokit.domino.ui.button.Button.createPrimary(Icons.ALL.help_outline()).setBackground(Theme.DEEP_PURPLE.color()).circle().addClickListener(e -> getHelpDialog().open()).setTooltip("What is TsumeShogi?").style().setMarginLeft("1em").element()));
return panel;
}
use of com.playshogi.website.gwt.client.util.ElementWidget in project playshogi by Tellmarch.
the class MainPageViewBeta method getLearnPanel.
private Widget getLearnPanel() {
DecoratorPanel decoratorPanel = new DecoratorPanel();
FlowPanel panel = new FlowPanel();
panel.add(new HTML("<b>Learn</b>"));
panel.add(new HTML("Learn how to play Shogi with an interactive tutorial!"));
panel.add(new HTML("<br>"));
Grid grid = new Grid(1, 2);
grid.setWidget(0, 0, new Image(resources.learnBackground()));
ElementWidget button = new ElementWidget(Button.createPrimary("Tutorial").addClickListener(evt -> placeController.goTo(new TutorialPlace())).element());
button.getElement().getStyle().setMarginLeft(1, Style.Unit.EM);
grid.setWidget(0, 1, button);
panel.add(grid);
decoratorPanel.setWidget(panel);
panel.setWidth("450px");
panel.setHeight("200px");
return decoratorPanel;
}
use of com.playshogi.website.gwt.client.util.ElementWidget in project playshogi by Tellmarch.
the class MainPageViewBeta method getCollectionsPanel.
private Widget getCollectionsPanel() {
DecoratorPanel decoratorPanel = new DecoratorPanel();
FlowPanel panel = new FlowPanel();
panel.add(new HTML("<b>Collections</b>"));
panel.add(new HTML("Browse or Create collections of Shogi games."));
panel.add(new HTML("<br>"));
Grid grid = new Grid(1, 2);
grid.setWidget(0, 0, new Image(resources.collectionsBackground()));
ElementWidget button = new ElementWidget(Button.createPrimary("Collections").addClickListener(evt -> placeController.goTo(new PublicCollectionsPlace())).element());
button.getElement().getStyle().setMarginLeft(1, Style.Unit.EM);
grid.setWidget(0, 1, button);
panel.add(grid);
decoratorPanel.setWidget(panel);
panel.setWidth("450px");
panel.setHeight("200px");
return decoratorPanel;
}
use of com.playshogi.website.gwt.client.util.ElementWidget in project playshogi by Tellmarch.
the class MainPageViewBeta method getPuzzlesPanel.
private Widget getPuzzlesPanel() {
DecoratorPanel decoratorPanel = new DecoratorPanel();
FlowPanel panel = new FlowPanel();
panel.add(new HTML("<b>Puzzles</b>"));
panel.add(new HTML("Improve your shogi skills by solving puzzles."));
panel.add(new HTML("<br>"));
panel.add(new Image(resources.puzzleBlue()));
panel.add(new ElementWidget(Button.createPrimary("TsumeShogi Problems").addClickListener(evt -> placeController.goTo(new TsumePlace())).element()));
panel.add(new Image(resources.alarmClockRed()));
panel.add(new ElementWidget(Button.createPrimary("ByoYomi Survival").addClickListener(evt -> placeController.goTo(new ByoYomiLandingPlace())).element()));
decoratorPanel.setWidget(panel);
panel.setWidth("450px");
panel.setHeight("200px");
return decoratorPanel;
}
Aggregations