Class MenuUserCreationOverlayModel

java.lang.Object
model.overlays.MenuOverlayModel
model.overlays.MenuUserCreationOverlayModel

public class MenuUserCreationOverlayModel extends MenuOverlayModel
Represents the menu overlay model used for user creation overlay.
  • Constructor Details

    • MenuUserCreationOverlayModel

      public MenuUserCreationOverlayModel(MenuModel menuModel)
      Constructs a MenuUserCreationOverlayModel with the specified MenuModel.
      Parameters:
      menuModel - the MenuModel associated with this overlay
  • Method Details

    • update

      public void update()
      Updates the state of the menu overlay.

      Checks if the username already exists and updates the name entering status.

      Specified by:
      update in class MenuOverlayModel
    • setNewUserPictureIndex

      public void setNewUserPictureIndex(int index)
      Sets the new user picture index.
      Parameters:
      index - the index of the new user picture
    • increaseNewUserPictureIndex

      public void increaseNewUserPictureIndex()
      Increases the new user picture index by one.
    • decreaseNewUserPictureIndex

      public void decreaseNewUserPictureIndex()
      Decreases the new user picture index by one.
    • getNewUserName

      public String getNewUserName()
      Returns the new username.
      Returns:
      the new username
    • setNewUserName

      public void setNewUserName(String name)
      Sets the new username.
      Parameters:
      name - the new username
    • isEnterNameDeactivated

      public boolean isEnterNameDeactivated()
      Checks if the enter key is deactivated.
      Returns:
      true if the enter name is deactivated, false otherwise
    • getNewUserPictureIndex

      public int getNewUserPictureIndex()
      Returns the new user picture index.
      Returns:
      the new user picture index
    • doesUserNameAlreadyExists

      public boolean doesUserNameAlreadyExists()
      Checks if the username already exists.
      Returns:
      true if the username already exists, false otherwise