/// <summary> /// Initializes a KeyEditor and puts it into the second column of grid. /// </summary> /// <param name="sender">The ListView that triggered this event</param> private void lsvKeys_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (lsvKeys.SelectedItem != null) { if (grdKeys.Children.Count == 2) { grdKeys.Children.Remove(grdKeys.Children[1]); } var a = new KeyEditor(lsvKeys.SelectedItem as Models.Key, this); grdKeys.Children.Add(a); Grid.SetColumn(a, 1); } }
public override void OnEnter() { DefaultFont = Game.Content.Load <SpriteFont>(ContentPaths.Fonts.Default); GUI = new DwarfGUI(Game, DefaultFont, Game.Content.Load <SpriteFont>(ContentPaths.Fonts.Title), Game.Content.Load <SpriteFont>(ContentPaths.Fonts.Small), Input); IsInitialized = true; Drawer = new Drawer2D(Game.Content, Game.GraphicsDevice); MainWindow = new Panel(GUI, GUI.RootComponent) { LocalBounds = new Rectangle(EdgePadding, EdgePadding, Game.GraphicsDevice.Viewport.Width - EdgePadding * 2, Game.GraphicsDevice.Viewport.Height - EdgePadding * 2) }; Layout = new GridLayout(GUI, MainWindow, 12, 6); Label label = new Label(GUI, Layout, "Options", GUI.TitleFont); Layout.SetComponentPosition(label, 0, 0, 1, 1); TabSelector = new TabSelector(GUI, Layout, 6); Layout.SetComponentPosition(TabSelector, 0, 1, 6, 10); TabSelector.Tab simpleGraphicsTab = TabSelector.AddTab("Graphics"); GroupBox simpleGraphicsBox = new GroupBox(GUI, simpleGraphicsTab, "Graphics") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; FormLayout simpleGraphicsLayout = new FormLayout(GUI, simpleGraphicsBox); ComboBox simpleGraphicsSelector = new ComboBox(GUI, simpleGraphicsLayout); simpleGraphicsSelector.AddValue("Custom"); simpleGraphicsSelector.AddValue("Lowest"); simpleGraphicsSelector.AddValue("Low"); simpleGraphicsSelector.AddValue("Medium"); simpleGraphicsSelector.AddValue("High"); simpleGraphicsSelector.AddValue("Highest"); simpleGraphicsLayout.AddItem("Graphics Quality", simpleGraphicsSelector); simpleGraphicsSelector.OnSelectionModified += simpleGraphicsSelector_OnSelectionModified; CreateGraphicsTab(); TabSelector.Tab gameplayTab = TabSelector.AddTab("Gameplay"); GroupBox gameplayBox = new GroupBox(GUI, gameplayTab, "Gameplay") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Gameplay"] = gameplayBox; GridLayout gameplayLayout = new GridLayout(GUI, gameplayBox, 6, 5); Label moveSpeedLabel = new Label(GUI, gameplayLayout, "Camera Move Speed", GUI.DefaultFont); Slider moveSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.CameraScrollSpeed, 0.0f, 20.0f, Slider.SliderMode.Float) { ToolTip = "Determines how fast the camera will move when keys are pressed." }; gameplayLayout.SetComponentPosition(moveSpeedLabel, 0, 0, 1, 1); gameplayLayout.SetComponentPosition(moveSlider, 1, 0, 1, 1); moveSlider.OnValueModified += check => { GameSettings.Default.CameraScrollSpeed = check; }; Label zoomSpeedLabel = new Label(GUI, gameplayLayout, "Zoom Speed", GUI.DefaultFont); Slider zoomSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.CameraZoomSpeed, 0.0f, 2.0f, Slider.SliderMode.Float) { ToolTip = "Determines how fast the camera will go\nup and down with the scroll wheel." }; gameplayLayout.SetComponentPosition(zoomSpeedLabel, 0, 1, 1, 1); gameplayLayout.SetComponentPosition(zoomSlider, 1, 1, 1, 1); zoomSlider.OnValueModified += check => { GameSettings.Default.CameraZoomSpeed = check; }; Checkbox invertZoomBox = new Checkbox(GUI, gameplayLayout, "Invert Zoom", GUI.DefaultFont, GameSettings.Default.InvertZoom) { ToolTip = "When checked, the scroll wheel is reversed\nfor zooming." }; gameplayLayout.SetComponentPosition(invertZoomBox, 2, 1, 1, 1); invertZoomBox.OnCheckModified += check => { GameSettings.Default.InvertZoom = check; }; Checkbox edgeScrollBox = new Checkbox(GUI, gameplayLayout, "Edge Scrolling", GUI.DefaultFont, GameSettings.Default.EnableEdgeScroll) { ToolTip = "When checked, the camera will scroll\nwhen the cursor is at the edge of the screen." }; gameplayLayout.SetComponentPosition(edgeScrollBox, 0, 2, 1, 1); edgeScrollBox.OnCheckModified += check => { GameSettings.Default.EnableEdgeScroll = check; }; Checkbox introBox = new Checkbox(GUI, gameplayLayout, "Play Intro", GUI.DefaultFont, GameSettings.Default.DisplayIntro) { ToolTip = "When checked, the intro will be played when the game starts" }; gameplayLayout.SetComponentPosition(introBox, 1, 2, 1, 1); introBox.OnCheckModified += check => { GameSettings.Default.DisplayIntro = check; }; Checkbox fogOfWarBox = new Checkbox(GUI, gameplayLayout, "Fog of War", GUI.DefaultFont, GameSettings.Default.FogofWar) { ToolTip = "When checked, unexplored blocks will be blacked out" }; gameplayLayout.SetComponentPosition(fogOfWarBox, 2, 2, 1, 1); fogOfWarBox.OnCheckModified += check => { GameSettings.Default.FogofWar = check; }; /* * Label chunkWidthLabel = new Label(GUI, gameplayLayout, "Chunk Width", GUI.DefaultFont); * Slider chunkWidthSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.ChunkWidth, 4, 256, Slider.SliderMode.Integer) * { * ToolTip = "Determines the number of blocks in a chunk of terrain." * }; * * gameplayLayout.SetComponentPosition(chunkWidthLabel, 0, 3, 1, 1); * gameplayLayout.SetComponentPosition(chunkWidthSlider, 1, 3, 1, 1); * chunkWidthSlider.OnValueModified += ChunkWidthSlider_OnValueModified; * * Label chunkHeightLabel = new Label(GUI, gameplayLayout, "Chunk Height", GUI.DefaultFont); * Slider chunkHeightSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.ChunkHeight, 4, 256, Slider.SliderMode.Integer) * { * ToolTip = "Determines the maximum depth,\nin blocks, of a chunk of terrain." * }; * * gameplayLayout.SetComponentPosition(chunkHeightLabel, 2, 3, 1, 1); * gameplayLayout.SetComponentPosition(chunkHeightSlider, 3, 3, 1, 1); * * * chunkHeightSlider.OnValueModified += ChunkHeightSlider_OnValueModified; * * Label worldWidthLabel = new Label(GUI, gameplayLayout, "World Width", GUI.DefaultFont); * Slider worldWidthSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldWidth, 4, 2048, Slider.SliderMode.Integer) * { * ToolTip = "Determines the size of the overworld." * }; * * gameplayLayout.SetComponentPosition(worldWidthLabel, 0, 4, 1, 1); * gameplayLayout.SetComponentPosition(worldWidthSlider, 1, 4, 1, 1); * worldWidthSlider.OnValueModified += WorldWidthSlider_OnValueModified; * * Label worldHeightLabel = new Label(GUI, gameplayLayout, "World Height", GUI.DefaultFont); * Slider worldHeightSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldHeight, 4, 2048, Slider.SliderMode.Integer) * { * ToolTip = "Determines the size of the overworld." * }; * * gameplayLayout.SetComponentPosition(worldHeightLabel, 2, 4, 1, 1); * gameplayLayout.SetComponentPosition(worldHeightSlider, 3, 4, 1, 1); * worldHeightSlider.OnValueModified += WorldHeightSlider_OnValueModified; * * * Label worldScaleLabel = new Label(GUI, gameplayLayout, "World Scale", GUI.DefaultFont); * Slider worldScaleSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldScale, 2, 128, Slider.SliderMode.Integer) * { * ToolTip = "Determines the number of voxel\nper pixel of the overworld" * }; * * gameplayLayout.SetComponentPosition(worldScaleLabel, 0, 5, 1, 1); * gameplayLayout.SetComponentPosition(worldScaleSlider, 1, 5, 1, 1); * worldScaleSlider.OnValueModified += WorldScaleSlider_OnValueModified; */ TabSelector.Tab audioTab = TabSelector.AddTab("Audio"); GroupBox audioBox = new GroupBox(GUI, audioTab, "Audio") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Audio"] = audioBox; GridLayout audioLayout = new GridLayout(GUI, audioBox, 6, 5); Label masterLabel = new Label(GUI, audioLayout, "Master Volume", GUI.DefaultFont); Slider masterSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.MasterVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(masterLabel, 0, 0, 1, 1); audioLayout.SetComponentPosition(masterSlider, 1, 0, 1, 1); masterSlider.OnValueModified += value => { GameSettings.Default.MasterVolume = value; }; Label sfxLabel = new Label(GUI, audioLayout, "SFX Volume", GUI.DefaultFont); Slider sfxSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.SoundEffectVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(sfxLabel, 0, 1, 1, 1); audioLayout.SetComponentPosition(sfxSlider, 1, 1, 1, 1); sfxSlider.OnValueModified += check => { GameSettings.Default.SoundEffectVolume = check; }; Label musicLabel = new Label(GUI, audioLayout, "Music Volume", GUI.DefaultFont); Slider musicSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.MusicVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(musicLabel, 0, 2, 1, 1); audioLayout.SetComponentPosition(musicSlider, 1, 2, 1, 1); musicSlider.OnValueModified += check => { GameSettings.Default.MusicVolume = check; }; TabSelector.Tab keysTab = TabSelector.AddTab("Keys"); GroupBox keysBox = new GroupBox(GUI, keysTab, "Keys") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Keys"] = keysBox; KeyEditor keyeditor = new KeyEditor(GUI, keysBox, new KeyManager(), 8, 4); GridLayout keyLayout = new GridLayout(GUI, keysBox, 1, 1); keyLayout.SetComponentPosition(keyeditor, 0, 0, 1, 1); keyLayout.UpdateSizes(); keyeditor.UpdateLayout(); /* * GroupBox customBox = new GroupBox(GUI, Layout, "Customization") * { * IsVisible = false * }; * Categories["Customization"] = customBox; * TabSelector.AddItem("Customization"); * * GridLayout customBoxLayout = new GridLayout(GUI, customBox, 6, 5); * * List<string> assets = TextureManager.DefaultContent.Keys.ToList(); * * AssetManager assetManager = new AssetManager(GUI, customBoxLayout, assets); * customBoxLayout.SetComponentPosition(assetManager, 0, 0, 5, 6); */ Button apply = new Button(GUI, Layout, "Apply", GUI.DefaultFont, Button.ButtonMode.ToolButton, GUI.Skin.GetSpecialFrame(GUISkin.Tile.Check)); Layout.SetComponentPosition(apply, 5, 11, 1, 1); apply.OnClicked += apply_OnClicked; Button back = new Button(GUI, Layout, "Back", GUI.DefaultFont, Button.ButtonMode.ToolButton, GUI.Skin.GetSpecialFrame(GUISkin.Tile.LeftArrow)); Layout.SetComponentPosition(back, 4, 11, 1, 1); back.OnClicked += back_OnClicked; Layout.UpdateSizes(); TabSelector.UpdateSize(); TabSelector.SetTab("Graphics"); base.OnEnter(); }
public override void OnEnter() { DefaultFont = Game.Content.Load <SpriteFont>(ContentPaths.Fonts.Default); GUI = new DwarfGUI(Game, DefaultFont, Game.Content.Load <SpriteFont>(ContentPaths.Fonts.Title), Game.Content.Load <SpriteFont>(ContentPaths.Fonts.Small), Input); IsInitialized = true; Drawer = new Drawer2D(Game.Content, Game.GraphicsDevice); MainWindow = new Panel(GUI, GUI.RootComponent) { LocalBounds = new Rectangle(EdgePadding, EdgePadding, Game.GraphicsDevice.Viewport.Width - EdgePadding * 2, Game.GraphicsDevice.Viewport.Height - EdgePadding * 2) }; Layout = new GridLayout(GUI, MainWindow, 10, 6); Label label = new Label(GUI, Layout, "Options", GUI.TitleFont); Layout.SetComponentPosition(label, 0, 0, 1, 1); TabSelector = new TabSelector(GUI, Layout, 6); Layout.SetComponentPosition(TabSelector, 0, 1, 6, 8); TabSelector.Tab graphicsTab = TabSelector.AddTab("Graphics"); GroupBox graphicsBox = new GroupBox(GUI, graphicsTab, "Graphics") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Graphics"] = graphicsBox; CurrentBox = graphicsBox; GridLayout graphicsLayout = new GridLayout(GUI, graphicsBox, 6, 5); Label resolutionLabel = new Label(GUI, graphicsLayout, "Resolution", GUI.DefaultFont) { Alignment = Drawer2D.Alignment.Right }; ComboBox resolutionBox = new ComboBox(GUI, graphicsLayout) { ToolTip = "Sets the size of the screen.\nSmaller for higher framerates." }; foreach (DisplayMode mode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) { if (mode.Format != SurfaceFormat.Color) { continue; } if (mode.Width <= 640) { continue; } string s = mode.Width + " x " + mode.Height; DisplayModes[s] = mode; if (mode.Width == GameSettings.Default.ResolutionX && mode.Height == GameSettings.Default.ResolutionY) { resolutionBox.AddValue(s); resolutionBox.CurrentValue = s; } else { resolutionBox.AddValue(s); } } graphicsLayout.SetComponentPosition(resolutionLabel, 0, 0, 1, 1); graphicsLayout.SetComponentPosition(resolutionBox, 1, 0, 1, 1); resolutionBox.OnSelectionModified += resolutionBox_OnSelectionModified; Checkbox fullscreenCheck = new Checkbox(GUI, graphicsLayout, "Fullscreen", GUI.DefaultFont, GameSettings.Default.Fullscreen) { ToolTip = "If this is checked, the game takes up the whole screen." }; graphicsLayout.SetComponentPosition(fullscreenCheck, 0, 1, 1, 1); fullscreenCheck.OnCheckModified += fullscreenCheck_OnClicked; Label drawDistance = new Label(GUI, graphicsLayout, "Draw Distance", GUI.DefaultFont); Slider chunkDrawSlider = new Slider(GUI, graphicsLayout, "", GameSettings.Default.ChunkDrawDistance, 1, 1000, Slider.SliderMode.Integer) { ToolTip = "Maximum distance at which terrain will be drawn\nSmaller for faster." }; graphicsLayout.SetComponentPosition(drawDistance, 0, 2, 1, 1); graphicsLayout.SetComponentPosition(chunkDrawSlider, 1, 2, 1, 1); chunkDrawSlider.OnValueModified += ChunkDrawSlider_OnValueModified; Label cullDistance = new Label(GUI, graphicsLayout, "Cull Distance", GUI.DefaultFont); Slider cullSlider = new Slider(GUI, graphicsLayout, "", GameSettings.Default.VertexCullDistance, 0.1f, 1000, Slider.SliderMode.Integer) { ToolTip = "Maximum distance at which anything will be drawn\n Smaller for faster." }; cullSlider.OnValueModified += CullSlider_OnValueModified; graphicsLayout.SetComponentPosition(cullDistance, 0, 3, 1, 1); graphicsLayout.SetComponentPosition(cullSlider, 1, 3, 1, 1); Label generateDistance = new Label(GUI, graphicsLayout, "Generate Distance", GUI.DefaultFont); Slider generateSlider = new Slider(GUI, graphicsLayout, "", GameSettings.Default.ChunkGenerateDistance, 1, 1000, Slider.SliderMode.Integer) { ToolTip = "Maximum distance at which terrain will be generated." }; generateSlider.OnValueModified += GenerateSlider_OnValueModified; graphicsLayout.SetComponentPosition(generateDistance, 0, 4, 1, 1); graphicsLayout.SetComponentPosition(generateSlider, 1, 4, 1, 1); Checkbox glowBox = new Checkbox(GUI, graphicsLayout, "Enable Glow", GUI.DefaultFont, GameSettings.Default.EnableGlow) { ToolTip = "When checked, there will be a fullscreen glow effect." }; graphicsLayout.SetComponentPosition(glowBox, 1, 1, 1, 1); glowBox.OnCheckModified += glowBox_OnCheckModified; Label aaLabel = new Label(GUI, graphicsLayout, "Antialiasing", GUI.DefaultFont) { Alignment = Drawer2D.Alignment.Right }; ComboBox aaBox = new ComboBox(GUI, graphicsLayout) { ToolTip = "Determines how much antialiasing (smoothing) there is.\nHigher means more smooth, but is slower." }; aaBox.AddValue("None"); aaBox.AddValue("FXAA"); aaBox.AddValue("2x MSAA"); aaBox.AddValue("4x MSAA"); aaBox.AddValue("16x MSAA"); foreach (string s in AAModes.Keys.Where(s => AAModes[s] == GameSettings.Default.AntiAliasing)) { aaBox.CurrentValue = s; } aaBox.OnSelectionModified += AABox_OnSelectionModified; graphicsLayout.SetComponentPosition(aaLabel, 2, 0, 1, 1); graphicsLayout.SetComponentPosition(aaBox, 3, 0, 1, 1); Checkbox reflectTerrainBox = new Checkbox(GUI, graphicsLayout, "Reflect Chunks", GUI.DefaultFont, GameSettings.Default.DrawChunksReflected) { ToolTip = "When checked, water will reflect terrain." }; reflectTerrainBox.OnCheckModified += reflectTerrainBox_OnCheckModified; graphicsLayout.SetComponentPosition(reflectTerrainBox, 2, 1, 1, 1); Checkbox refractTerrainBox = new Checkbox(GUI, graphicsLayout, "Refract Chunks", GUI.DefaultFont, GameSettings.Default.DrawChunksRefracted) { ToolTip = "When checked, water will refract terrain." }; refractTerrainBox.OnCheckModified += refractTerrainBox_OnCheckModified; graphicsLayout.SetComponentPosition(refractTerrainBox, 2, 2, 1, 1); Checkbox reflectEntities = new Checkbox(GUI, graphicsLayout, "Reflect Entities", GUI.DefaultFont, GameSettings.Default.DrawEntityReflected) { ToolTip = "When checked, water will reflect trees, dwarves, etc." }; reflectEntities.OnCheckModified += reflectEntities_OnCheckModified; graphicsLayout.SetComponentPosition(reflectEntities, 3, 1, 1, 1); Checkbox refractEntities = new Checkbox(GUI, graphicsLayout, "Refract Entities", GUI.DefaultFont, GameSettings.Default.DrawEntityReflected) { ToolTip = "When checked, water will reflect trees, dwarves, etc." }; refractEntities.OnCheckModified += refractEntities_OnCheckModified; graphicsLayout.SetComponentPosition(refractEntities, 3, 2, 1, 1); Checkbox sunlight = new Checkbox(GUI, graphicsLayout, "Sunlight", GUI.DefaultFont, GameSettings.Default.CalculateSunlight) { ToolTip = "When checked, terrain will be lit/shadowed by the sun." }; sunlight.OnCheckModified += sunlight_OnCheckModified; graphicsLayout.SetComponentPosition(sunlight, 2, 3, 1, 1); Checkbox ao = new Checkbox(GUI, graphicsLayout, "Ambient Occlusion", GUI.DefaultFont, GameSettings.Default.AmbientOcclusion) { ToolTip = "When checked, terrain will smooth shading effects." }; ao.OnCheckModified += AO_OnCheckModified; graphicsLayout.SetComponentPosition(ao, 3, 3, 1, 1); Checkbox ramps = new Checkbox(GUI, graphicsLayout, "Ramps", GUI.DefaultFont, GameSettings.Default.CalculateRamps) { ToolTip = "When checked, some terrain will have smooth ramps." }; ramps.OnCheckModified += ramps_OnCheckModified; graphicsLayout.SetComponentPosition(ramps, 2, 4, 1, 1); Checkbox cursorLight = new Checkbox(GUI, graphicsLayout, "Cursor Light", GUI.DefaultFont, GameSettings.Default.CursorLightEnabled) { ToolTip = "When checked, a light will follow the player cursor." }; cursorLight.OnCheckModified += cursorLight_OnCheckModified; graphicsLayout.SetComponentPosition(cursorLight, 2, 5, 1, 1); Checkbox entityLight = new Checkbox(GUI, graphicsLayout, "Entity Lighting", GUI.DefaultFont, GameSettings.Default.EntityLighting) { ToolTip = "When checked, dwarves, objects, etc. will be lit\nby the sun, lamps, etc." }; entityLight.OnCheckModified += entityLight_OnCheckModified; graphicsLayout.SetComponentPosition(entityLight, 3, 4, 1, 1); Checkbox selfIllum = new Checkbox(GUI, graphicsLayout, "Ore Glow", GUI.DefaultFont, GameSettings.Default.SelfIlluminationEnabled) { ToolTip = "When checked, some terrain elements will glow." }; selfIllum.OnCheckModified += selfIllum_OnCheckModified; graphicsLayout.SetComponentPosition(selfIllum, 3, 5, 1, 1); Checkbox particlePhysics = new Checkbox(GUI, graphicsLayout, "Particle Body", GUI.DefaultFont, GameSettings.Default.ParticlePhysics) { ToolTip = "When checked, some particles will bounce off terrain." }; particlePhysics.OnCheckModified += particlePhysics_OnCheckModified; graphicsLayout.SetComponentPosition(particlePhysics, 0, 5, 1, 1); TabSelector.Tab graphics2Tab = TabSelector.AddTab("Graphics II"); GroupBox graphicsBox2 = new GroupBox(GUI, graphics2Tab, "Graphics II") { HeightSizeMode = GUIComponent.SizeMode.Fit, WidthSizeMode = GUIComponent.SizeMode.Fit }; Categories["Graphics II"] = graphicsBox2; GridLayout graphicsLayout2 = new GridLayout(GUI, graphicsBox2, 6, 5); Checkbox moteBox = new Checkbox(GUI, graphicsLayout2, "Generate Motes", GUI.DefaultFont, GameSettings.Default.GrassMotes) { ToolTip = "When checked, trees, grass, etc. will be visible." }; moteBox.OnCheckModified += MoteBox_OnCheckModified; graphicsLayout2.SetComponentPosition(moteBox, 1, 2, 1, 1); Label numMotes = new Label(GUI, graphicsLayout2, "Num Motes", GUI.DefaultFont); Slider motesSlider = new Slider(GUI, graphicsLayout2, "", (int)(GameSettings.Default.NumMotes * 100), 0, 1000, Slider.SliderMode.Integer) { ToolTip = "Determines the maximum amount of trees/grass that will be visible." }; graphicsLayout2.SetComponentPosition(numMotes, 0, 1, 1, 1); graphicsLayout2.SetComponentPosition(motesSlider, 1, 1, 1, 1); motesSlider.OnValueModified += MotesSlider_OnValueModified; TabSelector.Tab gameplayTab = TabSelector.AddTab("Gameplay"); GroupBox gameplayBox = new GroupBox(GUI, gameplayTab, "Gameplay") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Gameplay"] = gameplayBox; GridLayout gameplayLayout = new GridLayout(GUI, gameplayBox, 6, 5); Label moveSpeedLabel = new Label(GUI, gameplayLayout, "Camera Move Speed", GUI.DefaultFont); Slider moveSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.CameraScrollSpeed, 0.0f, 20.0f, Slider.SliderMode.Float) { ToolTip = "Determines how fast the camera will move when keys are pressed." }; gameplayLayout.SetComponentPosition(moveSpeedLabel, 0, 0, 1, 1); gameplayLayout.SetComponentPosition(moveSlider, 1, 0, 1, 1); moveSlider.OnValueModified += MoveSlider_OnValueModified; Label zoomSpeedLabel = new Label(GUI, gameplayLayout, "Zoom Speed", GUI.DefaultFont); Slider zoomSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.CameraZoomSpeed, 0.0f, 2.0f, Slider.SliderMode.Float) { ToolTip = "Determines how fast the camera will go\nup and down with the scroll wheel." }; gameplayLayout.SetComponentPosition(zoomSpeedLabel, 0, 1, 1, 1); gameplayLayout.SetComponentPosition(zoomSlider, 1, 1, 1, 1); zoomSlider.OnValueModified += ZoomSlider_OnValueModified; Checkbox invertZoomBox = new Checkbox(GUI, gameplayLayout, "Invert Zoom", GUI.DefaultFont, GameSettings.Default.InvertZoom) { ToolTip = "When checked, the scroll wheel is reversed\nfor zooming." }; gameplayLayout.SetComponentPosition(invertZoomBox, 2, 1, 1, 1); invertZoomBox.OnCheckModified += InvertZoomBox_OnCheckModified; Checkbox edgeScrollBox = new Checkbox(GUI, gameplayLayout, "Edge Scrolling", GUI.DefaultFont, GameSettings.Default.EnableEdgeScroll) { ToolTip = "When checked, the camera will scroll\nwhen the cursor is at the edge of the screen." }; gameplayLayout.SetComponentPosition(edgeScrollBox, 0, 2, 1, 1); edgeScrollBox.OnCheckModified += EdgeScrollBox_OnCheckModified; Checkbox introBox = new Checkbox(GUI, gameplayLayout, "Play Intro", GUI.DefaultFont, GameSettings.Default.DisplayIntro) { ToolTip = "When checked, the intro will be played when the game starts" }; gameplayLayout.SetComponentPosition(introBox, 1, 2, 1, 1); introBox.OnCheckModified += IntroBox_OnCheckModified; Checkbox fogOfWarBox = new Checkbox(GUI, gameplayLayout, "Fog of War", GUI.DefaultFont, GameSettings.Default.FogofWar) { ToolTip = "When checked, unexplored blocks will be blacked out" }; gameplayLayout.SetComponentPosition(fogOfWarBox, 2, 2, 1, 1); fogOfWarBox.OnCheckModified += fogOfWarBox_OnCheckModified; /* * Label chunkWidthLabel = new Label(GUI, gameplayLayout, "Chunk Width", GUI.DefaultFont); * Slider chunkWidthSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.ChunkWidth, 4, 256, Slider.SliderMode.Integer) * { * ToolTip = "Determines the number of blocks in a chunk of terrain." * }; * * gameplayLayout.SetComponentPosition(chunkWidthLabel, 0, 3, 1, 1); * gameplayLayout.SetComponentPosition(chunkWidthSlider, 1, 3, 1, 1); * chunkWidthSlider.OnValueModified += ChunkWidthSlider_OnValueModified; * * Label chunkHeightLabel = new Label(GUI, gameplayLayout, "Chunk Height", GUI.DefaultFont); * Slider chunkHeightSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.ChunkHeight, 4, 256, Slider.SliderMode.Integer) * { * ToolTip = "Determines the maximum depth,\nin blocks, of a chunk of terrain." * }; * * gameplayLayout.SetComponentPosition(chunkHeightLabel, 2, 3, 1, 1); * gameplayLayout.SetComponentPosition(chunkHeightSlider, 3, 3, 1, 1); * * * chunkHeightSlider.OnValueModified += ChunkHeightSlider_OnValueModified; * * Label worldWidthLabel = new Label(GUI, gameplayLayout, "World Width", GUI.DefaultFont); * Slider worldWidthSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldWidth, 4, 2048, Slider.SliderMode.Integer) * { * ToolTip = "Determines the size of the overworld." * }; * * gameplayLayout.SetComponentPosition(worldWidthLabel, 0, 4, 1, 1); * gameplayLayout.SetComponentPosition(worldWidthSlider, 1, 4, 1, 1); * worldWidthSlider.OnValueModified += WorldWidthSlider_OnValueModified; * * Label worldHeightLabel = new Label(GUI, gameplayLayout, "World Height", GUI.DefaultFont); * Slider worldHeightSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldHeight, 4, 2048, Slider.SliderMode.Integer) * { * ToolTip = "Determines the size of the overworld." * }; * * gameplayLayout.SetComponentPosition(worldHeightLabel, 2, 4, 1, 1); * gameplayLayout.SetComponentPosition(worldHeightSlider, 3, 4, 1, 1); * worldHeightSlider.OnValueModified += WorldHeightSlider_OnValueModified; * * * Label worldScaleLabel = new Label(GUI, gameplayLayout, "World Scale", GUI.DefaultFont); * Slider worldScaleSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldScale, 2, 128, Slider.SliderMode.Integer) * { * ToolTip = "Determines the number of voxel\nper pixel of the overworld" * }; * * gameplayLayout.SetComponentPosition(worldScaleLabel, 0, 5, 1, 1); * gameplayLayout.SetComponentPosition(worldScaleSlider, 1, 5, 1, 1); * worldScaleSlider.OnValueModified += WorldScaleSlider_OnValueModified; */ TabSelector.Tab audioTab = TabSelector.AddTab("Audio"); GroupBox audioBox = new GroupBox(GUI, audioTab, "Audio") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Audio"] = audioBox; GridLayout audioLayout = new GridLayout(GUI, audioBox, 6, 5); Label masterLabel = new Label(GUI, audioLayout, "Master Volume", GUI.DefaultFont); Slider masterSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.MasterVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(masterLabel, 0, 0, 1, 1); audioLayout.SetComponentPosition(masterSlider, 1, 0, 1, 1); masterSlider.OnValueModified += MasterSlider_OnValueModified; Label sfxLabel = new Label(GUI, audioLayout, "SFX Volume", GUI.DefaultFont); Slider sfxSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.SoundEffectVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(sfxLabel, 0, 1, 1, 1); audioLayout.SetComponentPosition(sfxSlider, 1, 1, 1, 1); sfxSlider.OnValueModified += SFXSlider_OnValueModified; Label musicLabel = new Label(GUI, audioLayout, "Music Volume", GUI.DefaultFont); Slider musicSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.MusicVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(musicLabel, 0, 2, 1, 1); audioLayout.SetComponentPosition(musicSlider, 1, 2, 1, 1); musicSlider.OnValueModified += MusicSlider_OnValueModified; TabSelector.Tab keysTab = TabSelector.AddTab("Keys"); GroupBox keysBox = new GroupBox(GUI, keysTab, "Keys") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Keys"] = keysBox; KeyEditor keyeditor = new KeyEditor(GUI, keysBox, new KeyManager(), 8, 4); GridLayout keyLayout = new GridLayout(GUI, keysBox, 1, 1); keyLayout.SetComponentPosition(keyeditor, 0, 0, 1, 1); keyLayout.UpdateSizes(); keyeditor.UpdateLayout(); /* * GroupBox customBox = new GroupBox(GUI, Layout, "Customization") * { * IsVisible = false * }; * Categories["Customization"] = customBox; * TabSelector.AddItem("Customization"); * * GridLayout customBoxLayout = new GridLayout(GUI, customBox, 6, 5); * * List<string> assets = TextureManager.DefaultContent.Keys.ToList(); * * AssetManager assetManager = new AssetManager(GUI, customBoxLayout, assets); * customBoxLayout.SetComponentPosition(assetManager, 0, 0, 5, 6); */ Button apply = new Button(GUI, Layout, "Apply", GUI.DefaultFont, Button.ButtonMode.ToolButton, GUI.Skin.GetSpecialFrame(GUISkin.Tile.Check)); Layout.SetComponentPosition(apply, 5, 9, 1, 1); apply.OnClicked += apply_OnClicked; Button back = new Button(GUI, Layout, "Back", GUI.DefaultFont, Button.ButtonMode.ToolButton, GUI.Skin.GetSpecialFrame(GUISkin.Tile.LeftArrow)); Layout.SetComponentPosition(back, 4, 9, 1, 1); back.OnClicked += back_OnClicked; Layout.UpdateSizes(); TabSelector.UpdateSize(); TabSelector.SetTab("Graphics"); base.OnEnter(); }
public override void OnEnter() { DefaultFont = Game.Content.Load<SpriteFont>(ContentPaths.Fonts.Default); GUI = new DwarfGUI(Game, DefaultFont, Game.Content.Load<SpriteFont>(ContentPaths.Fonts.Title), Game.Content.Load<SpriteFont>(ContentPaths.Fonts.Small), Input); IsInitialized = true; Drawer = new Drawer2D(Game.Content, Game.GraphicsDevice); MainWindow = new Panel(GUI, GUI.RootComponent) { LocalBounds = new Rectangle(EdgePadding, EdgePadding, Game.GraphicsDevice.Viewport.Width - EdgePadding * 2, Game.GraphicsDevice.Viewport.Height - EdgePadding * 2) }; Layout = new GridLayout(GUI, MainWindow, 10, 6); Label label = new Label(GUI, Layout, "Options", GUI.TitleFont); Layout.SetComponentPosition(label, 0, 0, 1, 1); TabSelector = new TabSelector(GUI, Layout, 6); Layout.SetComponentPosition(TabSelector, 0, 1, 6, 8); TabSelector.Tab graphicsTab = TabSelector.AddTab("Graphics"); GroupBox graphicsBox = new GroupBox(GUI, graphicsTab, "Graphics") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Graphics"] = graphicsBox; CurrentBox = graphicsBox; GridLayout graphicsLayout = new GridLayout(GUI, graphicsBox, 6, 5); Label resolutionLabel = new Label(GUI, graphicsLayout, "Resolution", GUI.DefaultFont) { Alignment = Drawer2D.Alignment.Right }; ComboBox resolutionBox = new ComboBox(GUI, graphicsLayout) { ToolTip = "Sets the size of the screen.\nSmaller for higher framerates." }; foreach(DisplayMode mode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) { if(mode.Format != SurfaceFormat.Color) { continue; } if (mode.Width <= 640) continue; string s = mode.Width + " x " + mode.Height; DisplayModes[s] = mode; if(mode.Width == GameSettings.Default.ResolutionX && mode.Height == GameSettings.Default.ResolutionY) { resolutionBox.AddValue(s); resolutionBox.CurrentValue = s; } else { resolutionBox.AddValue(s); } } graphicsLayout.SetComponentPosition(resolutionLabel, 0, 0, 1, 1); graphicsLayout.SetComponentPosition(resolutionBox, 1, 0, 1, 1); resolutionBox.OnSelectionModified += resolutionBox_OnSelectionModified; Checkbox fullscreenCheck = new Checkbox(GUI, graphicsLayout, "Fullscreen", GUI.DefaultFont, GameSettings.Default.Fullscreen) { ToolTip = "If this is checked, the game takes up the whole screen." }; graphicsLayout.SetComponentPosition(fullscreenCheck, 0, 1, 1, 1); fullscreenCheck.OnCheckModified += fullscreenCheck_OnClicked; Label drawDistance = new Label(GUI, graphicsLayout, "Draw Distance", GUI.DefaultFont); Slider chunkDrawSlider = new Slider(GUI, graphicsLayout, "", GameSettings.Default.ChunkDrawDistance, 1, 1000, Slider.SliderMode.Integer) { ToolTip = "Maximum distance at which terrain will be drawn\nSmaller for faster." }; graphicsLayout.SetComponentPosition(drawDistance, 0, 2, 1, 1); graphicsLayout.SetComponentPosition(chunkDrawSlider, 1, 2, 1, 1); chunkDrawSlider.OnValueModified += ChunkDrawSlider_OnValueModified; Label cullDistance = new Label(GUI, graphicsLayout, "Cull Distance", GUI.DefaultFont); Slider cullSlider = new Slider(GUI, graphicsLayout, "", GameSettings.Default.VertexCullDistance, 0.1f, 1000, Slider.SliderMode.Integer) { ToolTip = "Maximum distance at which anything will be drawn\n Smaller for faster." }; cullSlider.OnValueModified += CullSlider_OnValueModified; graphicsLayout.SetComponentPosition(cullDistance, 0, 3, 1, 1); graphicsLayout.SetComponentPosition(cullSlider, 1, 3, 1, 1); Label generateDistance = new Label(GUI, graphicsLayout, "Generate Distance", GUI.DefaultFont); Slider generateSlider = new Slider(GUI, graphicsLayout, "", GameSettings.Default.ChunkGenerateDistance, 1, 1000, Slider.SliderMode.Integer) { ToolTip = "Maximum distance at which terrain will be generated." }; generateSlider.OnValueModified += GenerateSlider_OnValueModified; graphicsLayout.SetComponentPosition(generateDistance, 0, 4, 1, 1); graphicsLayout.SetComponentPosition(generateSlider, 1, 4, 1, 1); Checkbox glowBox = new Checkbox(GUI, graphicsLayout, "Enable Glow", GUI.DefaultFont, GameSettings.Default.EnableGlow) { ToolTip = "When checked, there will be a fullscreen glow effect." }; graphicsLayout.SetComponentPosition(glowBox, 1, 1, 1, 1); glowBox.OnCheckModified += glowBox_OnCheckModified; Label aaLabel = new Label(GUI, graphicsLayout, "Antialiasing", GUI.DefaultFont) { Alignment = Drawer2D.Alignment.Right }; ComboBox aaBox = new ComboBox(GUI, graphicsLayout) { ToolTip = "Determines how much antialiasing (smoothing) there is.\nHigher means more smooth, but is slower." }; aaBox.AddValue("None"); aaBox.AddValue("FXAA"); aaBox.AddValue("2x MSAA"); aaBox.AddValue("4x MSAA"); aaBox.AddValue("16x MSAA"); foreach(string s in AAModes.Keys.Where(s => AAModes[s] == GameSettings.Default.AntiAliasing)) { aaBox.CurrentValue = s; } aaBox.OnSelectionModified += AABox_OnSelectionModified; graphicsLayout.SetComponentPosition(aaLabel, 2, 0, 1, 1); graphicsLayout.SetComponentPosition(aaBox, 3, 0, 1, 1); Checkbox reflectTerrainBox = new Checkbox(GUI, graphicsLayout, "Reflect Chunks", GUI.DefaultFont, GameSettings.Default.DrawChunksReflected) { ToolTip = "When checked, water will reflect terrain." }; reflectTerrainBox.OnCheckModified += reflectTerrainBox_OnCheckModified; graphicsLayout.SetComponentPosition(reflectTerrainBox, 2, 1, 1, 1); Checkbox refractTerrainBox = new Checkbox(GUI, graphicsLayout, "Refract Chunks", GUI.DefaultFont, GameSettings.Default.DrawChunksRefracted) { ToolTip = "When checked, water will refract terrain." }; refractTerrainBox.OnCheckModified += refractTerrainBox_OnCheckModified; graphicsLayout.SetComponentPosition(refractTerrainBox, 2, 2, 1, 1); Checkbox reflectEntities = new Checkbox(GUI, graphicsLayout, "Reflect Entities", GUI.DefaultFont, GameSettings.Default.DrawEntityReflected) { ToolTip = "When checked, water will reflect trees, dwarves, etc." }; reflectEntities.OnCheckModified += reflectEntities_OnCheckModified; graphicsLayout.SetComponentPosition(reflectEntities, 3, 1, 1, 1); Checkbox refractEntities = new Checkbox(GUI, graphicsLayout, "Refract Entities", GUI.DefaultFont, GameSettings.Default.DrawEntityReflected) { ToolTip = "When checked, water will reflect trees, dwarves, etc." }; refractEntities.OnCheckModified += refractEntities_OnCheckModified; graphicsLayout.SetComponentPosition(refractEntities, 3, 2, 1, 1); Checkbox sunlight = new Checkbox(GUI, graphicsLayout, "Sunlight", GUI.DefaultFont, GameSettings.Default.CalculateSunlight) { ToolTip = "When checked, terrain will be lit/shadowed by the sun." }; sunlight.OnCheckModified += sunlight_OnCheckModified; graphicsLayout.SetComponentPosition(sunlight, 2, 3, 1, 1); Checkbox ao = new Checkbox(GUI, graphicsLayout, "Ambient Occlusion", GUI.DefaultFont, GameSettings.Default.AmbientOcclusion) { ToolTip = "When checked, terrain will smooth shading effects." }; ao.OnCheckModified += AO_OnCheckModified; graphicsLayout.SetComponentPosition(ao, 3, 3, 1, 1); Checkbox ramps = new Checkbox(GUI, graphicsLayout, "Ramps", GUI.DefaultFont, GameSettings.Default.CalculateRamps) { ToolTip = "When checked, some terrain will have smooth ramps." }; ramps.OnCheckModified += ramps_OnCheckModified; graphicsLayout.SetComponentPosition(ramps, 2, 4, 1, 1); Checkbox cursorLight = new Checkbox(GUI, graphicsLayout, "Cursor Light", GUI.DefaultFont, GameSettings.Default.CursorLightEnabled) { ToolTip = "When checked, a light will follow the player cursor." }; cursorLight.OnCheckModified += cursorLight_OnCheckModified; graphicsLayout.SetComponentPosition(cursorLight, 2, 5, 1, 1); Checkbox entityLight = new Checkbox(GUI, graphicsLayout, "Entity Lighting", GUI.DefaultFont, GameSettings.Default.EntityLighting) { ToolTip = "When checked, dwarves, objects, etc. will be lit\nby the sun, lamps, etc." }; entityLight.OnCheckModified += entityLight_OnCheckModified; graphicsLayout.SetComponentPosition(entityLight, 3, 4, 1, 1); Checkbox selfIllum = new Checkbox(GUI, graphicsLayout, "Ore Glow", GUI.DefaultFont, GameSettings.Default.SelfIlluminationEnabled) { ToolTip = "When checked, some terrain elements will glow." }; selfIllum.OnCheckModified += selfIllum_OnCheckModified; graphicsLayout.SetComponentPosition(selfIllum, 3, 5, 1, 1); Checkbox particlePhysics = new Checkbox(GUI, graphicsLayout, "Particle Body", GUI.DefaultFont, GameSettings.Default.ParticlePhysics) { ToolTip = "When checked, some particles will bounce off terrain." }; particlePhysics.OnCheckModified += particlePhysics_OnCheckModified; graphicsLayout.SetComponentPosition(particlePhysics, 0, 5, 1, 1); TabSelector.Tab graphics2Tab = TabSelector.AddTab("Graphics II"); GroupBox graphicsBox2 = new GroupBox(GUI, graphics2Tab, "Graphics II") { HeightSizeMode = GUIComponent.SizeMode.Fit, WidthSizeMode = GUIComponent.SizeMode.Fit }; Categories["Graphics II"] = graphicsBox2; GridLayout graphicsLayout2 = new GridLayout(GUI, graphicsBox2, 6, 5); Checkbox moteBox = new Checkbox(GUI, graphicsLayout2, "Generate Motes", GUI.DefaultFont, GameSettings.Default.GrassMotes) { ToolTip = "When checked, trees, grass, etc. will be visible." }; moteBox.OnCheckModified += MoteBox_OnCheckModified; graphicsLayout2.SetComponentPosition(moteBox, 1, 2, 1, 1); Label numMotes = new Label(GUI, graphicsLayout2, "Num Motes", GUI.DefaultFont); Slider motesSlider = new Slider(GUI, graphicsLayout2, "", (int) (GameSettings.Default.NumMotes * 100), 0, 1000, Slider.SliderMode.Integer) { ToolTip = "Determines the maximum amount of trees/grass that will be visible." }; graphicsLayout2.SetComponentPosition(numMotes, 0, 1, 1, 1); graphicsLayout2.SetComponentPosition(motesSlider, 1, 1, 1, 1); motesSlider.OnValueModified += MotesSlider_OnValueModified; TabSelector.Tab gameplayTab = TabSelector.AddTab("Gameplay"); GroupBox gameplayBox = new GroupBox(GUI, gameplayTab, "Gameplay") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Gameplay"] = gameplayBox; GridLayout gameplayLayout = new GridLayout(GUI, gameplayBox, 6, 5); Label moveSpeedLabel = new Label(GUI, gameplayLayout, "Camera Move Speed", GUI.DefaultFont); Slider moveSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.CameraScrollSpeed, 0.0f, 20.0f, Slider.SliderMode.Float) { ToolTip = "Determines how fast the camera will move when keys are pressed." }; gameplayLayout.SetComponentPosition(moveSpeedLabel, 0, 0, 1, 1); gameplayLayout.SetComponentPosition(moveSlider, 1, 0, 1, 1); moveSlider.OnValueModified += MoveSlider_OnValueModified; Label zoomSpeedLabel = new Label(GUI, gameplayLayout, "Zoom Speed", GUI.DefaultFont); Slider zoomSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.CameraZoomSpeed, 0.0f, 2.0f, Slider.SliderMode.Float) { ToolTip = "Determines how fast the camera will go\nup and down with the scroll wheel." }; gameplayLayout.SetComponentPosition(zoomSpeedLabel, 0, 1, 1, 1); gameplayLayout.SetComponentPosition(zoomSlider, 1, 1, 1, 1); zoomSlider.OnValueModified += ZoomSlider_OnValueModified; Checkbox invertZoomBox = new Checkbox(GUI, gameplayLayout, "Invert Zoom", GUI.DefaultFont, GameSettings.Default.InvertZoom) { ToolTip = "When checked, the scroll wheel is reversed\nfor zooming." }; gameplayLayout.SetComponentPosition(invertZoomBox, 2, 1, 1, 1); invertZoomBox.OnCheckModified += InvertZoomBox_OnCheckModified; Checkbox edgeScrollBox = new Checkbox(GUI, gameplayLayout, "Edge Scrolling", GUI.DefaultFont, GameSettings.Default.EnableEdgeScroll) { ToolTip = "When checked, the camera will scroll\nwhen the cursor is at the edge of the screen." }; gameplayLayout.SetComponentPosition(edgeScrollBox, 0, 2, 1, 1); edgeScrollBox.OnCheckModified += EdgeScrollBox_OnCheckModified; Checkbox introBox = new Checkbox(GUI, gameplayLayout, "Play Intro", GUI.DefaultFont, GameSettings.Default.DisplayIntro) { ToolTip = "When checked, the intro will be played when the game starts" }; gameplayLayout.SetComponentPosition(introBox, 1, 2, 1, 1); introBox.OnCheckModified += IntroBox_OnCheckModified; Checkbox fogOfWarBox = new Checkbox(GUI, gameplayLayout, "Fog of War", GUI.DefaultFont, GameSettings.Default.FogofWar) { ToolTip = "When checked, unexplored blocks will be blacked out" }; gameplayLayout.SetComponentPosition(fogOfWarBox, 2, 2, 1, 1); fogOfWarBox.OnCheckModified += fogOfWarBox_OnCheckModified; /* Label chunkWidthLabel = new Label(GUI, gameplayLayout, "Chunk Width", GUI.DefaultFont); Slider chunkWidthSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.ChunkWidth, 4, 256, Slider.SliderMode.Integer) { ToolTip = "Determines the number of blocks in a chunk of terrain." }; gameplayLayout.SetComponentPosition(chunkWidthLabel, 0, 3, 1, 1); gameplayLayout.SetComponentPosition(chunkWidthSlider, 1, 3, 1, 1); chunkWidthSlider.OnValueModified += ChunkWidthSlider_OnValueModified; Label chunkHeightLabel = new Label(GUI, gameplayLayout, "Chunk Height", GUI.DefaultFont); Slider chunkHeightSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.ChunkHeight, 4, 256, Slider.SliderMode.Integer) { ToolTip = "Determines the maximum depth,\nin blocks, of a chunk of terrain." }; gameplayLayout.SetComponentPosition(chunkHeightLabel, 2, 3, 1, 1); gameplayLayout.SetComponentPosition(chunkHeightSlider, 3, 3, 1, 1); chunkHeightSlider.OnValueModified += ChunkHeightSlider_OnValueModified; Label worldWidthLabel = new Label(GUI, gameplayLayout, "World Width", GUI.DefaultFont); Slider worldWidthSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldWidth, 4, 2048, Slider.SliderMode.Integer) { ToolTip = "Determines the size of the overworld." }; gameplayLayout.SetComponentPosition(worldWidthLabel, 0, 4, 1, 1); gameplayLayout.SetComponentPosition(worldWidthSlider, 1, 4, 1, 1); worldWidthSlider.OnValueModified += WorldWidthSlider_OnValueModified; Label worldHeightLabel = new Label(GUI, gameplayLayout, "World Height", GUI.DefaultFont); Slider worldHeightSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldHeight, 4, 2048, Slider.SliderMode.Integer) { ToolTip = "Determines the size of the overworld." }; gameplayLayout.SetComponentPosition(worldHeightLabel, 2, 4, 1, 1); gameplayLayout.SetComponentPosition(worldHeightSlider, 3, 4, 1, 1); worldHeightSlider.OnValueModified += WorldHeightSlider_OnValueModified; Label worldScaleLabel = new Label(GUI, gameplayLayout, "World Scale", GUI.DefaultFont); Slider worldScaleSlider = new Slider(GUI, gameplayLayout, "", GameSettings.Default.WorldScale, 2, 128, Slider.SliderMode.Integer) { ToolTip = "Determines the number of voxel\nper pixel of the overworld" }; gameplayLayout.SetComponentPosition(worldScaleLabel, 0, 5, 1, 1); gameplayLayout.SetComponentPosition(worldScaleSlider, 1, 5, 1, 1); worldScaleSlider.OnValueModified += WorldScaleSlider_OnValueModified; */ TabSelector.Tab audioTab = TabSelector.AddTab("Audio"); GroupBox audioBox = new GroupBox(GUI, audioTab, "Audio") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Audio"] = audioBox; GridLayout audioLayout = new GridLayout(GUI, audioBox, 6, 5); Label masterLabel = new Label(GUI, audioLayout, "Master Volume", GUI.DefaultFont); Slider masterSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.MasterVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(masterLabel, 0, 0, 1, 1); audioLayout.SetComponentPosition(masterSlider, 1, 0, 1, 1); masterSlider.OnValueModified += MasterSlider_OnValueModified; Label sfxLabel = new Label(GUI, audioLayout, "SFX Volume", GUI.DefaultFont); Slider sfxSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.SoundEffectVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(sfxLabel, 0, 1, 1, 1); audioLayout.SetComponentPosition(sfxSlider, 1, 1, 1, 1); sfxSlider.OnValueModified += SFXSlider_OnValueModified; Label musicLabel = new Label(GUI, audioLayout, "Music Volume", GUI.DefaultFont); Slider musicSlider = new Slider(GUI, audioLayout, "", GameSettings.Default.MusicVolume, 0.0f, 1.0f, Slider.SliderMode.Float); audioLayout.SetComponentPosition(musicLabel, 0, 2, 1, 1); audioLayout.SetComponentPosition(musicSlider, 1, 2, 1, 1); musicSlider.OnValueModified += MusicSlider_OnValueModified; TabSelector.Tab keysTab = TabSelector.AddTab("Keys"); GroupBox keysBox = new GroupBox(GUI, keysTab, "Keys") { WidthSizeMode = GUIComponent.SizeMode.Fit, HeightSizeMode = GUIComponent.SizeMode.Fit }; Categories["Keys"] = keysBox; KeyEditor keyeditor = new KeyEditor(GUI, keysBox, new KeyManager(), 8, 4); GridLayout keyLayout = new GridLayout(GUI, keysBox, 1, 1); keyLayout.SetComponentPosition(keyeditor, 0, 0, 1, 1); keyLayout.UpdateSizes(); keyeditor.UpdateLayout(); /* GroupBox customBox = new GroupBox(GUI, Layout, "Customization") { IsVisible = false }; Categories["Customization"] = customBox; TabSelector.AddItem("Customization"); GridLayout customBoxLayout = new GridLayout(GUI, customBox, 6, 5); List<string> assets = TextureManager.DefaultContent.Keys.ToList(); AssetManager assetManager = new AssetManager(GUI, customBoxLayout, assets); customBoxLayout.SetComponentPosition(assetManager, 0, 0, 5, 6); */ Button apply = new Button(GUI, Layout, "Apply", GUI.DefaultFont, Button.ButtonMode.ToolButton, GUI.Skin.GetSpecialFrame(GUISkin.Tile.Check)); Layout.SetComponentPosition(apply, 5, 9, 1, 1); apply.OnClicked += apply_OnClicked; Button back = new Button(GUI, Layout, "Back", GUI.DefaultFont, Button.ButtonMode.ToolButton, GUI.Skin.GetSpecialFrame(GUISkin.Tile.LeftArrow)); Layout.SetComponentPosition(back, 4, 9, 1, 1); back.OnClicked += back_OnClicked; Layout.UpdateSizes(); TabSelector.UpdateSize(); TabSelector.SetTab("Graphics"); base.OnEnter(); }
public static void InitEditorWindow(Object obj) { currentEditor = (KeyEditor)EditorWindow.GetWindow <KeyEditor>(); currentEditor.instanceId = obj.GetInstanceID(); currentEditor.title = "Key Editor"; }
public override void OnInspectorGUI() { GUI.changed = false; //DrawDefaultInspector(); DialogueReader reader = (DialogueReader)target; reader.show[0] = EditorGUILayout.Foldout(reader.show[0], "General Settings"); if (reader.show[0]) { EditorGUI.indentLevel++; reader.mainTexture = (Texture2D)EditorGUILayout.ObjectField("Main Texture: ", reader.mainTexture, typeof(Texture2D), true); reader.widthStyle = (DialogueReader.SizeStyle)EditorGUILayout.EnumPopup("Width Style: ", reader.widthStyle); reader.heightStyle = (DialogueReader.SizeStyle)EditorGUILayout.EnumPopup("Height Style: ", reader.heightStyle); reader.nodeSize = EditorGUILayout.Vector2Field("Size: ", reader.nodeSize); reader.nodeBorder = EditorGUILayout.Vector2Field("Border: ", reader.nodeBorder); reader.defaultPosition = EditorGUILayout.Vector2Field("Default Position: ", reader.defaultPosition); reader.stickToEdges = EditorGUILayout.Toggle("Stick to Edges: ", reader.stickToEdges); EditorGUI.indentLevel--; } reader.show[1] = EditorGUILayout.Foldout(reader.show[1], "Content Settings"); if (reader.show[1]) { EditorGUI.indentLevel++; reader.displayName = EditorGUILayout.Toggle("Display Name: ", reader.displayName); reader.displayImage = EditorGUILayout.Toggle("Display Image: ", reader.displayImage); reader.imageSize = EditorGUILayout.IntField("Image Size: ", reader.imageSize); reader.textIndent = EditorGUILayout.IntField("Text Indent: ", reader.textIndent); reader.optionIndent = EditorGUILayout.IntField("Option Indent: ", reader.optionIndent); reader.alignment = (TextAnchor)EditorGUILayout.EnumPopup("Alignment: ", reader.alignment); reader.font = (Font)EditorGUILayout.ObjectField("Font: ", reader.font, typeof(Font), true); reader.fontColor = EditorGUILayout.ColorField("Font Color: ", reader.fontColor); reader.fontSize = EditorGUILayout.IntField("Font Size: ", reader.fontSize); EditorGUI.indentLevel--; } reader.show[2] = EditorGUILayout.Foldout(reader.show[2], "Highlight Settings"); if (reader.show[2]) { EditorGUI.indentLevel++; reader.highlightTexture = (Texture2D)EditorGUILayout.ObjectField("Highlight Texture: ", reader.highlightTexture, typeof(Texture2D), true); reader.stretchTexture = EditorGUILayout.Toggle("Stretch Texture: ", reader.stretchTexture); reader.highlightFontColor = EditorGUILayout.ColorField("Font Color: ", reader.highlightFontColor); EditorGUI.indentLevel--; } reader.show[3] = EditorGUILayout.Foldout(reader.show[3], "Extra Settings"); if (reader.show[3]) { EditorGUI.indentLevel++; reader.extraTexture = (Texture2D)EditorGUILayout.ObjectField("Extra Texture: ", reader.extraTexture, typeof(Texture2D), true); reader.extraSize = EditorGUILayout.Vector2Field("Extra Size: ", reader.extraSize); reader.extraPosition = EditorGUILayout.Vector2Field("Extra Offset: ", reader.extraPosition); EditorGUI.indentLevel--; } reader.show[4] = EditorGUILayout.Foldout(reader.show[4], "Sound Settings"); if (reader.show[4]) { EditorGUI.indentLevel++; reader.openNoise = (AudioClip)EditorGUILayout.ObjectField("Open Noise: ", reader.openNoise, typeof(AudioClip), true); reader.closeNoise = (AudioClip)EditorGUILayout.ObjectField("Close Noise: ", reader.closeNoise, typeof(AudioClip), true); reader.nextNoise = (AudioClip)EditorGUILayout.ObjectField("Next Noise: ", reader.nextNoise, typeof(AudioClip), true); reader.optionNoise = (AudioClip)EditorGUILayout.ObjectField("Option Noise: ", reader.optionNoise, typeof(AudioClip), true); EditorGUI.indentLevel--; } reader.show[5] = EditorGUILayout.Foldout(reader.show[5], "Demo Settings"); if (reader.show[5]) { EditorGUI.indentLevel++; reader.demo = EditorGUILayout.Toggle("Demo: ", reader.demo); reader.demoTalkDistance = EditorGUILayout.FloatField("Demo Talk Distance: ", reader.demoTalkDistance); reader.demoTalkWidth = EditorGUILayout.FloatField("Demo Talk Width: ", reader.demoTalkWidth); reader.demoGUIText = (GUIText)EditorGUILayout.ObjectField("Demo GUIText: ", reader.demoGUIText, typeof(GUIText), true); reader.demoGUIColor = EditorGUILayout.ColorField("Demo GUIColor ", reader.demoGUIColor); reader.show[6] = EditorGUILayout.Foldout(reader.show[6], "Custom Keys"); if (reader.show[6]) { EditorGUI.indentLevel++; reader.startKey = (KeyCode)EditorGUILayout.EnumPopup("Start Key: ", reader.startKey); reader.nextKey = (KeyCode)EditorGUILayout.EnumPopup("Next Key: ", reader.nextKey); reader.upKey = (KeyCode)EditorGUILayout.EnumPopup("Up Key: ", reader.upKey); reader.downKey = (KeyCode)EditorGUILayout.EnumPopup("Down Key: ", reader.downKey); EditorGUI.indentLevel--; } EditorGUI.indentLevel--; } if (GUILayout.Button("Edit Actors")) { ActorEditor.InitEditorWindow(reader); } if (GUILayout.Button("Edit Keys")) { KeyEditor.InitEditorWindow(reader); } if (GUI.changed) { EditorUtility.SetDirty(target); } }
public static void InitEditorWindow(Object obj) { currentEditor = (KeyEditor)EditorWindow.GetWindow<KeyEditor>(); currentEditor.instanceId = obj.GetInstanceID(); currentEditor.title = "Key Editor"; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(KeyManagerEditorUI)); this.keyHiddenLabel = new System.Windows.Forms.Label(); this.exportKeyButton = new System.Windows.Forms.Button(); this.importKeyButton = new System.Windows.Forms.Button(); this.OKButton = new System.Windows.Forms.Button(); this.cancelButton = new System.Windows.Forms.Button(); this.statusBar = new System.Windows.Forms.StatusBar(); this.statusPanel = new System.Windows.Forms.StatusBarPanel(); this.keySizePanel = new System.Windows.Forms.StatusBarPanel(); this.keyEditor = new Microsoft.Practices.EnterpriseLibrary.Configuration.Design.Protection.KeyEditor(); ((System.ComponentModel.ISupportInitialize)(this.statusPanel)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.keySizePanel)).BeginInit(); this.SuspendLayout(); // // keyHiddenLabel // this.keyHiddenLabel.AccessibleDescription = resources.GetString("keyHiddenLabel.AccessibleDescription"); this.keyHiddenLabel.AccessibleName = resources.GetString("keyHiddenLabel.AccessibleName"); this.keyHiddenLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("keyHiddenLabel.Anchor"))); this.keyHiddenLabel.AutoSize = ((bool)(resources.GetObject("keyHiddenLabel.AutoSize"))); this.keyHiddenLabel.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("keyHiddenLabel.Dock"))); this.keyHiddenLabel.Enabled = ((bool)(resources.GetObject("keyHiddenLabel.Enabled"))); this.keyHiddenLabel.Font = ((System.Drawing.Font)(resources.GetObject("keyHiddenLabel.Font"))); this.keyHiddenLabel.Image = ((System.Drawing.Image)(resources.GetObject("keyHiddenLabel.Image"))); this.keyHiddenLabel.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("keyHiddenLabel.ImageAlign"))); this.keyHiddenLabel.ImageIndex = ((int)(resources.GetObject("keyHiddenLabel.ImageIndex"))); this.keyHiddenLabel.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("keyHiddenLabel.ImeMode"))); this.keyHiddenLabel.Location = ((System.Drawing.Point)(resources.GetObject("keyHiddenLabel.Location"))); this.keyHiddenLabel.Name = "keyHiddenLabel"; this.keyHiddenLabel.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("keyHiddenLabel.RightToLeft"))); this.keyHiddenLabel.Size = ((System.Drawing.Size)(resources.GetObject("keyHiddenLabel.Size"))); this.keyHiddenLabel.TabIndex = ((int)(resources.GetObject("keyHiddenLabel.TabIndex"))); this.keyHiddenLabel.Text = resources.GetString("keyHiddenLabel.Text"); this.keyHiddenLabel.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("keyHiddenLabel.TextAlign"))); this.keyHiddenLabel.Visible = ((bool)(resources.GetObject("keyHiddenLabel.Visible"))); // // exportKeyButton // this.exportKeyButton.AccessibleDescription = resources.GetString("exportKeyButton.AccessibleDescription"); this.exportKeyButton.AccessibleName = resources.GetString("exportKeyButton.AccessibleName"); this.exportKeyButton.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("exportKeyButton.Anchor"))); this.exportKeyButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("exportKeyButton.BackgroundImage"))); this.exportKeyButton.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("exportKeyButton.Dock"))); this.exportKeyButton.Enabled = ((bool)(resources.GetObject("exportKeyButton.Enabled"))); this.exportKeyButton.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("exportKeyButton.FlatStyle"))); this.exportKeyButton.Font = ((System.Drawing.Font)(resources.GetObject("exportKeyButton.Font"))); this.exportKeyButton.Image = ((System.Drawing.Image)(resources.GetObject("exportKeyButton.Image"))); this.exportKeyButton.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("exportKeyButton.ImageAlign"))); this.exportKeyButton.ImageIndex = ((int)(resources.GetObject("exportKeyButton.ImageIndex"))); this.exportKeyButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("exportKeyButton.ImeMode"))); this.exportKeyButton.Location = ((System.Drawing.Point)(resources.GetObject("exportKeyButton.Location"))); this.exportKeyButton.Name = "exportKeyButton"; this.exportKeyButton.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("exportKeyButton.RightToLeft"))); this.exportKeyButton.Size = ((System.Drawing.Size)(resources.GetObject("exportKeyButton.Size"))); this.exportKeyButton.TabIndex = ((int)(resources.GetObject("exportKeyButton.TabIndex"))); this.exportKeyButton.Text = resources.GetString("exportKeyButton.Text"); this.exportKeyButton.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("exportKeyButton.TextAlign"))); this.exportKeyButton.Visible = ((bool)(resources.GetObject("exportKeyButton.Visible"))); this.exportKeyButton.Click += new System.EventHandler(this.exportKeyButton_Click); // // importKeyButton // this.importKeyButton.AccessibleDescription = resources.GetString("importKeyButton.AccessibleDescription"); this.importKeyButton.AccessibleName = resources.GetString("importKeyButton.AccessibleName"); this.importKeyButton.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("importKeyButton.Anchor"))); this.importKeyButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("importKeyButton.BackgroundImage"))); this.importKeyButton.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("importKeyButton.Dock"))); this.importKeyButton.Enabled = ((bool)(resources.GetObject("importKeyButton.Enabled"))); this.importKeyButton.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("importKeyButton.FlatStyle"))); this.importKeyButton.Font = ((System.Drawing.Font)(resources.GetObject("importKeyButton.Font"))); this.importKeyButton.Image = ((System.Drawing.Image)(resources.GetObject("importKeyButton.Image"))); this.importKeyButton.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("importKeyButton.ImageAlign"))); this.importKeyButton.ImageIndex = ((int)(resources.GetObject("importKeyButton.ImageIndex"))); this.importKeyButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("importKeyButton.ImeMode"))); this.importKeyButton.Location = ((System.Drawing.Point)(resources.GetObject("importKeyButton.Location"))); this.importKeyButton.Name = "importKeyButton"; this.importKeyButton.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("importKeyButton.RightToLeft"))); this.importKeyButton.Size = ((System.Drawing.Size)(resources.GetObject("importKeyButton.Size"))); this.importKeyButton.TabIndex = ((int)(resources.GetObject("importKeyButton.TabIndex"))); this.importKeyButton.Text = resources.GetString("importKeyButton.Text"); this.importKeyButton.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("importKeyButton.TextAlign"))); this.importKeyButton.Visible = ((bool)(resources.GetObject("importKeyButton.Visible"))); this.importKeyButton.Click += new System.EventHandler(this.importKeyButton_Click); // // OKButton // this.OKButton.AccessibleDescription = resources.GetString("OKButton.AccessibleDescription"); this.OKButton.AccessibleName = resources.GetString("OKButton.AccessibleName"); this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("OKButton.Anchor"))); this.OKButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("OKButton.BackgroundImage"))); this.OKButton.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("OKButton.Dock"))); this.OKButton.Enabled = ((bool)(resources.GetObject("OKButton.Enabled"))); this.OKButton.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("OKButton.FlatStyle"))); this.OKButton.Font = ((System.Drawing.Font)(resources.GetObject("OKButton.Font"))); this.OKButton.Image = ((System.Drawing.Image)(resources.GetObject("OKButton.Image"))); this.OKButton.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("OKButton.ImageAlign"))); this.OKButton.ImageIndex = ((int)(resources.GetObject("OKButton.ImageIndex"))); this.OKButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("OKButton.ImeMode"))); this.OKButton.Location = ((System.Drawing.Point)(resources.GetObject("OKButton.Location"))); this.OKButton.Name = "OKButton"; this.OKButton.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("OKButton.RightToLeft"))); this.OKButton.Size = ((System.Drawing.Size)(resources.GetObject("OKButton.Size"))); this.OKButton.TabIndex = ((int)(resources.GetObject("OKButton.TabIndex"))); this.OKButton.Text = resources.GetString("OKButton.Text"); this.OKButton.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("OKButton.TextAlign"))); this.OKButton.Visible = ((bool)(resources.GetObject("OKButton.Visible"))); this.OKButton.Click += new System.EventHandler(this.OKButton_Click); // // cancelButton // this.cancelButton.AccessibleDescription = resources.GetString("cancelButton.AccessibleDescription"); this.cancelButton.AccessibleName = resources.GetString("cancelButton.AccessibleName"); this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cancelButton.Anchor"))); this.cancelButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cancelButton.BackgroundImage"))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cancelButton.Dock"))); this.cancelButton.Enabled = ((bool)(resources.GetObject("cancelButton.Enabled"))); this.cancelButton.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("cancelButton.FlatStyle"))); this.cancelButton.Font = ((System.Drawing.Font)(resources.GetObject("cancelButton.Font"))); this.cancelButton.Image = ((System.Drawing.Image)(resources.GetObject("cancelButton.Image"))); this.cancelButton.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("cancelButton.ImageAlign"))); this.cancelButton.ImageIndex = ((int)(resources.GetObject("cancelButton.ImageIndex"))); this.cancelButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cancelButton.ImeMode"))); this.cancelButton.Location = ((System.Drawing.Point)(resources.GetObject("cancelButton.Location"))); this.cancelButton.Name = "cancelButton"; this.cancelButton.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cancelButton.RightToLeft"))); this.cancelButton.Size = ((System.Drawing.Size)(resources.GetObject("cancelButton.Size"))); this.cancelButton.TabIndex = ((int)(resources.GetObject("cancelButton.TabIndex"))); this.cancelButton.Text = resources.GetString("cancelButton.Text"); this.cancelButton.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("cancelButton.TextAlign"))); this.cancelButton.Visible = ((bool)(resources.GetObject("cancelButton.Visible"))); this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // // statusBar // this.statusBar.AccessibleDescription = resources.GetString("statusBar.AccessibleDescription"); this.statusBar.AccessibleName = resources.GetString("statusBar.AccessibleName"); this.statusBar.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("statusBar.Anchor"))); this.statusBar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("statusBar.BackgroundImage"))); this.statusBar.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("statusBar.Dock"))); this.statusBar.Enabled = ((bool)(resources.GetObject("statusBar.Enabled"))); this.statusBar.Font = ((System.Drawing.Font)(resources.GetObject("statusBar.Font"))); this.statusBar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("statusBar.ImeMode"))); this.statusBar.Location = ((System.Drawing.Point)(resources.GetObject("statusBar.Location"))); this.statusBar.Name = "statusBar"; this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { this.statusPanel, this.keySizePanel }); this.statusBar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("statusBar.RightToLeft"))); this.statusBar.ShowPanels = true; this.statusBar.Size = ((System.Drawing.Size)(resources.GetObject("statusBar.Size"))); this.statusBar.SizingGrip = false; this.statusBar.TabIndex = ((int)(resources.GetObject("statusBar.TabIndex"))); this.statusBar.Text = resources.GetString("statusBar.Text"); this.statusBar.Visible = ((bool)(resources.GetObject("statusBar.Visible"))); // // statusPanel // this.statusPanel.Alignment = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("statusPanel.Alignment"))); this.statusPanel.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; this.statusPanel.Icon = ((System.Drawing.Icon)(resources.GetObject("statusPanel.Icon"))); this.statusPanel.MinWidth = ((int)(resources.GetObject("statusPanel.MinWidth"))); this.statusPanel.Text = resources.GetString("statusPanel.Text"); this.statusPanel.ToolTipText = resources.GetString("statusPanel.ToolTipText"); this.statusPanel.Width = ((int)(resources.GetObject("statusPanel.Width"))); // // keySizePanel // this.keySizePanel.Alignment = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("keySizePanel.Alignment"))); this.keySizePanel.Icon = ((System.Drawing.Icon)(resources.GetObject("keySizePanel.Icon"))); this.keySizePanel.MinWidth = ((int)(resources.GetObject("keySizePanel.MinWidth"))); this.keySizePanel.Text = resources.GetString("keySizePanel.Text"); this.keySizePanel.ToolTipText = resources.GetString("keySizePanel.ToolTipText"); this.keySizePanel.Width = ((int)(resources.GetObject("keySizePanel.Width"))); // // keyEditor // this.keyEditor.AccessibleDescription = resources.GetString("keyEditor.AccessibleDescription"); this.keyEditor.AccessibleName = resources.GetString("keyEditor.AccessibleName"); this.keyEditor.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("keyEditor.Anchor"))); this.keyEditor.AutoScroll = ((bool)(resources.GetObject("keyEditor.AutoScroll"))); this.keyEditor.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("keyEditor.AutoScrollMargin"))); this.keyEditor.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("keyEditor.AutoScrollMinSize"))); this.keyEditor.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("keyEditor.BackgroundImage"))); this.keyEditor.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("keyEditor.Dock"))); this.keyEditor.Enabled = ((bool)(resources.GetObject("keyEditor.Enabled"))); this.keyEditor.Font = ((System.Drawing.Font)(resources.GetObject("keyEditor.Font"))); this.keyEditor.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("keyEditor.ImeMode"))); this.keyEditor.Key = new System.Byte[0]; this.keyEditor.Location = ((System.Drawing.Point)(resources.GetObject("keyEditor.Location"))); this.keyEditor.Name = "keyEditor"; this.keyEditor.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("keyEditor.RightToLeft"))); this.keyEditor.Size = ((System.Drawing.Size)(resources.GetObject("keyEditor.Size"))); this.keyEditor.TabIndex = ((int)(resources.GetObject("keyEditor.TabIndex"))); this.keyEditor.Visible = ((bool)(resources.GetObject("keyEditor.Visible"))); // // KeyManagerUI // this.AcceptButton = this.OKButton; this.AccessibleDescription = resources.GetString("$this.AccessibleDescription"); this.AccessibleName = resources.GetString("$this.AccessibleName"); this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize"))); this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll"))); this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin"))); this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize"))); this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.CancelButton = this.cancelButton; this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize"))); this.Controls.Add(this.keyHiddenLabel); this.Controls.Add(this.exportKeyButton); this.Controls.Add(this.importKeyButton); this.Controls.Add(this.statusBar); this.Controls.Add(this.cancelButton); this.Controls.Add(this.OKButton); this.Controls.Add(this.keyEditor); this.Enabled = ((bool)(resources.GetObject("$this.Enabled"))); this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font"))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode"))); this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location"))); this.MaximizeBox = false; this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize"))); this.MinimizeBox = false; this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize"))); this.Name = "KeyManagerUI"; this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft"))); this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition"))); this.Text = resources.GetString("$this.Text"); this.Load += new System.EventHandler(this.KeyManagerUI_Load); ((System.ComponentModel.ISupportInitialize)(this.statusPanel)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.keySizePanel)).EndInit(); this.ResumeLayout(false); }