Ok, I've got a working CustomNotification module... Completely unlocked from any other script, and fully customizable. Updated: Now with generated type values.
Functions to note:
LuaEvents.SetCustomNotificationDetails(table, name, LeftClickCallback, RightClickCallback)
This needs to be called before any notifications are added to ensure that the mod knows how to handle your specific notifications.
table - updated - This table will return a type for your mod. You need to precreate the table with something like "local table = {type=0}", the important part being the inclusion of the "type" label. Upon return from the function, "type" will be updated with a unique reference number for your mod, which you will use for the following functions when they request "type".
name - This corresponds to the button type names within the g_NameTable[] variable. The most commonly used button is "Generic", but others exist - see the table for the various names available.
LeftClickCallback - This will be a callback to how you want a Left Click on your notification to be handled. This should be setup as a LuaEvent to ensure that it's callable from the Notification.lua mod. The name you use in your mod will need to be unique, as LuaEvents are available to all Lua scripts.
RightClickCallback - Ditto for the above, but for right clicks.
LuaEvents.RemoveCustomNotification(Id, type)
This will remove a specific notification from the list on the right side of the screen. Generally this will be called by your RightClickCallback function.
Id - Each notification needs a unique Id to identify it
type - The type that was obtained from the function above
LuaEvents.AddCustomNotification(Id, type, toolTip, strSummary)
This will add a new notification.
Id - As above, this must be a unique identifier for this specific notification. Generally it's easiest to have an incrementing global variable in your mod to identify each notification
type - As above, the type that was obtained from the first function
toolTip - This is the text that is displayed when the mouse hovers over the notification
strSummary - This is the text that is displayed when the notification first appears on the screen to identify it
Bh
Functions to note:
LuaEvents.SetCustomNotificationDetails(table, name, LeftClickCallback, RightClickCallback)
This needs to be called before any notifications are added to ensure that the mod knows how to handle your specific notifications.
table - updated - This table will return a type for your mod. You need to precreate the table with something like "local table = {type=0}", the important part being the inclusion of the "type" label. Upon return from the function, "type" will be updated with a unique reference number for your mod, which you will use for the following functions when they request "type".
name - This corresponds to the button type names within the g_NameTable[] variable. The most commonly used button is "Generic", but others exist - see the table for the various names available.
LeftClickCallback - This will be a callback to how you want a Left Click on your notification to be handled. This should be setup as a LuaEvent to ensure that it's callable from the Notification.lua mod. The name you use in your mod will need to be unique, as LuaEvents are available to all Lua scripts.
RightClickCallback - Ditto for the above, but for right clicks.
LuaEvents.RemoveCustomNotification(Id, type)
This will remove a specific notification from the list on the right side of the screen. Generally this will be called by your RightClickCallback function.
Id - Each notification needs a unique Id to identify it
type - The type that was obtained from the function above
LuaEvents.AddCustomNotification(Id, type, toolTip, strSummary)
This will add a new notification.
Id - As above, this must be a unique identifier for this specific notification. Generally it's easiest to have an incrementing global variable in your mod to identify each notification
type - As above, the type that was obtained from the first function
toolTip - This is the text that is displayed when the mouse hovers over the notification
strSummary - This is the text that is displayed when the notification first appears on the screen to identify it
Bh