private void populateTournamentActive() { lblTitle.setText( "Quest Mode: Draft Tournament - " + FModel.getQuest().getAchievements().getCurrentDraft().getTitle()); VHomeUI.SINGLETON_INSTANCE .getPnlDisplay() .setLayout(new MigLayout("insets 0, gap 0, ax center, wrap 1")); VHomeUI.SINGLETON_INSTANCE .getPnlDisplay() .add(lblTitle, "w 80%!, h 40px!, gap 20% 0 15px 10px, ax right, span 2"); FScrollPanel panel = new FScrollPanel( new MigLayout("insets 0, gap 0, wrap 4, ax center"), true, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); String constraintsLeft = "w 350px!, h 196px!, gap 0px 0px 0px 0px, ay center"; String constraintsMiddle = "w 350px!, h 392px!, gap 0px 0px 0px 0px, ay center"; String constraintsRight = "w 350px!, h 784px!, gap 0px 0px 0px 0px, ay center"; panel.add(matchups[0], constraintsLeft); panel.add(matchups[4], constraintsMiddle + ", span 1 2"); panel.add(matchups[6], constraintsRight + ", span 1 4"); panel.add(matchups[7], constraintsRight + ", span 1 4"); panel.add(matchups[1], constraintsLeft); panel.add(matchups[2], constraintsLeft); panel.add(matchups[5], constraintsMiddle + ", span 1 2"); panel.add(matchups[3], constraintsLeft); VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(panel, "gap 0 0 0 0, ax center"); btnEditDeck.setFontSize(12); JPanel bottomButtons = new JPanel(new MigLayout("insets 0, gap 0, wrap 2, ax center")); if (FModel.getQuest().getAchievements().getCurrentDraft().playerHasMatchesLeft()) { VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(btnStartMatch, "gap 0 0 0 20px, ax center"); bottomButtons.add(btnEditDeck, "w 135px!, h 25px!, gap 0 25px 10px 10px, ax right"); bottomButtons.add(btnLeaveTournament, "w 135px!, h 25px!, gap 25px 0 10px 10px, ax right"); btnLeaveTournament.setFontSize(12); } else { VHomeUI.SINGLETON_INSTANCE .getPnlDisplay() .add(btnLeaveTournament, "w 250px!, h 60px!, gap 0 0 20px 20px, ax center"); bottomButtons.add(btnEditDeck, "w 135px!, h 25px!, gap 0 25px 10px 10px, ax right"); bottomButtons.add(btnStartMatchSmall, "w 135px!, h 25px!, gap 25px 0 10px 10px, ax right"); btnLeaveTournament.setFontSize(24); } VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(bottomButtons, "w 100%!"); bottomButtons.setOpaque(false); }
VSubmenuQuestDraft() { SkinImage avatar = FSkin.getAvatars().get(GuiBase.getInterface().getAvatarCount() - 1); matchups[0] = new PnlMatchup( PnlMatchup.LineDirection.DOWN, PnlMatchup.LineSide.RIGHT, PnlMatchup.BoxSize.SMALL); matchups[0].setPlayerOne("Undetermined", avatar); matchups[0].setPlayerTwo("Undetermined", avatar); matchups[1] = new PnlMatchup( PnlMatchup.LineDirection.UP, PnlMatchup.LineSide.RIGHT, PnlMatchup.BoxSize.SMALL); matchups[1].setPlayerOne("Undetermined", avatar); matchups[1].setPlayerTwo("Undetermined", avatar); matchups[2] = new PnlMatchup( PnlMatchup.LineDirection.DOWN, PnlMatchup.LineSide.RIGHT, PnlMatchup.BoxSize.SMALL); matchups[2].setPlayerOne("Undetermined", avatar); matchups[2].setPlayerTwo("Undetermined", avatar); matchups[3] = new PnlMatchup( PnlMatchup.LineDirection.UP, PnlMatchup.LineSide.RIGHT, PnlMatchup.BoxSize.SMALL); matchups[3].setPlayerOne("Undetermined", avatar); matchups[3].setPlayerTwo("Undetermined", avatar); matchups[4] = new PnlMatchup( PnlMatchup.LineDirection.DOWN, PnlMatchup.LineSide.BOTH, PnlMatchup.BoxSize.MEDIUM); matchups[4].setPlayerOne("Undetermined", avatar); matchups[4].setPlayerTwo("Undetermined", avatar); matchups[5] = new PnlMatchup( PnlMatchup.LineDirection.UP, PnlMatchup.LineSide.BOTH, PnlMatchup.BoxSize.MEDIUM); matchups[5].setPlayerOne("Undetermined", avatar); matchups[5].setPlayerTwo("Undetermined", avatar); matchups[6] = new PnlMatchup( PnlMatchup.LineDirection.STRAIGHT, PnlMatchup.LineSide.BOTH, PnlMatchup.BoxSize.LARGE); matchups[6].setPlayerOne("Undetermined", avatar); matchups[6].setPlayerTwo("Undetermined", avatar); matchups[7] = new PnlMatchup( PnlMatchup.LineDirection.STRAIGHT, PnlMatchup.LineSide.LEFT, PnlMatchup.BoxSize.LARGE_SINGLE, true); matchups[7].setPlayerOne("Undetermined", avatar); matchups[7].setPlayerTwo("Undetermined", avatar); pnlDeckImage = new ProportionalPanel(FSkin.getImage(FSkinProp.IMG_QUEST_DRAFT_DECK), 680, 475); final String constraints = "h 30px!, gap 0 0 0 10px"; pnlStats.setLayout(new MigLayout("insets 0, gap 0, wrap, hidemode 0")); pnlStats.add(lblPastResults, "h 30px!, gap 0 0 0 25px"); pnlStats.add(lblFirst, constraints); pnlStats.add(lblSecond, constraints); pnlStats.add(lblThird, constraints); pnlStats.add(lblFourth, constraints); pnlStats.add(lblTokens, "h 30px!, gap 0 0 50px 10px, ax center"); pnlStats.add(btnSpendToken, "w 150px!, h 40px!, ax center"); pnlStats.setOpaque(false); btnSpendToken.setToolTipText("Creates a new tournament that can be played immediately."); }