private void openEditMenu() { shipButtonManager.requestCloseMenu_selectionMenu(); string shipName; if (currentlySelectedButton >= 0) { shipName = shipDataPacket.getShipData()[currentlySelectedButton].getShipName(); } else { shipName = RandomNameGenerator.generateRandomName(); fillTempDataWithDefaults(); shipTextureManager.changeColors(tempShipColor, tempSailPatternSelection, tempSailIsMirrored_horizontal, tempSailIsMirrored_vertical); playerShip_normal.SetActive(true); playerShip_invis.SetActive(false); newPlusIcon.SetActive(false); } editMenuManager.requestOpenMenu_editMenu(tempShipColor, tempSailPatternSelection, tempSailIsMirrored_horizontal, tempSailIsMirrored_vertical, tempCannonSelection, shipName, currentlySelectedButton); titleBarImage.sprite = sprite_titleBar_edit; }
// ------------------------------------------------------------------------------------------------------ // ----------- Name related stuff: -------------------------------------------------------- // ------------------------------------------------------------------------------------------------------ public void buttonPressed_randomizeName() { if (buttonsCanBePressed) { text_shipName.text = RandomNameGenerator.generateRandomName(); userHasChangedSomething(); } }