3 changed files
Mod | ||
ModTools.dll | ||
ModInfo.xml | ||
ModTools.cs | ||
Add comment 6 <Description>
Add comment 7 <EN>ModTools is a mod for Green Hell that gives the player the option to unlock tools, weapons and armor.</EN>
Add comment 8 </Description>
Add comment 9 Minus <Version>1.0.2.8</Version>
Add comment 9 Plus <Version>1.0.3.0</Version>
Add comment 10 </Mod>
Add comment 26 private static readonly float ModScreenTotalWidth = 500f;
Add comment 27 private static readonly float ModScreenTotalHeight = 150f;
Add comment 28 private static readonly float ModScreenMinWidth = 50f;
Add comment 29 Minus private static readonly float ModScreenMinHeight = 30f;
Add comment 29 Plus private static readonly float ModScreenMaxWidth = 550f;
Add comment 30 Plus private static readonly float ModScreenMinHeight = 50f;
Add comment 30 31 private static readonly float ModScreenMaxHeight = 200f;
Add comment 31 Minus
Add comment 32 Plus private static float ModScreenStartPositionX { get; set; } = (Screen.width - ModScreenMaxWidth) % ModScreenTotalWidth;
Add comment 33 Plus private static float ModScreenStartPositionY { get; set; } = (Screen.height - ModScreenMaxHeight) % ModScreenTotalHeight;
Add comment 32 34 private static bool IsMinimized { get; set; } = false;
Add comment 33 35
Add comment 34 36 private bool ShowUI = false;
Add comment 35 37
Add comment 36 Minus public static Rect ModToolsScreen = new Rect(Screen.width / 8f, Screen.height / 8f, ModScreenTotalWidth, ModScreenTotalHeight);
Add comment 38 Plus public static Rect ModToolsScreen = new Rect(ModScreenStartPositionX, ModScreenStartPositionY, ModScreenTotalWidth, ModScreenTotalHeight);
Add comment 37 39
Add comment 38 40 private static ItemsManager LocalItemsManager;
Add comment 39 41 private static HUDManager LocalHUDManager;
Add comment 193 195 {
Add comment 194 196 if (!IsMinimized)
Add comment 195 197 {
Add comment 196 Minus ModToolsScreen.Set(ModToolsScreen.x, Screen.height - ModScreenMinHeight, ModScreenMinWidth, ModScreenMinHeight);
Add comment 198 Plus ModScreenStartPositionX = ModToolsScreen.x;
Add comment 199 Plus ModScreenStartPositionY = ModToolsScreen.y;
Add comment 200 Plus ModToolsScreen.Set(ModToolsScreen.x, ModToolsScreen.y, ModScreenMinWidth, ModScreenMinHeight);
Add comment 197 201 IsMinimized = true;
Add comment 198 202 }
Add comment 199 203 else
Add comment 200 204 {
Add comment 201 Minus ModToolsScreen.Set(ModToolsScreen.x, Screen.height / ModScreenMinHeight, ModScreenTotalWidth, ModScreenTotalHeight);
Add comment 205 Plus ModToolsScreen.Set(ModScreenStartPositionX, ModScreenStartPositionY, ModScreenTotalWidth, ModScreenTotalHeight);
Add comment 202 206 IsMinimized = false;
Add comment 203 207 }
Add comment 204 208 InitWindow();
Add comment 206 210
Add comment 207 211 private void InitModToolsScreen(int windowID)
Add comment 208 212 {
Add comment 209 Minus using (var modContentScope = new GUILayout.VerticalScope(GUI.skin.box, GUILayout.ExpandHeight(true), GUILayout.MinHeight(ModScreenMinHeight), GUILayout.MaxHeight(ModScreenMaxHeight)))
Add comment 213 Plus using (var modContentScope = new GUILayout.VerticalScope(
Add comment 214 Plus GUI.skin.box,
Add comment 215 Plus GUILayout.ExpandWidth(true),
Add comment 216 Plus GUILayout.MinWidth(ModScreenMinWidth),
Add comment 217 Plus GUILayout.MaxWidth(ModScreenMaxWidth),
Add comment 218 Plus GUILayout.ExpandHeight(true),
Add comment 219 Plus GUILayout.MinHeight(ModScreenMinHeight),
Add comment 220 Plus GUILayout.MaxHeight(ModScreenMaxHeight)))
Add comment 210 221 {
Add comment 211 222 ScreenMenuBox();
Add comment 212 223 if (!IsMinimized)