Package model.overlays
Class MenuUserCreationOverlayModel
java.lang.Object
model.overlays.MenuOverlayModel
model.overlays.MenuUserCreationOverlayModel
Represents the menu overlay model used for user creation overlay.
-
Field Summary
Fields inherited from class model.overlays.MenuOverlayModel
menuModel -
Constructor Summary
ConstructorsConstructorDescriptionMenuUserCreationOverlayModel(MenuModel menuModel) Constructs a MenuUserCreationOverlayModel with the specified MenuModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidDecreases the new user picture index by one.booleanChecks if the username already exists.Returns the new username.intReturns the new user picture index.voidIncreases the new user picture index by one.booleanChecks if the enter key is deactivated.voidsetNewUserName(String name) Sets the new username.voidsetNewUserPictureIndex(int index) Sets the new user picture index.voidupdate()Updates the state of the menu overlay.
-
Constructor Details
-
MenuUserCreationOverlayModel
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:
updatein classMenuOverlayModel
-
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
Returns the new username.- Returns:
- the new username
-
setNewUserName
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
-