Changes

Jump to navigation Jump to search
2 bytes added ,  07:06, 12 November 2021
Fix typos
Line 28: Line 28:  
## Usually this means creating fields like, e.g., OkButton or Title, etc. of types <code>ClickableTextureComponent</code> and <code>ClickableComponent</code> (both of which are under the <code>StartdewValley.Menus</code> namespace).
 
## Usually this means creating fields like, e.g., OkButton or Title, etc. of types <code>ClickableTextureComponent</code> and <code>ClickableComponent</code> (both of which are under the <code>StartdewValley.Menus</code> namespace).
 
# Initialize all the declared UI elements, either in constructor or in a method called by the constructor.
 
# Initialize all the declared UI elements, either in constructor or in a method called by the constructor.
# Override method in the <code>IClickableMenu</code> abstract class, to add desired behaviour to the UI.
+
# Override methods in the <code>IClickableMenu</code> abstract class, to add desired behaviour to the UI.
 
## Behaviour like handling clicks on the UI, reacting to cursor hovering over any element. Both of those are handled by the methods <code>void receiveLeftClick(...)</code> and <code>void performHoverAction(...)</code>.
 
## Behaviour like handling clicks on the UI, reacting to cursor hovering over any element. Both of those are handled by the methods <code>void receiveLeftClick(...)</code> and <code>void performHoverAction(...)</code>.
 
# Override the <code>void draw(...)</code> method to draw all the UI and UI elements you declared and set up, to the screen.
 
# Override the <code>void draw(...)</code> method to draw all the UI and UI elements you declared and set up, to the screen.
 
## This method is called by Stardew Valley's draw code every render tick whenever your UI is actively displayed.
 
## This method is called by Stardew Valley's draw code every render tick whenever your UI is actively displayed.
## The latter statements draw '''over''' the earlier statment's output. So things like the cursor should always be drawn at last so they are on top of everything else.
+
## The latter statements draw '''over''' the earlier statement's output. So things like the cursor should always be drawn at last so they are on top of everything else.
    
===== General Code Structure =====
 
===== General Code Structure =====
21

edits

Navigation menu