Changes

Jump to navigation Jump to search
1,659 bytes added ,  22:31, 21 May 2018
Line 68: Line 68:  
//todo
 
//todo
 
==UI==
 
==UI==
//todo describe section
+
 
 +
The UI is a collection of separate elements which make up the HUD and occasional popups.
 +
 
 +
//todo expand section.
 +
 
 +
 
 
===Banner Message===
 
===Banner Message===
Add a new HUDMessage to show [insert image] banner.
+
HUDMessage are those popups in the lower left hand screen. They have several constructors, which we will briefly go over here (a few non relevant ones have been snipped):
 +
 
 +
<source lang="c#">
 +
  public HUDMessage(string message);
 +
  public HUDMessage(string message, int whatType);
 +
  public HUDMessage(string type, int number, bool add, Color color, Item messageSubject = null);
 +
  public HUDMessage(string message, string leaveMeNull)
 +
  public HUDMessage(string message, Color color, float timeLeft, bool fadeIn)
 +
</source>
 +
 
 +
So before we go over when you'd use them, I'm going to briefly note how the class HUDMessage uses these. (I encourage people to read the class if they have further questions, but I doubt most of us will need to know more than this)
 +
 
 +
WhatType:
 +
1 - Achievement
 +
2 - New Quest
 +
3 - Error
 +
4 - Stamina
 +
5 - Health
 +
 
 +
Color: Fairly obvious. It should be noted that while the first two don't give an option (they default to ''Color:OrangeRed''), the fourth with the param 'leaveMeNull' displays as the same color as the game text.
 +
 
 +
For specifics:
 +
'' public HUDMessage(string type, int number, bool add, Color color, Item messageSubject = null);'' - This allows for expanded customization of the message. More often used for money.
 +
''  public HUDMessage(string message, string leaveMeNull)'' - Also displays no icon.
 +
''  public HUDMessage(string message, Color color, float timeLeft, bool fadeIn)'' - Displays a message that fades in for a set amount of time.
 +
 
 +
Note: For those of you who want a custom HUDMessage:
 +
- Almost all of these variables are public, excluding messageSubject, so feel free to customize!
 +
 
 +
 
 +
For example: add a new HUDMessage to show [insert image] banner.  
 
<source lang="c#">
 
<source lang="c#">
 
Game1.addHUDMessage(new HUDMessage("MESSAGE", 3));
 
Game1.addHUDMessage(new HUDMessage("MESSAGE", 3));
 
</source>
 
</source>
Optional parameters ''noIcon'' and ''timeLeft''
+
 
The 3 is because ...?
   
==Menus==
 
==Menus==
 
//todo describe section
 
//todo describe section
78

edits

Navigation menu