Exemplo n.º 1
0
 public SelectionToolWindow()
 {
     base.gameObject.name       = "Selection_Tool";
     base.tab.label.translation = new TranslatedText(new TranslationReference("SDG", "Devkit.Window.Selection_Tool.Title"));
     base.tab.label.translation.format();
     this.inspector = new Sleek2Inspector();
     this.inspector.transform.anchorMin = new Vector2(0f, 0f);
     this.inspector.transform.anchorMax = new Vector2(1f, 1f);
     this.inspector.transform.pivot     = new Vector2(0f, 1f);
     this.inspector.transform.offsetMin = new Vector2(5f, 5f);
     this.inspector.transform.offsetMax = new Vector2(-5f, -5f);
     this.addElement(this.inspector);
     this.inspector.inspect(DevkitSelectionToolOptions.instance);
     DevkitHotkeys.registerTool(1, this);
 }
Exemplo n.º 2
0
 public LandscapeToolWindow()
 {
     base.gameObject.name       = "Landscape_Tool";
     this.searchLength          = -1;
     this.searchResults         = new List <LandscapeMaterialAsset>();
     base.tab.label.translation = new TranslatedText(new TranslationReference("SDG", "Devkit.Window.Landscape_Tool.Title"));
     base.tab.label.translation.format();
     this.heightmapModeButton = new Sleek2ImageTranslatedLabelButton();
     this.heightmapModeButton.transform.anchorMin = new Vector2(0f, 1f);
     this.heightmapModeButton.transform.anchorMax = new Vector2(0.33f, 1f);
     this.heightmapModeButton.transform.pivot     = new Vector2(0.5f, 1f);
     this.heightmapModeButton.transform.offsetMin = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight));
     this.heightmapModeButton.transform.offsetMax = new Vector2(-5f, 0f);
     this.heightmapModeButton.label.translation   = new TranslatedText(new TranslationReference("#SDG::Devkit.Window.Landscape_Tool.Heightmap_Mode_Button.Label"));
     this.heightmapModeButton.label.translation.format();
     this.heightmapModeButton.clicked += this.handleHeightmapModeButtonClicked;
     base.safePanel.addElement(this.heightmapModeButton);
     this.splatmapModeButton = new Sleek2ImageTranslatedLabelButton();
     this.splatmapModeButton.transform.anchorMin = new Vector2(0.33f, 1f);
     this.splatmapModeButton.transform.anchorMax = new Vector2(0.667f, 1f);
     this.splatmapModeButton.transform.pivot     = new Vector2(0.5f, 1f);
     this.splatmapModeButton.transform.offsetMin = new Vector2(5f, (float)(-(float)Sleek2Config.bodyHeight));
     this.splatmapModeButton.transform.offsetMax = new Vector2(-10f, 0f);
     this.splatmapModeButton.label.translation   = new TranslatedText(new TranslationReference("#SDG::Devkit.Window.Landscape_Tool.Splatmap_Mode_Button.Label"));
     this.splatmapModeButton.label.translation.format();
     this.splatmapModeButton.clicked += this.handleSplatmapModeButtonClicked;
     base.safePanel.addElement(this.splatmapModeButton);
     this.tileModeButton = new Sleek2ImageTranslatedLabelButton();
     this.tileModeButton.transform.anchorMin = new Vector2(0.667f, 1f);
     this.tileModeButton.transform.anchorMax = new Vector2(1f, 1f);
     this.tileModeButton.transform.pivot     = new Vector2(0.5f, 1f);
     this.tileModeButton.transform.offsetMin = new Vector2(5f, (float)(-(float)Sleek2Config.bodyHeight));
     this.tileModeButton.transform.offsetMax = new Vector2(-5f, 0f);
     this.tileModeButton.label.translation   = new TranslatedText(new TranslationReference("#SDG::Devkit.Window.Landscape_Tool.Tile_Mode_Button.Label"));
     this.tileModeButton.label.translation.format();
     this.tileModeButton.clicked += this.handleTileModeButtonClicked;
     base.safePanel.addElement(this.tileModeButton);
     this.modePanel = new Sleek2Element();
     this.modePanel.transform.anchorMin = new Vector2(0f, 0f);
     this.modePanel.transform.anchorMax = new Vector2(1f, 1f);
     this.modePanel.transform.pivot     = new Vector2(0f, 1f);
     this.modePanel.transform.offsetMin = new Vector2(0f, 0f);
     this.modePanel.transform.offsetMax = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight - 5));
     base.safePanel.addElement(this.modePanel);
     this.heightmapModePanel = new Sleek2Element();
     this.heightmapModePanel.transform.reset();
     this.modePanel.addElement(this.heightmapModePanel);
     this.splatmapModePanel = new Sleek2Element();
     this.splatmapModePanel.transform.reset();
     this.modePanel.addElement(this.splatmapModePanel);
     this.tileModePanel = new Sleek2Element();
     this.tileModePanel.transform.reset();
     this.modePanel.addElement(this.tileModePanel);
     this.updateMode();
     this.heightmapInspector = new Sleek2Inspector();
     this.heightmapInspector.transform.anchorMin = new Vector2(0f, 0f);
     this.heightmapInspector.transform.anchorMax = new Vector2(1f, 1f);
     this.heightmapInspector.transform.pivot     = new Vector2(0f, 1f);
     this.heightmapInspector.transform.offsetMin = new Vector2(0f, 0f);
     this.heightmapInspector.transform.offsetMax = new Vector2(0f, 0f);
     this.heightmapModePanel.addElement(this.heightmapInspector);
     this.heightmapInspector.inspect(DevkitLandscapeToolHeightmapOptions.instance);
     this.splatmapInspector = new Sleek2Inspector();
     this.splatmapInspector.transform.anchorMin = new Vector2(0f, 1f);
     this.splatmapInspector.transform.anchorMax = new Vector2(1f, 1f);
     this.splatmapInspector.transform.pivot     = new Vector2(0f, 1f);
     this.splatmapInspector.transform.offsetMin = new Vector2(0f, -235f);
     this.splatmapInspector.transform.offsetMax = new Vector2(0f, 0f);
     this.splatmapModePanel.addElement(this.splatmapInspector);
     this.splatmapInspector.inspect(DevkitLandscapeToolSplatmapOptions.instance);
     this.splatmapSearchField = new Sleek2Field();
     this.splatmapSearchField.transform.anchorMin = new Vector2(0f, 1f);
     this.splatmapSearchField.transform.anchorMax = new Vector2(1f, 1f);
     this.splatmapSearchField.transform.pivot     = new Vector2(0.5f, 1f);
     this.splatmapSearchField.transform.offsetMin = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight - 245));
     this.splatmapSearchField.transform.offsetMax = new Vector2(0f, -245f);
     this.splatmapSearchField.typed += this.handleSplatmapSearchFieldTyped;
     this.splatmapModePanel.addElement(this.splatmapSearchField);
     this.splatmapMaterialsView = new Sleek2Scrollview();
     this.splatmapMaterialsView.transform.anchorMin = new Vector2(0f, 0f);
     this.splatmapMaterialsView.transform.anchorMax = new Vector2(1f, 1f);
     this.splatmapMaterialsView.transform.pivot     = new Vector2(0.5f, 1f);
     this.splatmapMaterialsView.transform.offsetMin = new Vector2(0f, 0f);
     this.splatmapMaterialsView.transform.offsetMax = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight - 250));
     this.splatmapMaterialsView.vertical            = true;
     this.splatmapMaterialsPanel      = new Sleek2VerticalScrollviewContents();
     this.splatmapMaterialsPanel.name = "Panel";
     this.splatmapMaterialsView.panel = this.splatmapMaterialsPanel;
     this.splatmapModePanel.addElement(this.splatmapMaterialsView);
     this.tileInspector = new Sleek2Inspector();
     this.tileInspector.transform.anchorMin = new Vector2(0f, 1f);
     this.tileInspector.transform.anchorMax = new Vector2(1f, 1f);
     this.tileInspector.transform.pivot     = new Vector2(0f, 1f);
     this.tileInspector.transform.offsetMin = new Vector2(0f, -320f);
     this.tileInspector.transform.offsetMax = new Vector2(0f, 0f);
     this.tileModePanel.addElement(this.tileInspector);
     this.tileResetHeightmapButton = new Sleek2ImageLabelButton();
     this.tileResetHeightmapButton.transform.anchorMin      = new Vector2(0f, 1f);
     this.tileResetHeightmapButton.transform.anchorMax      = new Vector2(1f, 1f);
     this.tileResetHeightmapButton.transform.pivot          = new Vector2(0.5f, 1f);
     this.tileResetHeightmapButton.transform.offsetMin      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight - 330));
     this.tileResetHeightmapButton.transform.offsetMax      = new Vector2(0f, -330f);
     this.tileResetHeightmapButton.label.textComponent.text = "Reset Heightmap";
     this.tileResetHeightmapButton.clicked += this.handleTileResetHeightmapButtonClicked;
     this.tileModePanel.addElement(this.tileResetHeightmapButton);
     this.tileResetSplatmapButton = new Sleek2ImageLabelButton();
     this.tileResetSplatmapButton.transform.anchorMin      = new Vector2(0f, 1f);
     this.tileResetSplatmapButton.transform.anchorMax      = new Vector2(1f, 1f);
     this.tileResetSplatmapButton.transform.pivot          = new Vector2(0.5f, 1f);
     this.tileResetSplatmapButton.transform.offsetMin      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 2 - 330));
     this.tileResetSplatmapButton.transform.offsetMax      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight - 330));
     this.tileResetSplatmapButton.label.textComponent.text = "Reset Splatmap";
     this.tileResetSplatmapButton.clicked += this.handleTileResetSplatmapButtonClicked;
     this.tileModePanel.addElement(this.tileResetSplatmapButton);
     this.tileNormalizeSplatmapButton = new Sleek2ImageLabelButton();
     this.tileNormalizeSplatmapButton.transform.anchorMin      = new Vector2(0f, 1f);
     this.tileNormalizeSplatmapButton.transform.anchorMax      = new Vector2(1f, 1f);
     this.tileNormalizeSplatmapButton.transform.pivot          = new Vector2(0.5f, 1f);
     this.tileNormalizeSplatmapButton.transform.offsetMin      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 3 - 330));
     this.tileNormalizeSplatmapButton.transform.offsetMax      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 2 - 330));
     this.tileNormalizeSplatmapButton.label.textComponent.text = "Normalize Splatmap";
     this.tileNormalizeSplatmapButton.clicked += this.handleTileNormalizeSplatmapButtonClicked;
     this.tileModePanel.addElement(this.tileNormalizeSplatmapButton);
     DevkitLandscapeTool.toolModeChanged     += this.handleToolModeChanged;
     DevkitLandscapeTool.selectedTileChanged += this.handleSelectedTileChanged;
     DevkitHotkeys.registerTool(2, this);
 }
Exemplo n.º 3
0
 // Token: 0x06001116 RID: 4374 RVA: 0x0006FF48 File Offset: 0x0006E348
 public FoliageToolWindow()
 {
     base.gameObject.name        = "Foliage_Tool";
     this.searchLength           = -1;
     this.searchInfoAssets       = new List <FoliageInfoAsset>();
     this.searchCollectionAssets = new List <FoliageInfoCollectionAsset>();
     base.tab.label.translation  = new TranslatedText(new TranslationReference("SDG", "Devkit.Window.Foliage_Tool.Title"));
     base.tab.label.translation.format();
     this.bakeGlobalButton = new Sleek2ImageLabelButton();
     this.bakeGlobalButton.transform.anchorMin      = new Vector2(0f, 1f);
     this.bakeGlobalButton.transform.anchorMax      = new Vector2(1f, 1f);
     this.bakeGlobalButton.transform.pivot          = new Vector2(0.5f, 1f);
     this.bakeGlobalButton.transform.offsetMin      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight));
     this.bakeGlobalButton.transform.offsetMax      = new Vector2(0f, 0f);
     this.bakeGlobalButton.label.textComponent.text = "Bake Foliage [Global]";
     this.bakeGlobalButton.clicked += this.handleBakeGlobalButtonClicked;
     base.safePanel.addElement(this.bakeGlobalButton);
     this.bakeLocalButton = new Sleek2ImageLabelButton();
     this.bakeLocalButton.transform.anchorMin      = new Vector2(0f, 1f);
     this.bakeLocalButton.transform.anchorMax      = new Vector2(1f, 1f);
     this.bakeLocalButton.transform.pivot          = new Vector2(0.5f, 1f);
     this.bakeLocalButton.transform.offsetMin      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 2));
     this.bakeLocalButton.transform.offsetMax      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight));
     this.bakeLocalButton.label.textComponent.text = "Bake Foliage [Local]";
     this.bakeLocalButton.clicked += this.handleBakeLocalButtonClicked;
     base.safePanel.addElement(this.bakeLocalButton);
     this.bakeProgressLabel = new Sleek2Label();
     this.bakeProgressLabel.transform.anchorMin = new Vector2(0f, 1f);
     this.bakeProgressLabel.transform.anchorMax = new Vector2(0.75f, 1f);
     this.bakeProgressLabel.transform.pivot     = new Vector2(0.5f, 1f);
     this.bakeProgressLabel.transform.offsetMin = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 3));
     this.bakeProgressLabel.transform.offsetMax = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 2));
     base.safePanel.addElement(this.bakeProgressLabel);
     this.bakeCancelButton = new Sleek2ImageLabelButton();
     this.bakeCancelButton.transform.anchorMin      = new Vector2(0.75f, 1f);
     this.bakeCancelButton.transform.anchorMax      = new Vector2(1f, 1f);
     this.bakeCancelButton.transform.pivot          = new Vector2(0.5f, 1f);
     this.bakeCancelButton.transform.offsetMin      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 3));
     this.bakeCancelButton.transform.offsetMax      = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 2));
     this.bakeCancelButton.label.textComponent.text = "Cancel";
     this.bakeCancelButton.clicked += this.handleBakeCancelButtonClicked;
     base.safePanel.addElement(this.bakeCancelButton);
     this.inspector = new Sleek2Inspector();
     this.inspector.transform.anchorMin = new Vector2(0f, 1f);
     this.inspector.transform.anchorMax = new Vector2(1f, 1f);
     this.inspector.transform.pivot     = new Vector2(0f, 1f);
     this.inspector.transform.offsetMin = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 3 - 210));
     this.inspector.transform.offsetMax = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 3 - 10));
     base.safePanel.addElement(this.inspector);
     this.inspector.inspect(DevkitFoliageToolOptions.instance);
     this.searchField = new Sleek2Field();
     this.searchField.transform.anchorMin = new Vector2(0f, 1f);
     this.searchField.transform.anchorMax = new Vector2(1f, 1f);
     this.searchField.transform.pivot     = new Vector2(0.5f, 1f);
     this.searchField.transform.offsetMin = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 4 - 220));
     this.searchField.transform.offsetMax = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 3 - 220));
     this.searchField.typed += this.handleSearchFieldTyped;
     base.safePanel.addElement(this.searchField);
     this.foliageView = new Sleek2Scrollview();
     this.foliageView.transform.anchorMin = new Vector2(0f, 0f);
     this.foliageView.transform.anchorMax = new Vector2(1f, 1f);
     this.foliageView.transform.pivot     = new Vector2(0.5f, 1f);
     this.foliageView.transform.offsetMin = new Vector2(0f, 0f);
     this.foliageView.transform.offsetMax = new Vector2(0f, (float)(-(float)Sleek2Config.bodyHeight * 4 - 225));
     this.foliageView.vertical            = true;
     this.foliagePanel      = new Sleek2VerticalScrollviewContents();
     this.foliagePanel.name = "Panel";
     this.foliageView.panel = this.foliagePanel;
     base.safePanel.addElement(this.foliageView);
     TimeUtility.updated += this.handleUpdated;
     DevkitHotkeys.registerTool(3, this);
 }