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 SummaryConstructorsConstructorDescriptionNoCommanderNagDialog(Campaign campaign) Constructs a newNoCommanderNagDialoginstance to display the no commander nag dialog.
- 
Method SummaryMethods inherited from class mekhq.gui.baseComponents.immersiveDialogs.ImmersiveDialogNagconstructDialog, getInCharacterMessage, getOutOfCharacterMessage, getSpeaker, shouldCancelAdvanceDay
- 
Constructor Details- 
NoCommanderNagDialogConstructs a newNoCommanderNagDialoginstance to display the no commander nag dialog.This constructor initializes the dialog with preconfigured parameters, such as the NAG_NO_COMMANDERconstant for managing dialog suppression, the"NoCommanderNagDialog"message key for localization, and theHRspeaker to deliver the dialog message.- Parameters:
- campaign- The- Campaigninstance associated with this dialog. Provides access to campaign data and settings required for constructing the dialog.
 
 
- 
- 
Method Details- 
checkNagDetermines 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- The- Persondesignated as the flagged commander, or- nullif no commander is assigned.
- Returns:
- trueif the nag dialog should be displayed due to the absence of a commander,- falseotherwise.
 
 
-