Changes

→‎Banner message: Example code for signature #4
Line 218: Line 218:  
Note: For those of you who want a custom HUDMessage:  
 
Note: For those of you who want a custom HUDMessage:  
 
- Almost all of these variables are public, excluding messageSubject, so feel free to customize!
 
- Almost all of these variables are public, excluding messageSubject, so feel free to customize!
  −
      
For example: add a new HUDMessage to show [[File:Error-image-ingame.png]] toaster popup.  
 
For example: add a new HUDMessage to show [[File:Error-image-ingame.png]] toaster popup.  
 
<syntaxhighlight lang="c#">
 
<syntaxhighlight lang="c#">
 
Game1.addHUDMessage(new HUDMessage("MESSAGE", 3));
 
Game1.addHUDMessage(new HUDMessage("MESSAGE", 3));
 +
</syntaxhighlight>
 +
 +
Another example: add a HUDMessage that shows up like a simple rectangle with no icon, and no square for the icon:
 +
<syntaxhighlight lang="c#">
 +
Game1.addHUDMessage(new HUDMessage("MESSAGE", ""));  // second parameter is the 'leaveMeNull' parameter
 
</syntaxhighlight>
 
</syntaxhighlight>
  
57

edits