Package mekhq.gui.dialog.nagDialogs
Class NoCommanderNagDialog
java.lang.Object
mekhq.gui.baseComponents.immersiveDialogs.ImmersiveDialogNag
mekhq.gui.dialog.nagDialogs.NoCommanderNagDialog
A dialog class used to notify players that a commander is missing in their campaign.
The NoCommanderNagDialog
extends ImmersiveDialogNag
and provides a specialized dialog
designed to alert players when no commander is assigned or present in the campaign. It uses predefined values,
including the HR
speaker and the NAG_NO_COMMANDER
constant, to configure dialog settings and
content.
-
Constructor Summary
ConstructorsConstructorDescriptionNoCommanderNagDialog
(Campaign campaign) Constructs a newNoCommanderNagDialog
instance to display the no commander nag dialog. -
Method Summary
Methods inherited from class mekhq.gui.baseComponents.immersiveDialogs.ImmersiveDialogNag
constructDialog, getInCharacterMessage, getOutOfCharacterMessage, getSpeaker, shouldCancelAdvanceDay
-
Constructor Details
-
NoCommanderNagDialog
Constructs a newNoCommanderNagDialog
instance to display the no commander nag dialog.This constructor initializes the dialog with preconfigured parameters, such as the
NAG_NO_COMMANDER
constant for managing dialog suppression, the"NoCommanderNagDialog"
message key for localization, and theHR
speaker to deliver the dialog message.- Parameters:
campaign
- TheCampaign
instance associated with this dialog. Provides access to campaign data and settings required for constructing the dialog.
-
-
Method Details
-
checkNag
Determines whether a nag dialog should be displayed for the absence of a commander.This method checks two conditions to decide if the nag dialog should appear:
- The user has not ignored the nag dialog for the absence of a commander in their options.
- No flagged commander is assigned to the campaign.
- Parameters:
flaggedCommander
- ThePerson
designated as the flagged commander, ornull
if no commander is assigned.- Returns:
true
if the nag dialog should be displayed due to the absence of a commander,false
otherwise.
-