static void drawPostProcessors() { // first, we check our list of inspectors and sync it up with the current list of PostProcessors in the Scene for (var i = 0; i < Core.scene.rawPostProcessorList.length; i++) { var postProcessor = Core.scene.rawPostProcessorList.buffer[i]; if (_postProcessorInspectors.Where(inspector => inspector.postProcessor == postProcessor).Count() == 0) { _postProcessorInspectors.Add(new PostProcessorInspector(postProcessor)); } } for (var i = _postProcessorInspectors.Count - 1; i >= 0; i--) { if (!_postProcessorInspectors[i].postProcessor.isAttachedToScene) { _postProcessorInspectors.RemoveAt(i); } else { _postProcessorInspectors[i].draw(); NezImGui.smallVerticalSpace(); } } }
static void drawSettings() { _frameRateArray[_frameRateArrayIndex] = ImGui.GetIO().Framerate; _frameRateArrayIndex = (_frameRateArrayIndex + 1) % _frameRateArray.Length; ImGui.PlotLines("##hidelabel", ref _frameRateArray[0], _frameRateArray.Length, _frameRateArrayIndex, $"FPS: {ImGui.GetIO().Framerate:0}", 0, 60, new Num.Vector2(ImGui.GetContentRegionAvail().X, 50)); NezImGui.smallVerticalSpace(); if (ImGui.CollapsingHeader("Core Settings", ImGuiTreeNodeFlags.DefaultOpen)) { ImGui.Checkbox("exitOnEscapeKeypress", ref Core.exitOnEscapeKeypress); ImGui.Checkbox("pauseOnFocusLost", ref Core.pauseOnFocusLost); ImGui.Checkbox("debugRenderEnabled", ref Core.debugRenderEnabled); } if (ImGui.CollapsingHeader("Core.defaultSamplerState", ImGuiTreeNodeFlags.DefaultOpen)) { var currentTextureFilter = (int)Core.defaultSamplerState.Filter; if (ImGui.Combo("Filter", ref currentTextureFilter, _textureFilters, _textureFilters.Length)) { Core.defaultSamplerState.Filter = (TextureFilter)Enum.Parse(typeof(TextureFilter), _textureFilters[currentTextureFilter]); } var anisotropy = Core.defaultSamplerState.MaxAnisotropy; if (ImGui.InputInt("MaxAnisotropy", ref anisotropy)) { Core.defaultSamplerState.MaxAnisotropy = anisotropy; } var addressU = (int)Core.defaultSamplerState.AddressU; if (ImGui.Combo("AddressU", ref addressU, _textureAddressModes, _textureAddressModes.Length)) { Core.defaultSamplerState.AddressU = (TextureAddressMode)addressU; } var addressV = (int)Core.defaultSamplerState.AddressV; if (ImGui.Combo("AddressV", ref addressV, _textureAddressModes, _textureAddressModes.Length)) { Core.defaultSamplerState.AddressV = (TextureAddressMode)addressV; } var addressW = (int)Core.defaultSamplerState.AddressW; if (ImGui.Combo("AddressW", ref addressW, _textureAddressModes, _textureAddressModes.Length)) { Core.defaultSamplerState.AddressW = (TextureAddressMode)addressW; } } }