Class FPanelMenu

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class FPanelMenu extends FPanel
menu JPanel use to launch game.
It contain all sub menu Panel as FPanelNouvellePartie or FPanelChoixPartie.
Author:
Hydrolien
See Also:
  • Field Details

  • Constructor Details

    • FPanelMenu

      public FPanelMenu()
      Empty main constructor.
  • Method Details

    • getMenu

      public byte getMenu()
    • getPnp

      public FPanelNouvellePartie getPnp()
    • getPcp

      public FPanelChoixPartie getPcp()
    • getReturnButton

      public FButton getReturnButton()
    • setMenu

      private void setMenu(byte x)
      Update action of the menu buttons.
    • setMenu

      public void setMenu(int x)
      Update action of the menu buttons.
    • actualiserText

      public void actualiserText()
      Update text value of the menu buttons.
    • buildFPanelMenu

      public void buildFPanelMenu(int nbrOfButtons, int menu)
      Create the Panel with buttons.
      If it have already been build it will only update text.
      If buttons have been remove it will add them back.
      Parameters:
      nbrOfButtons - the number of buttons.
    • buildContainerMovingPanel

      private void buildContainerMovingPanel()
      Create the containerMovingPanel.
    • addPnp

      public void addPnp()
      Add FPanelNouvellePartie.
      It remove all button or other panel if needed.
    • addPcp

      public void addPcp()
      Add FPanelChoixPartie.
      It remove all button or other panel if needed.
    • removePnp

      public void removePnp()
      Remove FPanelNouvellePartie & set it to null.
    • removePcp

      public void removePcp()
      Remove FPanelChoixPartie & set it to null.
    • removeP

      public void removeP()
      Remove FPanelNouvellePartie & FPanelChoixPartie.
    • askLanguage

      public void askLanguage()
      Tool to ask language to the user.
    • validatelanguageChoice

      public void validatelanguageChoice()
      Tool to validate language to the user.
      It save language in curent Options, save curent Options and reload language with new language (if language have been changed only).
    • retirerBouton

      private void retirerBouton()
      Remove all button.
    • setReturnButtonAction

      private void setReturnButtonAction(int ac)
      Update returnButton with a new action.
      It may change text of the button.
    • createReturnButton

      private void createReturnButton()
      Create the returnButton.
    • createButton

      private void createButton(int nbrOfButtons)
      Create the main buttons of the panel.
      Parameters:
      nbrOfButtons - the number of buttons.
    • addFPanelLinks

      private void addFPanelLinks()
      Add a links panel to web site, Discord, Github & Tipeee.