mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-21 19:43:03 +00:00
fix more of namespace errors
This commit is contained in:
parent
11c1f58481
commit
0a61efe388
29 changed files with 60 additions and 60 deletions
|
@ -67,7 +67,7 @@ namespace SanAndreasUnity.Behaviours.Audio
|
|||
public static void InitFromLoader ()
|
||||
{
|
||||
|
||||
s_gtaAudioFiles = GTAAudio.OpenRead (Path.Combine (Utilities.Config.GamePath, "audio"));
|
||||
s_gtaAudioFiles = GTAAudio.OpenRead (Path.Combine (Config.GamePath, "audio"));
|
||||
|
||||
if (Singleton.playStartupSound)
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace SanAndreasUnity.Behaviours {
|
|||
|
||||
void OnSceneChangedInternal (Scene s1, Scene s2)
|
||||
{
|
||||
Utilities.F.SendMessageToObjectsOfType<MonoBehaviour>("OnSceneChanged", new SceneChangedMessage() {s1 = s1, s2 = s2});
|
||||
UGameCore.Utilities.F.SendMessageToObjectsOfType<MonoBehaviour>("OnSceneChanged", new SceneChangedMessage() {s1 = s1, s2 = s2});
|
||||
}
|
||||
|
||||
void Start () {
|
||||
|
|
|
@ -16,7 +16,7 @@ using SanAndreasUnity.Importing.GXT;
|
|||
namespace SanAndreasUnity.Behaviours
|
||||
{
|
||||
|
||||
public class Loader : Utilities.StartupSingleton<Loader>
|
||||
public class Loader : StartupSingleton<Loader>
|
||||
{
|
||||
|
||||
public static bool HasLoaded { get; private set; }
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace SanAndreasUnity.Behaviours
|
|||
if (Time.timeAsDouble - _timeWhenRetrievedZoneName > 2f)
|
||||
{
|
||||
_timeWhenRetrievedZoneName = Time.timeAsDouble;
|
||||
_lastZoneName = Zone.GetZoneName(this.FocusPos);
|
||||
_lastZoneName = Importing.Zone.GetZoneName(this.FocusPos);
|
||||
}
|
||||
|
||||
return _lastZoneName;
|
||||
|
|
|
@ -4,7 +4,7 @@ using UnityEngine;
|
|||
namespace SanAndreasUnity.Behaviours.Peds.States
|
||||
{
|
||||
|
||||
public interface IPedState : Utilities.IState {
|
||||
public interface IPedState : IState {
|
||||
|
||||
/// <summary> Called at the end of Update(). </summary>
|
||||
void PostUpdateState ();
|
||||
|
|
|
@ -12,7 +12,7 @@ using UnityEngine.AI;
|
|||
|
||||
namespace SanAndreasUnity.Behaviours.World
|
||||
{
|
||||
public class Cell : Utilities.SingletonComponent<Cell>
|
||||
public class Cell : UGameCore.Utilities.SingletonComponent<Cell>
|
||||
{
|
||||
private Dictionary<Instance, StaticGeometry> m_insts = new Dictionary<Instance, StaticGeometry>();
|
||||
public IReadOnlyDictionary<Instance, StaticGeometry> StaticGeometries => m_insts;
|
||||
|
|
|
@ -3,7 +3,7 @@ using UnityEngine;
|
|||
|
||||
namespace SanAndreasUnity.Behaviours.World
|
||||
{
|
||||
public class DayTimeManager : Utilities.SingletonComponent<DayTimeManager>
|
||||
public class DayTimeManager : UGameCore.Utilities.SingletonComponent<DayTimeManager>
|
||||
{
|
||||
public AnimationCurve lightAngleCurve;
|
||||
public AnimationCurve lightIntensityCurve;
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
|
||||
void OnDrawGizmosSelected()
|
||||
{
|
||||
Utilities.F.HandlesDrawText(this.transform.position, this.name, Color.yellow);
|
||||
F.HandlesDrawText(this.transform.position, this.name, Color.yellow);
|
||||
}
|
||||
|
||||
protected override void OnLoad()
|
||||
|
|
|
@ -96,11 +96,11 @@ namespace SanAndreasUnity.Commands
|
|||
if (numWords > 1)
|
||||
category = words[1].ToLowerInvariant();
|
||||
|
||||
var entries = Utilities.Stats.Entries;
|
||||
var entries = UGameCore.Utilities.Stats.Entries;
|
||||
if (category != null)
|
||||
entries = entries.Where(_ => _.Key.ToLowerInvariant() == category);
|
||||
|
||||
var statsContext = new Utilities.Stats.GetStatsContext();
|
||||
var statsContext = new UGameCore.Utilities.Stats.GetStatsContext();
|
||||
|
||||
foreach (var entriesWithCategory in entries)
|
||||
{
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace SanAndreasUnity.Editor
|
|||
yield break;
|
||||
}
|
||||
|
||||
LoadingThread.Singleton.BackgroundJobRunner.EnsureBackgroundThreadStarted();
|
||||
Importing.LoadingThread.Singleton.BackgroundJobRunner.EnsureBackgroundThreadStarted();
|
||||
|
||||
if (!Loader.HasLoaded)
|
||||
{
|
||||
|
@ -254,7 +254,7 @@ namespace SanAndreasUnity.Editor
|
|||
yield return null;
|
||||
yield return null; // let the Editor update after changing day-time, who knows what all is changed
|
||||
|
||||
LoadingThread.Singleton.maxTimePerFrameMs = 500;
|
||||
Importing.LoadingThread.Singleton.maxTimePerFrameMs = 500;
|
||||
}
|
||||
|
||||
EditorUtilityEx.MarkActiveSceneAsDirty();
|
||||
|
@ -366,7 +366,7 @@ namespace SanAndreasUnity.Editor
|
|||
|
||||
for (int i = 0; i < numIterations; i++)
|
||||
{
|
||||
long initialNumPendingJobs = LoadingThread.Singleton.BackgroundJobRunner.GetNumPendingJobs();
|
||||
long initialNumPendingJobs = Importing.LoadingThread.Singleton.BackgroundJobRunner.GetNumPendingJobs();
|
||||
long numPendingJobs = initialNumPendingJobs;
|
||||
|
||||
do
|
||||
|
@ -380,11 +380,11 @@ namespace SanAndreasUnity.Editor
|
|||
yield break;
|
||||
}
|
||||
|
||||
LoadingThread.Singleton.UpdateJobs();
|
||||
Importing.LoadingThread.Singleton.UpdateJobs();
|
||||
|
||||
System.Threading.Thread.Sleep(5); // don't interact with background thread too often, and also reduce CPU usage
|
||||
|
||||
numPendingJobs = LoadingThread.Singleton.BackgroundJobRunner.GetNumPendingJobs();
|
||||
numPendingJobs = Importing.LoadingThread.Singleton.BackgroundJobRunner.GetNumPendingJobs();
|
||||
initialNumPendingJobs = Math.Max(initialNumPendingJobs, numPendingJobs);
|
||||
|
||||
} while (numPendingJobs > 0);
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace SanAndreasUnity.Importing.Archive
|
|||
// [MethodImpl(MethodImplOptions.Synchronized)]
|
||||
public static void ReadFileAsync(string name, float loadPriority, System.Action<Stream> onFinish)
|
||||
{
|
||||
Behaviours.LoadingThread.RegisterJob (new BackgroundJobRunner.Job<Stream> () {
|
||||
LoadingThread.RegisterJob (new BackgroundJobRunner.Job<Stream> () {
|
||||
priority = loadPriority,
|
||||
action = () => ReadFile( name ),
|
||||
callbackFinish = (stream) => { onFinish(stream); },
|
||||
|
|
|
@ -282,7 +282,7 @@ namespace SanAndreasUnity.Importing.Conversion
|
|||
TextureDictionary loadedTxd = null;
|
||||
bool bDontLoad = DontLoadTextures;
|
||||
|
||||
Behaviours.LoadingThread.RegisterJob (new UGameCore.Utilities.BackgroundJobRunner.Job<RenderWareStream.TextureDictionary> () {
|
||||
LoadingThread.RegisterJob (new UGameCore.Utilities.BackgroundJobRunner.Job<RenderWareStream.TextureDictionary> () {
|
||||
priority = loadPriority,
|
||||
action = () => {
|
||||
return bDontLoad ? null : ArchiveManager.ReadFile<RenderWareStream.TextureDictionary>(name + ".txd");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using UGameCore.Utilities;
|
||||
|
||||
namespace SanAndreasUnity.Behaviours
|
||||
namespace SanAndreasUnity.Importing
|
||||
{
|
||||
public class LoadingThread : StartupSingleton<LoadingThread>
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace SanAndreasUnity.Settings {
|
|||
{
|
||||
// apply settings
|
||||
|
||||
Camera cam = Utilities.F.FindMainCameraEvenIfDisabled();
|
||||
Camera cam = UGameCore.Utilities.F.FindMainCameraEvenIfDisabled();
|
||||
if (cam != null)
|
||||
{
|
||||
cam.fieldOfView = s_fieldOfView;
|
||||
|
|
|
@ -16,10 +16,10 @@ namespace SanAndreasUnity.Stats
|
|||
|
||||
void Start()
|
||||
{
|
||||
Utilities.Stats.RegisterStat(new Utilities.Stats.Entry(){category = "MISC", getStatsAction = GetStats});
|
||||
UGameCore.Utilities.Stats.RegisterStat(new UGameCore.Utilities.Stats.Entry(){category = "MISC", getStatsAction = GetStats});
|
||||
}
|
||||
|
||||
void GetStats(Utilities.Stats.GetStatsContext context)
|
||||
void GetStats(UGameCore.Utilities.Stats.GetStatsContext context)
|
||||
{
|
||||
|
||||
m_nestingLevel = 0;
|
||||
|
@ -140,7 +140,7 @@ namespace SanAndreasUnity.Stats
|
|||
{
|
||||
var clip = vehicle.RadioAudioSource.clip;
|
||||
texts.AddRange(new string[] { "\tclip time", "\tclip length", "\tclip size" });
|
||||
objects.AddRange(new object[] { vehicle.RadioAudioSource.time, clip.length, (Utilities.F.GetAudioClipSizeInBytes(clip) / 1024.0f) + " KB" });
|
||||
objects.AddRange(new object[] { vehicle.RadioAudioSource.time, clip.length, (F.GetAudioClipSizeInBytes(clip) / 1024.0f) + " KB" });
|
||||
}
|
||||
|
||||
|
||||
|
@ -218,8 +218,8 @@ namespace SanAndreasUnity.Stats
|
|||
|
||||
// loading thread
|
||||
sb.Append("loading thread:\n");
|
||||
sb.Append($"\tmax time per frame ms: {LoadingThread.Singleton.maxTimePerFrameMs}\n");
|
||||
AppendStatsForBackgroundJobRunner(sb, LoadingThread.Singleton.BackgroundJobRunner, "\t");
|
||||
sb.Append($"\tmax time per frame ms: {Importing.LoadingThread.Singleton.maxTimePerFrameMs}\n");
|
||||
AppendStatsForBackgroundJobRunner(sb, Importing.LoadingThread.Singleton.BackgroundJobRunner, "\t");
|
||||
sb.AppendLine();
|
||||
|
||||
// pathfinding manager
|
||||
|
|
|
@ -12,10 +12,10 @@ namespace SanAndreasUnity.Stats
|
|||
{
|
||||
void Start()
|
||||
{
|
||||
Utilities.Stats.RegisterStat(new Utilities.Stats.Entry() { category = "NET", getStatsAction = GetStats });
|
||||
UGameCore.Utilities.Stats.RegisterStat(new UGameCore.Utilities.Stats.Entry() { category = "NET", getStatsAction = GetStats });
|
||||
}
|
||||
|
||||
void GetStats(Utilities.Stats.GetStatsContext context)
|
||||
void GetStats(UGameCore.Utilities.Stats.GetStatsContext context)
|
||||
{
|
||||
var sb = context.stringBuilder;
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ namespace SanAndreasUnity.Stats
|
|||
|
||||
void Start()
|
||||
{
|
||||
Utilities.Stats.RegisterStat(new Utilities.Stats.Entry(){category = "PLAYERS", getStatsAction = GetStats});
|
||||
UGameCore.Utilities.Stats.RegisterStat(new UGameCore.Utilities.Stats.Entry(){category = "PLAYERS", getStatsAction = GetStats});
|
||||
}
|
||||
|
||||
void GetStats(Utilities.Stats.GetStatsContext context)
|
||||
void GetStats(UGameCore.Utilities.Stats.GetStatsContext context)
|
||||
{
|
||||
|
||||
var sb = context.stringBuilder;
|
||||
|
|
|
@ -9,10 +9,10 @@ namespace SanAndreasUnity.Stats
|
|||
{
|
||||
void Start()
|
||||
{
|
||||
Utilities.Stats.RegisterStat(new Utilities.Stats.Entry(){ category = "WORLD", getStatsAction = GetStats });
|
||||
UGameCore.Utilities.Stats.RegisterStat(new UGameCore.Utilities.Stats.Entry(){ category = "WORLD", getStatsAction = GetStats });
|
||||
}
|
||||
|
||||
void GetStats(Utilities.Stats.GetStatsContext context)
|
||||
void GetStats(UGameCore.Utilities.Stats.GetStatsContext context)
|
||||
{
|
||||
var sb = context.stringBuilder;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace SanAndreasUnity.UI {
|
|||
this.RegisterButtonInPauseMenu ();
|
||||
|
||||
// adjust rect
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRect( new Vector2( 500, Screen.height * 0.85f ) );
|
||||
this.windowRect = GUIUtils.GetCenteredRect( new Vector2( 500, Screen.height * 0.85f ) );
|
||||
}
|
||||
|
||||
protected override void OnLoaderFinished()
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace SanAndreasUnity.UI
|
|||
int m_selectedLogIndex = -1;
|
||||
|
||||
readonly List<Log> m_logs = new List<Log>();
|
||||
readonly Utilities.ConcurrentQueue<Log> m_queuedLogs = new Utilities.ConcurrentQueue<Log>();
|
||||
readonly UGameCore.Utilities.ConcurrentQueue<Log> m_queuedLogs = new UGameCore.Utilities.ConcurrentQueue<Log>();
|
||||
|
||||
readonly Dictionary<LogType, bool> m_logTypeFilters = new Dictionary<LogType, bool>
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ namespace SanAndreasUnity.UI
|
|||
this.RegisterButtonInPauseMenu ();
|
||||
|
||||
// adjust rect
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRectPerc( new Vector2(0.9f, 0.8f) );
|
||||
this.windowRect = UGameCore.Utilities.GUIUtils.GetCenteredRectPerc( new Vector2(0.9f, 0.8f) );
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
@ -253,7 +253,7 @@ namespace SanAndreasUnity.UI
|
|||
|
||||
GUILayout.BeginHorizontal ();
|
||||
|
||||
if (Utilities.GUIUtils.ButtonWithCalculatedSize (s_clearLabel))
|
||||
if (UGameCore.Utilities.GUIUtils.ButtonWithCalculatedSize (s_clearLabel))
|
||||
{
|
||||
m_logs.Clear();
|
||||
m_selectedLogIndex = -1;
|
||||
|
@ -278,10 +278,10 @@ namespace SanAndreasUnity.UI
|
|||
DrawLogList();
|
||||
if (this.ShowDetails)
|
||||
{
|
||||
Utilities.GUIUtils.DrawHorizontalLine(2f, 3f, Color.black);
|
||||
UGameCore.Utilities.GUIUtils.DrawHorizontalLine(2f, 3f, Color.black);
|
||||
this.DrawDetails();
|
||||
}
|
||||
Utilities.GUIUtils.DrawHorizontalLine(2f, 3f, Color.black);
|
||||
UGameCore.Utilities.GUIUtils.DrawHorizontalLine(2f, 3f, Color.black);
|
||||
DrawToolbar();
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace SanAndreasUnity.UI {
|
|||
this.RegisterButtonInPauseMenu ();
|
||||
|
||||
// adjust rect
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRect(new Vector2(400, 450));
|
||||
this.windowRect = UGameCore.Utilities.GUIUtils.GetCenteredRect(new Vector2(400, 450));
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace SanAndreasUnity.UI {
|
|||
"Left/right while crouch aiming - Roll\n\n" +
|
||||
"E/Q - Switch weapon\n\n" +
|
||||
"G while aiming - Recruit peds to follow you\n\n" +
|
||||
(Utilities.NetUtils.IsServer ?
|
||||
(UGameCore.Utilities.NetUtils.IsServer ?
|
||||
("T - Fly mode\n\n" +
|
||||
"R - Fly through mode\n\n") : "") +
|
||||
"Enter - Enter vehicles\n\n" +
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace SanAndreasUnity.UI
|
|||
void Start()
|
||||
{
|
||||
this.RegisterButtonInPauseMenu();
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRect(new Vector2(WindowWidth, WindowHeight));
|
||||
this.windowRect = GUIUtils.GetCenteredRect(new Vector2(WindowWidth, WindowHeight));
|
||||
SetUpGxtTextAreaStyle();
|
||||
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace SanAndreasUnity.UI {
|
|||
this.RegisterButtonInPauseMenu ();
|
||||
|
||||
// adjust rect
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRectPerc (new Vector2 (1.0f, 1.0f));
|
||||
this.windowRect = GUIUtils.GetCenteredRectPerc (new Vector2 (1.0f, 1.0f));
|
||||
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,7 @@ namespace SanAndreasUnity.UI {
|
|||
Rect texCoords = new Rect(visibleMapRect.x / mapTexture.width, visibleMapRect.y / mapTexture.height,
|
||||
visibleMapRect.width / mapTexture.width, visibleMapRect.height / mapTexture.height);
|
||||
|
||||
texCoords = Utilities.F.Clamp01 (texCoords);
|
||||
texCoords = F.Clamp01 (texCoords);
|
||||
|
||||
// adjust display rect
|
||||
|
||||
|
@ -603,7 +603,7 @@ namespace SanAndreasUnity.UI {
|
|||
Vector3 mouseWorldPos;
|
||||
if (this.GetWorldPosUnderMouse (out mouseWorldPos)) {
|
||||
GUILayout.Label ("cursor world pos: " + mouseWorldPos);
|
||||
GUILayout.Label ("Zone: " + Zone.GetZoneName (mouseWorldPos, true), GUILayout.Width(80));
|
||||
GUILayout.Label ("Zone: " + Importing.Zone.GetZoneName (mouseWorldPos, true), GUILayout.Width(80));
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal ();
|
||||
|
@ -655,7 +655,7 @@ namespace SanAndreasUnity.UI {
|
|||
// draw all zones
|
||||
if (m_drawZones) {
|
||||
|
||||
foreach (var zone in Zone.AllZones) {
|
||||
foreach (var zone in Importing.Zone.AllZones) {
|
||||
|
||||
Vector2 min = MiniMap.WorldPosToMapPos (zone.vmin);
|
||||
Vector2 max = MiniMap.WorldPosToMapPos (zone.vmax);
|
||||
|
|
|
@ -294,7 +294,7 @@ namespace SanAndreasUnity.UI {
|
|||
// adjust rect
|
||||
float windowWidth = Mathf.Max (Screen.width * 0.7f, 600);
|
||||
float windowHeight = windowWidth * 9f / 16f;
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRect (new Vector2 (windowWidth, windowHeight));
|
||||
this.windowRect = GUIUtils.GetCenteredRect (new Vector2 (windowWidth, windowHeight));
|
||||
|
||||
SaveDefaultValues();
|
||||
|
||||
|
@ -350,19 +350,19 @@ namespace SanAndreasUnity.UI {
|
|||
{
|
||||
GUILayout.BeginHorizontal ();
|
||||
|
||||
if (Utilities.GUIUtils.ButtonWithCalculatedSize ("Reset to defaults"))
|
||||
if (GUIUtils.ButtonWithCalculatedSize ("Reset to defaults"))
|
||||
ResetSettingsToDefaults ();
|
||||
|
||||
GUILayout.FlexibleSpace ();
|
||||
|
||||
// display Save button
|
||||
if (Utilities.GUIUtils.ButtonWithCalculatedSize ("Save"))
|
||||
if (GUIUtils.ButtonWithCalculatedSize ("Save"))
|
||||
SaveSettings ();
|
||||
|
||||
GUILayout.Space (5);
|
||||
|
||||
// display Load button
|
||||
if (Utilities.GUIUtils.ButtonWithCalculatedSize ("Load"))
|
||||
if (GUIUtils.ButtonWithCalculatedSize ("Load"))
|
||||
LoadSettings ();
|
||||
|
||||
GUILayout.EndHorizontal ();
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace SanAndreasUnity.UI {
|
|||
private int windowId = lastWindowId++;
|
||||
public int WindowId { get { return this.windowId; } }
|
||||
|
||||
public Rect windowRect = Utilities.GUIUtils.GetCenteredRectPerc(new Vector2(0.5f, 0.5f));
|
||||
public Rect windowRect = UGameCore.Utilities.GUIUtils.GetCenteredRectPerc(new Vector2(0.5f, 0.5f));
|
||||
public Vector2 WindowSize { get { return this.windowRect.size; } }
|
||||
|
||||
public bool useScrollView = false;
|
||||
|
@ -91,11 +91,11 @@ namespace SanAndreasUnity.UI {
|
|||
[SerializeField] private float m_spaceAfterContent = 0f;
|
||||
public float SpaceAfterContent { get { return m_spaceAfterContent; } set { m_spaceAfterContent = value; } }
|
||||
|
||||
private Utilities.MenuBarEntry m_pauseMenuEntry;
|
||||
private UGameCore.Utilities.MenuBarEntry m_pauseMenuEntry;
|
||||
|
||||
[SerializeField] private bool m_registerInMainMenuOnStart = false;
|
||||
[SerializeField] private int m_sortPriorityForMainMenu = 0;
|
||||
private Utilities.MenuBarEntry m_mainMenuEntry;
|
||||
private UGameCore.Utilities.MenuBarEntry m_mainMenuEntry;
|
||||
|
||||
private static GameObject s_windowsContainer;
|
||||
|
||||
|
@ -215,7 +215,7 @@ namespace SanAndreasUnity.UI {
|
|||
if (m_hasExitButton) {
|
||||
Color exitButtonColor = Color.Lerp (Color.red, Color.white, 0.0f);
|
||||
// exitButtonColor.a = 0.7f;
|
||||
if (Utilities.GUIUtils.ButtonWithColor (new Rect (this.windowRect.width - buttonWidth - 2, buttonYOffset, buttonWidth, buttonHeight),
|
||||
if (UGameCore.Utilities.GUIUtils.ButtonWithColor (new Rect (this.windowRect.width - buttonWidth - 2, buttonYOffset, buttonWidth, buttonHeight),
|
||||
"x", exitButtonColor)) {
|
||||
this.IsOpened = false;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace SanAndreasUnity.UI
|
|||
{
|
||||
int m_tabIndex = 0;
|
||||
Vector2 m_scrollViewPos = Vector2.zero;
|
||||
readonly Utilities.Stats.GetStatsContext m_statsContext = new Utilities.Stats.GetStatsContext(true);
|
||||
readonly UGameCore.Utilities.Stats.GetStatsContext m_statsContext = new UGameCore.Utilities.Stats.GetStatsContext(true);
|
||||
|
||||
|
||||
StatsWindow()
|
||||
|
@ -27,19 +27,19 @@ namespace SanAndreasUnity.UI
|
|||
this.RegisterButtonInPauseMenu ();
|
||||
|
||||
// adjust rect
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRectPerc(new Vector2(0.8f, 0.8f));
|
||||
this.windowRect = GUIUtils.GetCenteredRectPerc(new Vector2(0.8f, 0.8f));
|
||||
}
|
||||
|
||||
|
||||
protected override void OnWindowGUI ()
|
||||
{
|
||||
Utilities.Stats.DisplayRect = this.windowRect;
|
||||
var categories = Utilities.Stats.Categories.ToArray();
|
||||
UGameCore.Utilities.Stats.DisplayRect = this.windowRect;
|
||||
var categories = UGameCore.Utilities.Stats.Categories.ToArray();
|
||||
m_tabIndex = GUIUtils.TabsControl(m_tabIndex, categories);
|
||||
if (m_tabIndex >= 0 && categories.Length > 0)
|
||||
{
|
||||
m_scrollViewPos = GUILayout.BeginScrollView(m_scrollViewPos);
|
||||
var stats = Utilities.Stats.Entries.ElementAt(m_tabIndex).Value;
|
||||
var stats = UGameCore.Utilities.Stats.Entries.ElementAt(m_tabIndex).Value;
|
||||
foreach (var stat in stats)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(stat.text))
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace SanAndreasUnity.UI {
|
|||
// adjust rect
|
||||
float width = 240;
|
||||
float height = 210;
|
||||
if (Utilities.F.ScreenHasHighDensity)
|
||||
if (UGameCore.Utilities.F.ScreenHasHighDensity)
|
||||
{
|
||||
width = Screen.width * 0.375f;
|
||||
height = Screen.height * 0.4f;
|
||||
|
@ -44,7 +44,7 @@ namespace SanAndreasUnity.UI {
|
|||
GUILayout.Label ("Pos: " + Ped.InstancePos);
|
||||
}
|
||||
|
||||
if (Utilities.NetUtils.IsServer)
|
||||
if (UGameCore.Utilities.NetUtils.IsServer)
|
||||
DisplayServerGui();
|
||||
else if (Net.Player.Local != null)
|
||||
DisplayClientOnlyGui();
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace SanAndreasUnity.UI {
|
|||
|
||||
//this.windowRect = Utilities.GUIUtils.GetCornerRect (SanAndreasUnity.Utilities.ScreenCorner.TopRight,
|
||||
// new Vector2 (windowWidth, windowHeight), new Vector2 (20, 20));
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRectPerc( new Vector2(0.4f, 0.8f) );
|
||||
this.windowRect = GUIUtils.GetCenteredRectPerc( new Vector2(0.4f, 0.8f) );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace SanAndreasUnity.UI {
|
|||
this.RegisterButtonInPauseMenu ();
|
||||
|
||||
// adjust rect
|
||||
this.windowRect = Utilities.GUIUtils.GetCenteredRect( new Vector2( 600, 400 ) );
|
||||
this.windowRect = GUIUtils.GetCenteredRect( new Vector2( 600, 400 ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue