コード例 #1
0
ファイル: UIMainPanel.cs プロジェクト: Patryk-S-W/PG-Explorer
 public UIMainPanel()
 {
     if (singleton == null)
     {
         singleton = this;
     }
 }
        public static void Initialize()
        {
            //  Map = European?
            //
            var go = new GameObject("AmericanRoadsignsTool");

            try
            {
                go.AddComponent <AmericanRoadsignsTool>();
                //  Init. GUI Components:
                m_mainbutton = UIView.GetAView().AddUIComponent(typeof(UIMainButton)) as UIMainButton;
                DebugUtils.Log("MainButton created.");
                m_mainpanel = UIView.GetAView().AddUIComponent(typeof(UIMainPanel)) as UIMainPanel;
                DebugUtils.Log("MainPanel created.");
                //  Set vars:
                isGameLoaded   = true;
                strModLocation = "Workshop";
                ConfigFileName = (PluginManager.noWorkshop) ? ConfigFileNameLocal : ConfigFileNameOnline;
                DebugUtils.Log($"Currently used config File: {ConfigFileName}.");
            }
            catch (Exception e)
            {
                DebugUtils.LogException(e);
                if (go != null)
                {
                    Destroy(go);
                }
            }
        }
コード例 #3
0
 public override void OnOpen(params object[] args)
 {
     instance = this;
     Init();
     ShowHp();
     curSkillTabIndex = -1;
     skillTab.SelectTab(0);
 }
コード例 #4
0
 public bool isActiveMainPanel(UIMainPanel panel)
 {
     return(_UIMainPanelsState[(int)panel]);
 }
コード例 #5
0
 /// <summary>
 ///  For removing a UIMainPanel
 /// </summary>
 /// <param name="MainPanelShow"></param>
 public void HideUIMainPanel(UIMainPanel mainPanel)
 {
     _UIMainPanels[(int)mainPanel].SetActive(false);
     _UIMainPanelsState[(int)mainPanel] = false;
 }
コード例 #6
0
 /// <summary>
 /// This method will show the MainPanel of the UI, usefull for activate a UIMainPanel for the first
 /// time or to show more than once at a time (character+inventory)
 /// </summary>
 /// <param name="MainPanelShow"></param>
 public void ShowUIMainPanel(UIMainPanel mainPanel)
 {
     _UIMainPanels[(int)mainPanel].SetActive(true);
     _UIMainPanelsState[(int)mainPanel] = true;
 }
コード例 #7
0
 public override void OnClose()
 {
     instance = null;
 }
コード例 #8
0
ファイル: UIMainPanel.cs プロジェクト: tuitutor/test1
 void Awake()
 {
     singleton = this;
 }
コード例 #9
0
 public void setUIReference(UIMainPanel uiMainPanel)
 {
     this.uiMainPanel = uiMainPanel;
     uiMainPanel.init(onClickPVEButtonCallback, onClickPVPButtonCallback, onClickClubPVPButtonCallback);
 }
コード例 #10
0
 public void BindView(UIMainPanel mainPanel)
 {
     _percent.Subscibe(mainPanel.SetLeftVirus);
 }