public AssetListView(DiagnosticViewContext context) : base(context) { // TODO: This actually needs to use assets that have already been loaded. // And update when assets are loaded or unloaded. // TODO: Remove this. _audioFilenames = new List <string>(); foreach (var entry in context.Game.ContentManager.FileSystem.Files) { switch (Path.GetExtension(entry.FilePath).ToLowerInvariant()) { case ".mp3": case ".wav": _audioFilenames.Add(entry.FilePath); break; } } _items = new List <AssetListItem>(); _searchTextBuffer = new byte[32]; UpdateSearch(null); }
public MainView(DiagnosticViewContext context) { _context = context; _views = new List <DiagnosticView>(); void AddView(DiagnosticView view) { _views.Add(AddDisposable(view)); } AddView(new GameView(context) { IsVisible = true }); AddView(new AssetListView(context)); AddView(new MapSettingsView(context)); AddView(new RenderSettingsView(context)); AddView(new ScriptingView(context)); AddView(new StatisticsView(context)); AddView(new StringsView(context)); AddView(new AptView(context)); AddView(new AptConstantsView(context)); AddView(new AptGeometryView(context)); AddView(new WndView(context)); AddView(new GameLoopView(context)); AddView(new LuaScriptConsole(context)); AddView(new LogView(context)); }
public MainView(DiagnosticViewContext context) { _context = context; _views = new List <DiagnosticView>(); _maps = _context.Game.AssetStore.MapCaches .Where(m => _context.Game.ContentManager.GetMapEntry(m.Name) != null) .Select(m => (mapCache: m, mapName: m.GetNameKey().Translate())) .OrderBy(m => m.mapName) .ToDictionary(m => m.mapCache, m => m.mapName); void AddView(DiagnosticView view) { _views.Add(AddDisposable(view)); } AddView(new GameView(context) { IsVisible = true }); AddView(new AssetListView(context)); AddView(new MapSettingsView(context)); AddView(new RenderSettingsView(context)); AddView(new ScriptingView(context)); AddView(new StatisticsView(context)); AddView(new StringsView(context)); AddView(new AptView(context)); AddView(new AptConstantsView(context)); AddView(new AptGeometryView(context)); AddView(new WndView(context)); AddView(new GameLoopView(context)); AddView(new LuaScriptConsole(context)); AddView(new LogView(context)); }
public RenderSettingsView(DiagnosticViewContext context) : base(context) { _shadowMapSizes = new List <uint> { 256u, 512u, 1024u, 2048u }; _shadowMapSizeNames = _shadowMapSizes.Select(x => x.ToString()).ToArray(); }
public ScriptingView(DiagnosticViewContext context) : base(context) { _scriptStateContent = new StringBuilder(); Game.Scripting.OnUpdateFinished += OnScriptingUpdateFinished; AddDisposeAction(() => Game.Scripting.OnUpdateFinished -= OnScriptingUpdateFinished); }
public ObjectListView(DiagnosticViewContext context) : base(context) { _items = new List <GameObject>(); _searchTextBuffer = new byte[32]; UpdateSearch(null); }
public AssetListView(DiagnosticViewContext context) : base(context) { _items = new List <AssetListItem>(); _searchTextBuffer = new byte[32]; UpdateSearch(null); }
public AptGeometryView(DiagnosticViewContext context) : base(context) { _renderedView = AddDisposable(new RenderedView(context)); _renderedView.RenderPipeline.Rendering2D += (sender, e) => { _shapeRenderer.Render(e.DrawingContext); }; }
public MainView(DiagnosticViewContext context) { _context = context; _views = new List <DiagnosticView>(); _maps = _context.Game.AssetStore.MapCaches .Where(m => _context.Game.ContentManager.GetMapEntry(m.Name) != null) .Select(m => (mapCache: m, mapName: m.IsOfficial ? m.GetNameKey().Translate() : m.Name)) .OrderBy(m => m.mapCache.IsOfficial ? 0 : 1).ThenBy(m => m.mapName) .ToDictionary(m => m.mapCache, m => m.mapName); if (_maps.FirstOrDefault() is var(mapCache, value)) { _map = (mapCache, value); } _playableSides = _context.Game.GetPlayableSides().ToList(); _faction = _playableSides.FirstOrDefault(); void AddView(DiagnosticView view) { _views.Add(AddDisposable(view)); } AddView(new GameView(context) { IsVisible = true }); AddView(new ObjectListView(context)); AddView(new AssetListView(context)); AddView(new MapSettingsView(context)); AddView(new RenderSettingsView(context)); AddView(new ScriptingView(context)); AddView(new StatisticsView(context)); AddView(new StringsView(context)); AddView(new AptView(context)); AddView(new AptConstantsView(context)); AddView(new AptGeometryView(context)); AddView(new WndView(context)); AddView(new GameLoopView(context)); AddView(new GameSettingsView(context)); AddView(new LuaScriptConsole(context)); AddView(new LogView(context)); AddView(new InspectorView(context)); AddView(new PreviewView(context)); AddView(new CameraView(context)); AddView(new PartitionView(context)); }
public PreviewView(DiagnosticViewContext context) : base(context) { }
public WndView(DiagnosticViewContext context) : base(context) { }
public DefaultInspectable(object value, DiagnosticViewContext context) { _value = value; _context = context; }
public CameraView(DiagnosticViewContext context) : base(context) { }
public MainView(DiagnosticViewContext context) { _context = context; _views = new List <DiagnosticView>(); _maps = _context.Game.AssetStore.MapCaches .Where(m => _context.Game.ContentManager.GetMapEntry(m.Name) != null) .Select(m => (mapCache: m, mapName: m.IsOfficial ? m.GetNameKey().Translate() : m.Name)) .OrderBy(m => m.mapCache.IsOfficial ? 0 : 1).ThenBy(m => m.mapName) .ToDictionary(m => m.mapCache, m => m.mapName); if (_maps.FirstOrDefault() is var(mapCache, value)) { _map = (mapCache, value); } _playableSides = _context.Game.GetPlayableSides().ToList(); _faction = _playableSides.FirstOrDefault(); void AddView(DiagnosticView view) { _views.Add(AddDisposable(view)); } AddView(new GameView(context) { IsVisible = true }); AddView(new ObjectListView(context)); AddView(new AssetListView(context)); AddView(new MapSettingsView(context)); AddView(new RenderSettingsView(context)); AddView(new ScriptingView(context)); AddView(new StatisticsView(context)); AddView(new StringsView(context)); AddView(new AptView(context)); AddView(new AptConstantsView(context)); AddView(new AptGeometryView(context)); AddView(new WndView(context)); AddView(new GameLoopView(context)); AddView(new GameSettingsView(context)); AddView(new LuaScriptConsole(context)); AddView(new LogView(context)); AddView(new InspectorView(context)); AddView(new PreviewView(context)); AddView(new CameraView(context)); AddView(new PartitionView(context)); if (File.Exists(IniFileName)) { foreach (var line in File.ReadAllText(IniFileName).Split(Environment.NewLine)) { var settings = line.Split(" = "); var displayName = settings[0]; var visibility = bool.Parse(settings[1]); var view = _views.FirstOrDefault(x => x.DisplayName == displayName); if (view != null) { view.IsVisible = visibility; } } } }
public LuaScriptConsole(DiagnosticViewContext context) : base(context) { }
public StatisticsView(DiagnosticViewContext context) : base(context) { }
public InspectorView(DiagnosticViewContext context) : base(context) { }
public PartitionView(DiagnosticViewContext context) : base(context) { }
public StringsView(DiagnosticViewContext context) : base(context) { _labels = new List <string>(); _searchTextBuffer = new byte[32]; }
public GameLoopView(DiagnosticViewContext context) : base(context) { }
public RenderedView( DiagnosticViewContext context, in Vector3 cameraTarget = default,
public MapSettingsView(DiagnosticViewContext context) : base(context) { }
public AptConstantsView(DiagnosticViewContext context) : base(context) { }