Make icon kit into a popup

This commit is contained in:
Lncvrt committed 2026-03-15 20:27:24 -07:00
1 parent 62ebeec2c4
commit 70687c2856
6 files changed
+11290 -11851

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 93c5a1ee608d5b04dbdb5348ba79b654
DefaultImporter:
guid: 0ab3da8801cb54d6ca8318e649eab21b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
+2 -14
View File
@@ -2459,6 +2459,7 @@ MonoBehaviour:
settingsPrefab: {fileID: 2128217568192272405, guid: 0d66068f9c9ce46b88b019a3aa64793f, type: 3}
statsPrefab: {fileID: 922734498401451496, guid: 33b706f9dca9d4d36be1cd5740f53b03, type: 3}
playModePrefab: {fileID: 5412203424544537898, guid: c9bfc084cf0a4481181349b979f74e43, type: 3}
iconkitPrefab: {fileID: 1299894586620017673, guid: 0ab3da8801cb54d6ca8318e649eab21b, type: 3}
copyrightText: {fileID: 319334213}
closePopup: {fileID: 60514371}
closePopupCancelButton: {fileID: 1983964294}
@@ -2469,6 +2470,7 @@ MonoBehaviour:
settingsButton: {fileID: 1570123698}
statsButton: {fileID: 462957726}
playButton: {fileID: 1777696996}
iconkitButton: {fileID: 1997401229}
--- !u!1 &600923169
GameObject:
m_ObjectHideFlags: 0
@@ -7982,7 +7984,6 @@ GameObject:
- component: {fileID: 1997401231}
- component: {fileID: 1997401230}
- component: {fileID: 1997401229}
- component: {fileID: 1997401232}
- component: {fileID: 1997401233}
m_Layer: 5
m_Name: Button
@@ -8093,19 +8094,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1997401227}
m_CullTransparentMesh: 1
--- !u!114 &1997401232
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1997401227}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1a45465fc8803364d968dc6bec70fca8, type: 3}
m_Name:
m_EditorClassIdentifier:
sceneName: IconsMenu
--- !u!114 &1997401233
MonoBehaviour:
m_ObjectHideFlags: 0
+7
View File
@@ -16,6 +16,7 @@ public class MainMenu : MonoBehaviour {
[SerializeField] private SettingsMenu settingsPrefab;
[SerializeField] private StatsPrefab statsPrefab;
[SerializeField] private PlayModePrefab playModePrefab;
[SerializeField] private IconkitPrefab iconkitPrefab;
[SerializeField] private TMP_Text copyrightText;
[SerializeField] private GameObject closePopup;
[SerializeField] private Button closePopupCancelButton;
@@ -26,6 +27,7 @@ public class MainMenu : MonoBehaviour {
[SerializeField] private Button settingsButton;
[SerializeField] private Button statsButton;
[SerializeField] private Button playButton;
[SerializeField] private Button iconkitButton;
void Awake() {
if (PresistentData.latestVersion != null) {
@@ -89,6 +91,11 @@ public class MainMenu : MonoBehaviour {
clone.name = "Prefab";
clone.SetActive(true);
});
iconkitButton.onClick.AddListener(() => {
var clone = Instantiate(iconkitPrefab.gameObject, iconkitPrefab.gameObject.transform.parent);
clone.name = "Prefab";
clone.SetActive(true);
});
if (Tools.GetLevelInfo().level < 3) {
iconMarketplaceButton.interactable = false;
@@ -4,16 +4,16 @@ using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class Iconsmenu : MonoBehaviour {
public class IconkitPrefab : MonoBehaviour {
[SerializeField] private GameObject iconsPanel;
[SerializeField] private GameObject overlaysPanel;
[SerializeField] private GameObject marketplaceIconsPanel;
[SerializeField] private GameObject marketplaceIconsContent;
[SerializeField] private GameObject marketplaceIconsSample;
[SerializeField] private Sprite defaultIcon;
[SerializeField] private Button backButton;
[SerializeField] private Button placeholderButton;
[SerializeField] private TMP_Text selectionText;
[SerializeField] private Image previewBird;
@@ -88,6 +88,7 @@ public class Iconsmenu : MonoBehaviour {
int index = i;
overlays[i].onClick.AddListener(() => SelectOverlay(index));
}
backButton.onClick.AddListener(() => Destroy(gameObject));
}
private void SwitchToIcon() {
@@ -204,8 +205,8 @@ public class Iconsmenu : MonoBehaviour {
}
}
async void Update() {
if (Keyboard.current.escapeKey.wasPressedThisFrame) await SceneManager.LoadSceneAsync("MainMenu");
void Update() {
if (Keyboard.current.escapeKey.wasPressedThisFrame && backButton.interactable) backButton.onClick.Invoke();
}
void RenderIcons() {