This commit is contained in:
huyulong 2024-11-26 16:54:41 +08:00
commit 09018ea210
6 changed files with 53 additions and 28 deletions

View File

@ -380,10 +380,10 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 36 m_fontSize: 65.1
m_fontSizeBase: 36 m_fontSizeBase: 36
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 0 m_enableAutoSizing: 1
m_fontSizeMin: 18 m_fontSizeMin: 18
m_fontSizeMax: 72 m_fontSizeMax: 72
m_fontStyle: 0 m_fontStyle: 0

View File

@ -25,14 +25,20 @@ public class ListItem : MonoBehaviour
if (list == 1) if (list == 1)
{ {
listImage.sprite = Resources.Load<Sprite>("bgYello"); listImage.sprite = Resources.Load<Sprite>("bgYello");
nameText.color = new UnityEngine.Color(246/255f, 194/255f, 146 / 255f);
} }
else if (list == 2) else if (list == 2)
{ {
listImage.sprite = Resources.Load<Sprite>("bgGreen"); listImage.sprite = Resources.Load<Sprite>("bgGreen");
nameText.color = new UnityEngine.Color(201 / 255f, 208/255f, 144 / 255f);
} }
else if (list == 3) else if (list == 3)
{ {
listImage.sprite = Resources.Load<Sprite>("bgBlue"); listImage.sprite = Resources.Load<Sprite>("bgBlue");
nameText.color = new UnityEngine.Color(144/255f, 206 / 255f, 208/255f);
} }
else else
{ {

View File

@ -11,17 +11,27 @@ public class DonatePanelItem : BaseUIPanel
public Text NumberOfFreeSnailShells; public Text NumberOfFreeSnailShells;
public Text Fees; public Text Fees;
public Text Total; public Text Total;
public Button Button;
void Start() void Start()
{ {
Recipient.onValueChanged.AddListener((userInput) => GetInputData(userInput, Recipient));
GiftQuantity.onValueChanged.AddListener((userInput) => GetInputData(userInput, GiftQuantity));
GiftQuantity.onValueChanged.AddListener(GiftQuantityData); GiftQuantity.onValueChanged.AddListener(GiftQuantityData);
Button.onClick.AddListener(buttonOnClick);
testLogo();
} }
void GetInputData(string userInput, TMP_InputField tmp) public class voluteCoinItem
{ {
//ButtonClickAnimationAsync(tmp.gameObject,1.01f); public string toCuteNo;
public int voluteCoin;
}
async void buttonOnClick()
{
voluteCoinItem body = new voluteCoinItem();
body.toCuteNo = Recipient.text;
body.voluteCoin = int.Parse(GiftQuantity.text);
string response = await web.SendRequest(web.URL + "/snail/transfer/voluteCoin", "POST", JsonUtility.ToJson(body), testhead);//²âÊÔ
Debug.Log(response);
} }
async void GiftQuantityData(string userInput) async void GiftQuantityData(string userInput)
{ {

View File

@ -10,6 +10,15 @@ using UnityEngine.UI;
public class Base : MonoBehaviour public class Base : MonoBehaviour
{ {
public Button retbutton; public Button retbutton;
public GameObject ClosureObj;
private void Awake()
{
if (retbutton != null)
{
retbutton.onClick.AddListener(() => CancelOnClick(retbutton, ClosureObj));
}
}
public async Task ButtonClickAnimationAsync(GameObject button,float max=1.25f)//°´Å¥¶¯»­ public async Task ButtonClickAnimationAsync(GameObject button,float max=1.25f)//°´Å¥¶¯»­
{ {
TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>(); TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>();
@ -48,11 +57,12 @@ public class Base : MonoBehaviour
addEventPopUp("²âÊԵǼ³É¹¦"); addEventPopUp("²âÊԵǼ³É¹¦");
testhead = new Dictionary<string, string> testhead = new Dictionary<string, string>
{ {
{ "Authorization", TestserverResponse.data.token } { "Authorization", TestserverResponse.data.token }
}; };
return;
} }
addEventPopUp("꿎桿되쩌呵겨"); addEventPopUp(response.message);
testhead = new Dictionary<string, string>(); testhead = new Dictionary<string, string>();
} }
@ -64,9 +74,17 @@ public class Base : MonoBehaviour
return regex.IsMatch(text); return regex.IsMatch(text);
} }
public async void CancelOnClick(Button button)//혤句객큐 public async void CancelOnClick(Button button,GameObject my_gameObject = null)//È¡Ïû°´Å¥
{ {
await ButtonClickAnimationAsync(button.gameObject); await ButtonClickAnimationAsync(button.gameObject);
if (my_gameObject != null)
{
Destroy(my_gameObject);
return;
}
Destroy(gameObject); Destroy(gameObject);
} }
} }

View File

@ -166,6 +166,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ee75c61d57c722e468ed4011fa66bea8, type: 3} m_Script: {fileID: 11500000, guid: ee75c61d57c722e468ed4011fa66bea8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
retbutton: {fileID: 0}
Panel: {fileID: 158567709692854181} Panel: {fileID: 158567709692854181}
CloseBTN: {fileID: 0} CloseBTN: {fileID: 0}
inputField: {fileID: 6168167768698745100} inputField: {fileID: 6168167768698745100}

View File

@ -121,19 +121,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 3410210057816977128} m_TargetGraphic: {fileID: 3410210057816977128}
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls: []
- m_Target: {fileID: 4509579862271681879}
m_TargetAssemblyTypeName: BaseUIPanel, Assembly-CSharp
m_MethodName:
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &821927266036662165 --- !u!1 &821927266036662165
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1327,13 +1315,15 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 02ca8bd802049024389ac844292ef713, type: 3} m_Script: {fileID: 11500000, guid: 02ca8bd802049024389ac844292ef713, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Panel: {fileID: 0} retbutton: {fileID: 3568963963287766741}
Panel: {fileID: 4509579862240682304}
CloseBTN: {fileID: 0} CloseBTN: {fileID: 0}
Recipient: {fileID: 5167839042553029366} Recipient: {fileID: 5167839042553029366}
GiftQuantity: {fileID: 8527512286296714387} GiftQuantity: {fileID: 8527512286296714387}
NumberOfFreeSnailShells: {fileID: 4509579860519678074} NumberOfFreeSnailShells: {fileID: 4509579860519678074}
Fees: {fileID: 8527512285347044353} Fees: {fileID: 8527512285347044353}
Total: {fileID: 8527512286273835625} Total: {fileID: 8527512286273835625}
Button: {fileID: 3364760182085171127}
--- !u!1 &5167839042247917623 --- !u!1 &5167839042247917623
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0