Package VASSAL.build.module
Class GameRefresher
java.lang.Object
VASSAL.build.module.GameRefresher
- All Implemented Interfaces:
GameComponent
public final class GameRefresher extends Object implements GameComponent
GameRefresher Replace all counters in the same game with the current version
of the counters defined in the module
Note: Counters that are Hidden or Obscured to us cannot be updated.
-
Field Summary
Fields Modifier and Type Field Description protected VASSAL.build.module.GameRefresher.RefreshDialog
dialog
protected GpIdChecker
gpIdChecker
protected GpIdSupport
gpIdSupport
protected int
notFoundCount
protected int
notOwnedCount
protected boolean
testMode
protected int
updatedCount
-
Constructor Summary
Constructors Constructor Description GameRefresher(GpIdSupport gpIdSupport)
-
Method Summary
Modifier and Type Method Description void
addTo(AbstractConfigurable parent)
void
execute(boolean testMode, boolean useName)
Action
getRefreshAction()
Command
getRestoreCommand()
When saving a game, each GameComponent should return aCommand
that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullboolean
isTestMode()
void
setup(boolean gameStarting)
Enable Refresh menu item when game is running only.void
start()
-
Field Details
-
gpIdSupport
-
gpIdChecker
-
updatedCount
protected int updatedCount -
notFoundCount
protected int notFoundCount -
notOwnedCount
protected int notOwnedCount -
dialog
protected VASSAL.build.module.GameRefresher.RefreshDialog dialog -
testMode
protected boolean testMode
-
-
Constructor Details
-
GameRefresher
-
-
Method Details
-
addTo
-
getRefreshAction
-
isTestMode
public boolean isTestMode() -
start
public void start() -
execute
public void execute(boolean testMode, boolean useName) -
getRestoreCommand
Description copied from interface:GameComponent
When saving a game, each GameComponent should return aCommand
that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null- Specified by:
getRestoreCommand
in interfaceGameComponent
-
setup
public void setup(boolean gameStarting)Enable Refresh menu item when game is running only.- Specified by:
setup
in interfaceGameComponent
- Parameters:
gameStarting
- if true, a game is starting. If false, then a game is ending
-