修改面板陶芮奇
This commit is contained in:
parent
d8168242dd
commit
66044431de
|
|
@ -1,7 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 672f80c7898fe3c4a8b3e740b3ac9bb0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d0b6625a18e551e4ab05ea70f10da795
|
||||
guid: 428a39dea27f1fc45acddfd41e0f6765
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6d37bf19b96c943489b7955d49b9f346
|
||||
guid: ca0f341d0b1b2cb479ab9f2ac2d115d3
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
|
|
|||
|
|
@ -8,12 +8,20 @@ public class UI_MenuBar : BasePanel
|
|||
{
|
||||
[SerializeField]
|
||||
private Sprite ClickSprite;
|
||||
//展开按钮,工具间,前往现场,办理工作票,任务单,返回办公室,拆装填写工单
|
||||
private Button CloseDefaultBtn, TooLRoToolRoomBtnomBtn, SiteBtn, WorkOrderBtn, MissionBtn, OfficeBtn, DisassemblyAssemblyWorkOrderBtn;
|
||||
//右侧弹窗
|
||||
private Image MenuBarIamge;
|
||||
public void Init()
|
||||
{
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
|
||||
MenuBarIamge = GetControl<Image>("MenuBar");
|
||||
CloseDefaultBtn = GetControl<Button>("CloseDefaultBtn");
|
||||
TooLRoToolRoomBtnomBtn = GetControl<Button>("TooLRoToolRoomBtnomBtn");
|
||||
SiteBtn = GetControl<Button>("SiteBtn");
|
||||
WorkOrderBtn = GetControl<Button>("WorkOrderBtn");
|
||||
MissionBtn = GetControl<Button>("MissionBtn");
|
||||
OfficeBtn = GetControl<Button>("OfficeBtn");
|
||||
DisassemblyAssemblyWorkOrderBtn = GetControl<Button>("DisassemblyAssemblyWorkOrderBtn");
|
||||
}
|
||||
//public override void ShowMe()
|
||||
//{
|
||||
|
|
@ -24,22 +32,42 @@ public class UI_MenuBar : BasePanel
|
|||
//{
|
||||
|
||||
//}
|
||||
|
||||
public void checkBtnBySceneName()
|
||||
{
|
||||
TooLRoToolRoomBtnomBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室"|| GlobalFlag.currentSceneName == "现场");
|
||||
SiteBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" || GlobalFlag.currentSceneName == "现场");
|
||||
WorkOrderBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" || GlobalFlag.currentSceneName == "现场");
|
||||
MissionBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" || GlobalFlag.currentSceneName == "现场" || GlobalFlag.currentSceneName == "工具间");
|
||||
OfficeBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" );
|
||||
DisassemblyAssemblyWorkOrderBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" );
|
||||
}
|
||||
protected override void OnClick(string btnName)
|
||||
{
|
||||
|
||||
switch (btnName)
|
||||
{
|
||||
case "CloseDefaultBtn":
|
||||
gameObject.transform.Find("CloseDefaultBtn").GetComponent<Image>().sprite = ClickSprite;
|
||||
gameObject.transform.Find("MenuBar").GetComponent<RectTransform>().DOLocalMoveX(960, 0.5f);
|
||||
if (gameObject.transform.Find("MenuBar").GetComponent<RectTransform>().localPosition.x == 960)
|
||||
//gameObject.transform.Find("CloseDefaultBtn").GetComponent<Image>().sprite = ClickSprite;
|
||||
MenuBarIamge.rectTransform.DOLocalMoveX(960, 0.5f);
|
||||
if (MenuBarIamge.rectTransform.localPosition.x == 960)
|
||||
{
|
||||
|
||||
gameObject.transform.Find("MenuBar").GetComponent<RectTransform>().DOLocalMoveX(1070, 0.5f);
|
||||
MenuBarIamge.rectTransform.DOLocalMoveX(1070, 0.5f);
|
||||
//gameObject.transform.Find("CloseDefaultBtn").GetComponent<Image>().sprite = ClickSprite;
|
||||
}
|
||||
//switch (GlobalFlag.currentSceneName)
|
||||
//{
|
||||
// case "Office":
|
||||
|
||||
// break;
|
||||
// case "TooLRoom":
|
||||
|
||||
// break;
|
||||
// case "Site":
|
||||
|
||||
// break;
|
||||
//}
|
||||
break;
|
||||
|
||||
case "ToolRoomBtn":
|
||||
SceneManager.LoadScene("04_ToolMaterialScene");
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UI_SessionPanel : BasePanel
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
//Init();
|
||||
}
|
||||
|
||||
private Button ContinueBtn;
|
||||
private TextMeshPro Text_DialogBoxTMP;
|
||||
/// <summary>
|
||||
/// ³õʼ»¯
|
||||
/// </summary>
|
||||
public void Init()
|
||||
{
|
||||
//GetControl<TextMeshPro>("Text_DialogBox").text = "ÄãºÃ";
|
||||
ContinueBtn = GetControl<Button>("ContinueBtn");
|
||||
Text_DialogBoxTMP = GetControl<TextMeshPro>("Text_DialogBox");
|
||||
}
|
||||
public override void ShowMe()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue