public void OnGUI() { if (showUI && sys.getPlayer() != null) { areaString = GUI.TextArea(new Rect(0, 0, 100, 25), areaString); screenXString = GUI.TextArea(new Rect(0, 25, 50, 25), screenXString); screenYString = GUI.TextArea(new Rect(50, 25, 50, 25), screenYString); posXString = GUI.TextArea(new Rect(0, 50, 50, 25), posXString); posYString = GUI.TextArea(new Rect(50, 50, 50, 25), posYString); if (GUI.Button(new Rect(0, 75, 100, 25), "Warp")) { DoDebugWarp(); } sheetString = GUI.TextArea(new Rect(100, 0, 100, 25), sheetString); flagString = GUI.TextArea(new Rect(100, 25, 100, 25), flagString); valueString = GUI.TextArea(new Rect(100, 50, 100, 25), valueString); if (GUI.Button(new Rect(100, 75, 100, 25), "Set Flag")) { SetFlag(); } getSheetString = GUI.TextArea(new Rect(200, 0, 100, 25), getSheetString); getFlagString = GUI.TextArea(new Rect(200, 25, 100, 25), getFlagString); getValueString = GUI.TextArea(new Rect(200, 50, 100, 25), getValueString); if (GUI.Button(new Rect(200, 75, 100, 25), "Get Flag")) { GetFlag(); } sys.setPandaModeHP(GUI.Toggle(new Rect(300, 0, 120, 25), sys.getPandaModeHP(), "Panda Mode")); sys.setPandaModeHit(GUI.Toggle(new Rect(300, 25, 120, 25), sys.getPandaModeHit(), "Panda Hit Mode")); } if (showFlagWatch) { if (currentFont == null) { currentFont = Font.CreateDynamicFontFromOSFont("Consolas", 14); } GUIStyle guistyle = new GUIStyle(GUI.skin.label); guistyle.normal.textColor = Color.white; guistyle.fontStyle = FontStyle.Bold; guistyle.font = currentFont; guistyle.fontSize = 14; var flagWatch = ((patched_L2FlagSystem)sys.getFlagSys()).GetFlagWatches(); if (flagWatch == null || flagWatch.Count < 1) { return; } guistyle.fontSize = 10; GUIContent flw1 = new GUIContent(flagWatch[flagWatch.Count - 1] + "\r\n" + flagWatch[flagWatch.Count - 2] + "\r\n" + flagWatch[flagWatch.Count - 3]); Vector2 flw1Size = guistyle.CalcSize(flw1); GUI.Label(new Rect(0, Screen.height - flw1Size.y, flw1Size.x, flw1Size.y), flw1, guistyle); try { GUIContent flw2 = new GUIContent(flagWatch[flagWatch.Count - 4] + "\r\n" + flagWatch[flagWatch.Count - 5] + "\r\n" + flagWatch[flagWatch.Count - 6]); Vector2 flw2Size = guistyle.CalcSize(flw2); GUI.contentColor = Color.grey; GUI.Label(new Rect(flw1Size.x + 20, Screen.height - flw1Size.y, flw2Size.x, flw2Size.y), flw2, guistyle); GUIContent flw3 = new GUIContent(flagWatch[flagWatch.Count - 7] + "\r\n" + flagWatch[flagWatch.Count - 8] + "\r\n" + flagWatch[flagWatch.Count - 9]); Vector2 flw3Size = guistyle.CalcSize(flw3); GUI.contentColor = Color.grey; GUI.Label(new Rect(flw1Size.x + flw2Size.x + 40, Screen.height - flw2Size.y, flw3Size.x, flw3Size.y), flw3, guistyle); } catch (Exception) { } } }
public void OnGUI() { if (showUI && sys.getPlayer() != null) { areaString = GUI.TextArea(new Rect(0, 0, 100, 25), areaString); screenXString = GUI.TextArea(new Rect(0, 25, 50, 25), screenXString); screenYString = GUI.TextArea(new Rect(50, 25, 50, 25), screenYString); posXString = GUI.TextArea(new Rect(0, 50, 50, 25), posXString); posYString = GUI.TextArea(new Rect(50, 50, 50, 25), posYString); if (GUI.Button(new Rect(0, 75, 100, 25), "Warp")) { DoDebugWarp(); } sheetString = GUI.TextArea(new Rect(100, 0, 100, 25), sheetString); flagString = GUI.TextArea(new Rect(100, 25, 100, 25), flagString); valueString = GUI.TextArea(new Rect(100, 50, 100, 25), valueString); if (GUI.Button(new Rect(100, 75, 100, 25), "Set Flag")) { SetFlag(); } getSheetString = GUI.TextArea(new Rect(200, 0, 100, 25), getSheetString); getFlagString = GUI.TextArea(new Rect(200, 25, 100, 25), getFlagString); getValueString = GUI.TextArea(new Rect(200, 50, 100, 25), getValueString); if (GUI.Button(new Rect(200, 75, 100, 25), "Get Flag")) { GetFlag(); } sys.setPandaModeHP(GUI.Toggle(new Rect(300, 0, 120, 25), sys.getPandaModeHP(), "Panda Mode")); sys.setPandaModeHit(GUI.Toggle(new Rect(300, 25, 120, 25), sys.getPandaModeHit(), "Panda Hit Mode")); } if (showFlagWatch) { if (currentFont == null) { currentFont = Font.CreateDynamicFontFromOSFont("Consolas", 14); } GUIStyle guistyle = new GUIStyle(GUI.skin.label); guistyle.normal.textColor = Color.white; guistyle.fontStyle = FontStyle.Bold; guistyle.font = currentFont; guistyle.fontSize = 14; var flagWatch = ((patched_L2FlagSystem)sys.getFlagSys()).GetFlagWatches(); if (flagWatch == null) { return; } guistyle.fontSize = 10; try { string flags = string.Empty; foreach (var flag in flagWatch) { flags = string.Format($"{flags}\n{flag}"); } GUIContent flw1 = new GUIContent(flags); Vector2 flw1Size = guistyle.CalcSize(flw1); GUI.Label(new Rect(0, Screen.height - flw1Size.y, flw1Size.x, flw1Size.y), flw1, guistyle); } catch (Exception) { throw; } } }