JCvAlertManager Mod v0.1
By: Jeckel
Patch Compatibility: All
This module has a single class that allows the quick sending of messages
and popups to players.
To use this module you import it and then instance the class CvAlertManager.
The constructor takes no arguments.
import CvAlertManager
config = CvAlertManager.CvAlertManager()
You can then call instance methods like normal.
Message Methods:
logCombat(iPlayer, sText)
"Return None"
Adds the message 'sText' to iPlayer's Combat Log.
alert(iPlayer, sText, iColor = 7)
"Return None"
Adds the message 'sText' to iPlayer's screen.
debug(iPlayer, sText, xValue, iColor = 7)
"Return None"
Adds the message 'sText = xValue' to iPlayer's screen.
xValue can be anything and it will be turned into a string
before output.
icon(iPlayer, pObject, sText, szIcon = None, iColor = 7)
"Return None"
Adds the message 'sText' to iPlayer's screen.
szIcon should be the Art path to a valid button starting from the
Art directory and including the file extension.
For example:
"Art/Interface/Buttons/Units/Warrior.dds"
Popup Methods:
popup(self, iPlayer, sText)
"Return None"
Shows a popup with sText and a close button to iPlayer.
popup(self, iPlayer, sText, sButtonText)
"Return None"
Shows a popup to iPlayer with sText and a button with sButtonText.
popup(self, iPlayer, sText, sButtonText = "Close",
sHandler = None, iData1 = -1, iData2 = -1, iData3 = -1, iFlags = -1,
bOption1 = False, bOption2 = False):
"Return None"
This method opens most of the basic power of popups allowing you to set
the button handler, iDatas, iFlags, and the bOptions.
popupList(self, lPlayers, sText, sButtonText = "Close",
sHandler = None, iData1 = -1, iData2 = -1, iData3 = -1, iFlags = -1,
bOption1 = False, bOption2 = False):
"Return None"
Shows a popup to a list of players.
lPlayers is a list of PlayerID numbers.
popupAll(self, sText, sButtonText = "Close",
sHandler = None, iData1 = -1, iData2 = -1, iData3 = -1, iFlags = -1,
bOption1 = False, bOption2 = False):
"Return None"
Shows a popup to all human players.
By: Jeckel
Patch Compatibility: All
This module has a single class that allows the quick sending of messages
and popups to players.
To use this module you import it and then instance the class CvAlertManager.
The constructor takes no arguments.
import CvAlertManager
config = CvAlertManager.CvAlertManager()
You can then call instance methods like normal.
Message Methods:
logCombat(iPlayer, sText)
"Return None"
Adds the message 'sText' to iPlayer's Combat Log.
alert(iPlayer, sText, iColor = 7)
"Return None"
Adds the message 'sText' to iPlayer's screen.
debug(iPlayer, sText, xValue, iColor = 7)
"Return None"
Adds the message 'sText = xValue' to iPlayer's screen.
xValue can be anything and it will be turned into a string
before output.
icon(iPlayer, pObject, sText, szIcon = None, iColor = 7)
"Return None"
Adds the message 'sText' to iPlayer's screen.
szIcon should be the Art path to a valid button starting from the
Art directory and including the file extension.
For example:
"Art/Interface/Buttons/Units/Warrior.dds"
Popup Methods:
popup(self, iPlayer, sText)
"Return None"
Shows a popup with sText and a close button to iPlayer.
popup(self, iPlayer, sText, sButtonText)
"Return None"
Shows a popup to iPlayer with sText and a button with sButtonText.
popup(self, iPlayer, sText, sButtonText = "Close",
sHandler = None, iData1 = -1, iData2 = -1, iData3 = -1, iFlags = -1,
bOption1 = False, bOption2 = False):
"Return None"
This method opens most of the basic power of popups allowing you to set
the button handler, iDatas, iFlags, and the bOptions.
popupList(self, lPlayers, sText, sButtonText = "Close",
sHandler = None, iData1 = -1, iData2 = -1, iData3 = -1, iFlags = -1,
bOption1 = False, bOption2 = False):
"Return None"
Shows a popup to a list of players.
lPlayers is a list of PlayerID numbers.
popupAll(self, sText, sButtonText = "Close",
sHandler = None, iData1 = -1, iData2 = -1, iData3 = -1, iFlags = -1,
bOption1 = False, bOption2 = False):
"Return None"
Shows a popup to all human players.