Changes

no edit summary
Line 55: Line 55:  
; How do I update affected code?
 
; How do I update affected code?
   −
:* Drawing something into the game world (''e.g.,'' a tile overlay) in UI mode will make things much more difficult. Consider drawing outside UI mode instead, ''e.g.,'' y switching from SMAPI's <samp>Rendered</samp> event to <samp>RenderedWorld</samp>.
+
:* Drawing something into the game world (''e.g.,'' a tile overlay) in UI mode will make things much more difficult. Consider drawing outside UI mode instead, ''e.g.,'' by switching from SMAPI's <samp>Rendered</samp> event to <samp>RenderedWorld</samp>.
 
:* Be very careful about mixed coordinate systems. For example, a menu constructed outside the draw loop may initialize coordinates in non-UI mode, then handle clicks in UI mode. You may need to convert values to non-UI coordinates to check them in that case (see conversions below).
 
:* Be very careful about mixed coordinate systems. For example, a menu constructed outside the draw loop may initialize coordinates in non-UI mode, then handle clicks in UI mode. You may need to convert values to non-UI coordinates to check them in that case (see conversions below).
 
:* When drawing UI, in most cases you should replace <samp>Game1.viewport</samp> with <samp>Game1.uiViewport</samp>. These provide UI-adjusted pixel positions. '''Don't''' do this if you'll be adjusting the positions for UI scaling separately (see below), since double-conversion will give you incorrect results.
 
:* When drawing UI, in most cases you should replace <samp>Game1.viewport</samp> with <samp>Game1.uiViewport</samp>. These provide UI-adjusted pixel positions. '''Don't''' do this if you'll be adjusting the positions for UI scaling separately (see below), since double-conversion will give you incorrect results.
106,033

edits