public override void Click() { UiDropDown dropDown = new UiDropDown(); dropDown.uiPosition = new Vector2(132.5f, -104); dropDown.uiAnchorMode = UiManager.UiAnchorsMode.TopLeft; dropDown.uiSize = new Vector2(185, 185); dropDown.uiObjName = "DropDown"; dropDown.dropDownOptions = new DropDownOption[XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers.Length + 1]; dropDown.dropDownOptions[0].Name = " + Create New Layer"; dropDown.dropDownOptions[0].targetNewWindow = new NewLayer(); string add = ""; for (int i = 0; i < XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers.Length; i++) { add = ""; if (XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers[i].mainLayer) { add = "[ Main ] "; } dropDown.dropDownOptions[i + 1].Name = add + XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers[i].layerName; dropDown.dropDownOptions[i + 1].freeIndex = i; dropDown.dropDownOptions[i + 1].hack = true; dropDown.dropDownOptions[i + 1].targetNewWindow = new LayerSwitch(); } UiManager.CreateDropDown(this.gameObject, dropDown); }
public override void Click() { UiDropDown dropDown = new UiDropDown(); dropDown.uiPosition = new Vector2(-168.1f, -181.01f); dropDown.uiAnchorMode = UiManager.UiAnchorsMode.MiddelCenter; dropDown.uiSize = new Vector2(145, 185); dropDown.uiObjName = "DropDown"; dropDown.dropDownOptions = new DropDownOption[2]; dropDown.dropDownOptions[0].Name = "Import sprite sheet"; //dropDown.dropDownOptions[0].targetNewWindow = new NewLayer(); dropDown.dropDownOptions[1].Name = "Import texture"; UiManager.CreateDropDown(this.gameObject, dropDown); }
public void ClickEditBtn() { UiDropDown dropDown = new UiDropDown(); dropDown.uiPosition = new Vector2(108, -64); dropDown.uiAnchorMode = UiManager.UiAnchorsMode.TopLeft; dropDown.uiObjName = "Editor-DropDown"; dropDown.dropDownOptions = new DropDownOption[2]; dropDown.dropDownOptions[0].Name = "Console"; dropDown.dropDownOptions[0].destroy = true; dropDown.dropDownOptions[0].itemPressMethod = createEditorConsole; dropDown.dropDownOptions[1].targetNewWindow = new TerminatePreview(); UiManager.CreateDropDown(this.gameObject, dropDown); }
public void ItemSelect() { UiDropDown dropDown = new UiDropDown(); dropDown.uiPosition = new Vector2(143.7f, 53f); dropDown.uiAnchorMode = UiManager.UiAnchorsMode.MiddelCenter; dropDown.uiSize = new Vector2(200, 34); dropDown.uiObjName = "DropDown"; dropDown.dropDownOptions = new DropDownOption[3]; dropDown.dropDownOptions[0].Name = "Player"; dropDown.dropDownOptions[0].itemPressMethod = ItemSetPlayer; dropDown.dropDownOptions[1].Name = "Enemy is this AI?"; dropDown.dropDownOptions[1].itemPressMethod = ItemSetBadAI; dropDown.dropDownOptions[2].Name = "A* AI WIP"; UiManager.CreateDropDown(targetWindowRef, dropDown); }
/*------------------------------------------------ */ // Editor UI interaction functions. /*------------------------------------------------ */ public void ClickFileBtn() { UiDropDown dropDown = new UiDropDown(); dropDown.uiPosition = new Vector2(64, -64); dropDown.uiAnchorMode = UiManager.UiAnchorsMode.TopLeft; dropDown.uiObjName = "DropDown"; dropDown.dropDownOptions = new DropDownOption[7]; dropDown.dropDownOptions[0].targetNewWindow = new BMapNew(); dropDown.dropDownOptions[1].targetNewWindow = new BMapSave(); dropDown.dropDownOptions[2].targetNewWindow = new BMapSaveAs(); dropDown.dropDownOptions[3].targetNewWindow = new BMapImport(); dropDown.dropDownOptions[4].targetNewWindow = new BXCPManager(); dropDown.dropDownOptions[5].targetNewWindow = new BEditorInfoWindow(); dropDown.dropDownOptions[6].targetNewWindow = new EditorXDP(); UiManager.CreateDropDown(this.gameObject, dropDown); }
public void Click() { UiDropDown dropDown = new UiDropDown(); dropDown.uiPosition = new Vector2(132.502f, -104); dropDown.uiAnchorMode = UiManager.UiAnchorsMode.TopLeft; dropDown.uiSize = new Vector2(185, 185); dropDown.uiObjName = "DropDown"; dropDown.dropDownOptions = new DropDownOption[2]; dropDown.dropDownOptions[0].Name = " Import Tile"; dropDown.dropDownOptions[0].itemPressMethod = CreateTextureImporter; //dropDown.dropDownOptions[0].skipInstanceRef = true; dropDown.dropDownOptions[1].Name = "[ WIP ] Import TileSet"; //dropDown.dropDownOptions[1].targetNewWindow = new BImporter(); dropDown.dropDownOptions[1].skipInstanceRef = true; /* * dropDown.dropDownOptions[2].Name = " Import Sprite"; * dropDown.dropDownOptions[2].targetNewWindow = new BImporter(); * dropDown.dropDownOptions[2].skipInstanceRef = true; */ UiManager.CreateDropDown(targetWindowRef, dropDown); }
public override void CreateUiType(GameObject parrent) { UiManager.CreateDropDown(parrent, this); }