Make user search, chatroom, leaderboards and icon marketplace into a popup

This commit is contained in:
Lncvrt committed 2026-03-16 21:43:00 -07:00
1 parent 70687c2856
commit 06ba845790
52 files changed
+30178 -31455

No files matched your search

+66
View File
@@ -0,0 +1,66 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class ChatroomMenuEntry : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler {
private Button optionsButton;
private static ChatroomMenuEntry activeEntry;
public void Init(Button optionsButtonArg) {
optionsButton = optionsButtonArg;
var color = BazookaManager.Instance.GetColorSettingMenuBackground();
gameObject.GetComponent<Image>().color = new Color((((float)color[0]) + 24f) / 255f, (((float)color[1]) + 24f) / 255f, (((float)color[2]) + 24f) / 255f);
optionsButton.gameObject.SetActive(false);
}
public void OnPointerEnter(PointerEventData e) {
if (!Application.isMobilePlatform) {
if (activeEntry != null && activeEntry != this) {
activeEntry.Deactivate();
}
if (activeEntry != this) {
Activate();
}
}
}
public void OnPointerExit(PointerEventData e) {
if (!Application.isMobilePlatform) {
if (activeEntry != null && activeEntry != this) {
activeEntry.Deactivate();
}
if (activeEntry == this) {
Deactivate();
}
}
}
public void OnPointerClick(PointerEventData e) {
if (Application.isMobilePlatform) {
if (activeEntry != null && activeEntry != this) {
activeEntry.Deactivate();
}
if (activeEntry == this) {
Deactivate();
} else {
Activate();
}
} else if (e.button == PointerEventData.InputButton.Right) {
optionsButton.onClick?.Invoke();
}
}
private void Activate() {
activeEntry = this;
var color = BazookaManager.Instance.GetColorSettingMenuBackground();
gameObject.GetComponent<Image>().color = new Color((((float)color[0]) + 36f) / 255f, (((float)color[1]) + 36f) / 255f, (((float)color[2]) + 36f) / 255f);
optionsButton.gameObject.SetActive(true);
}
private void Deactivate() {
var color = BazookaManager.Instance.GetColorSettingMenuBackground();
gameObject.GetComponent<Image>().color = new Color((((float)color[0]) + 24f) / 255f, (((float)color[1]) + 24f) / 255f, (((float)color[2]) + 24f) / 255f);
optionsButton.gameObject.SetActive(false);
if (activeEntry == this) activeEntry = null;
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 4020670dfda173ca8ab647ae867d943d