Изменения

Перейти к навигации Перейти к поиску
Нет описания правки
Строка 143: Строка 143:  
: In UI mode, you should usually replace <samp>Game1.viewport</samp> with <samp>Game1.uiViewport</samp>. '''Don't''' do this if you'll adjust the positions for UI scaling separately, since double-conversion will give you incorrect results. You can convert between UI and non-UI coordinates using <samp>Utility.ModifyCoordinatesForUIScale</samp> and <samp>Utility.ModifyCoordinatesFromUIScale</samp>.
 
: In UI mode, you should usually replace <samp>Game1.viewport</samp> with <samp>Game1.uiViewport</samp>. '''Don't''' do this if you'll adjust the positions for UI scaling separately, since double-conversion will give you incorrect results. You can convert between UI and non-UI coordinates using <samp>Utility.ModifyCoordinatesForUIScale</samp> and <samp>Utility.ModifyCoordinatesFromUIScale</samp>.
   −
: You can test whether your mod accounts for this correctly by setting the zoom to maximum and the UI scale to minimum (i.e. have them at opposite values) or vice versa; in particular check any logic which handles pixel positions, like menus clicking.
+
: You can test whether your mod accounts for this correctly by setting the zoom to maximum and the UI scale to minimum (''i.e.,'' have them at opposite values) or vice versa; in particular check any logic which handles pixel positions, like menus clicking.
    
==Main classes==
 
==Main classes==

Навигация