示例#1
0
        public void initUI()
        {
            UIPanel    panel = gameObject.GetComponent <UIPanel>();
            GComponent view  = panel.ui; // 整个UI的集合

            // 上面的对话框
            m_dialog      = view.GetChild("Dialog").asLabel;
            m_dialog.text = "";
            m_nextButton  = view.GetChild("NextButton").asButton;
            m_nextButton.onClick.Add(nextButton_Click);
            m_destinButton = view.GetChild("DestinButton").asButton;
            m_destinButton.onClick.Add(destinButton_Click);
            Debug.Log(m_i);
            if (m_i == 0) // 证明从HomeScene第一章跳转过来的
            {
                m_destinButton.visible = false;
            }
            else if (m_i == 7) // 这是要第一次就要去Grace那里
            {
                m_destinButton.text  = "XGP理工大学";
                m_nextButton.visible = false;
            }
            else if (m_i == 14 || m_i == 17) // 证明从GrandpaScene第二章跳转过来的 或 Grace转到最后章时
            {
                m_nextButton.visible   = true;
                m_destinButton.visible = false;
                isActive = true;
            }
        }
示例#2
0
        public void Awake(GObject go)
        {
            if (go == null)
            {
                return;
            }

            GObject = go;

            if (string.IsNullOrWhiteSpace(Name))
            {
                Name = Id.ToString();
            }

            self = (GLabel)go;

            self.Add(this);

            var com = go.asCom;

            if (com != null)
            {
                n0          = (GImage)com.GetChildAt(0);
                title       = (GTextField)com.GetChildAt(1);
                icon        = (GLoader)com.GetChildAt(2);
                dragArea    = (GGraph)com.GetChildAt(3);
                contentArea = (GGraph)com.GetChildAt(4);
            }
        }
示例#3
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_frame = (GLabel)this.GetChildAt(0);
            m_List  = (GList)this.GetChildAt(1);
        }
示例#4
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_frame          = (GLabel)this.GetChildAt(0);
            m_LabelDayIncome = (GTextField)this.GetChildAt(3);
        }
示例#5
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_LoaderIcon = (GLoader)this.GetChildAt(1);
            m_LabelName  = (GLabel)this.GetChildAt(2);
        }
 public MiddleDeathEffect()
     : base(0, 1f, 1f, 1f)
 {
     this.m_Label = new GLabel("You are dead.", (IFont)Engine.GetFont(3), Hues.Default, 0, 0);
     this.m_Label.Center();
     Gumps.Desktop.Children.Add((Gump)this.m_Label);
 }
示例#7
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_Type       = this.GetControllerAt(0);
            m_List       = (GList)this.GetChildAt(1);
            m_LabelTitle = (GLabel)this.GetChildAt(2);
        }
示例#8
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_LabelDialog = (GLabel)this.GetChildAt(0);
            m_BtnRename   = (GButton)this.GetChildAt(1);
            m_LabelName   = (GTextField)this.GetChildAt(2);
        }
示例#9
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_LabelLevel  = (GTextField)this.GetChildAt(3);
            m_LabelCombat = (GTextField)this.GetChildAt(5);
            m_LabelName   = (GLabel)this.GetChildAt(6);
        }
        public void initUI()
        {
            UIPanel    panel = gameObject.GetComponent <UIPanel>();
            GComponent view  = panel.ui; // 整个UI的集合

            m_avatar    = new GComponent[3];
            m_avatar[0] = view.GetChild("AvatarGuard").asCom;
            m_avatar[1] = view.GetChild("AvatarTaoxi").asCom;
            m_avatar[2] = view.GetChild("AvatarComp").asCom;
            // 上面的对话框
            m_dialog      = view.GetChild("Dialog").asLabel;
            m_dialog.text = "";
            m_nextButton  = view.GetChild("NextButton").asButton;
            m_nextButton.onClick.Add(nextButton_Click);

            m_clue  = view.GetChild("Clue").asGroup;
            m_clue1 = view.GetChild("Clue1").asGroup;
            initClueList();
            GButton clueOKButton = view.GetChild("ClueOKButton").asButton;

            clueOKButton.onClick.Add(clueOKButton_Click);
            m_clueName         = view.GetChild("ClueName").asLabel;
            m_clueContent      = view.GetChild("ClueContent").asLabel;
            m_cluePoint        = view.GetChild("CluePoint").asLabel;
            m_clueContent      = m_clueContent.GetChild("Label").asLabel;
            m_clueContent.text = "";
            GComponent clueCloseButton = view.GetChild("ClueCloseButton").asCom;

            clueCloseButton.onClick.Add(clueCloseButton_Click);

            m_entrance = view.GetChild("Entrance").asGroup;

            m_console = view.GetChild("Console").asGroup;
            GButton collectionButton = view.GetChild("CollectButton").asButton;

            collectionButton.onClick.Add(collectionButton_Click);
            GButton driveButton = view.GetChild("DriveButton").asButton;

            driveButton.onClick.Add(driveButton_Click);

            GComponent wallpaper = view.GetChild("Wallpaper").asCom;
            GComponent map       = wallpaper.GetChild("Map").asCom;

            map.onClick.Add(map_Click);
            GComponent brain = wallpaper.GetChild("Brain").asCom;

            brain.onClick.Add(brain_Click);
            GComponent ball = wallpaper.GetChild("Ball").asCom;

            ball.onClick.Add(ball_Click);
            GComponent desk = wallpaper.GetChild("Desk").asCom;

            desk.onClick.Add(desk_Click);
            GComponent comp = wallpaper.GetChild("Comp").asCom;

            comp.onClick.Add(comp_Click);
        }
示例#11
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_LabelPlaceName = (GLabel)this.GetChildAt(1);
            m_IconReward1    = (GLabel)this.GetChildAt(6);
            m_IconReward2    = (GLabel)this.GetChildAt(7);
            m_IconReward3    = (GLabel)this.GetChildAt(8);
        }
示例#12
0
        public void updateHandler(Control control, InterfaceArgs args)
        {
            Health health = (Health)h_HealthMapper.get(control.caller);

            GLabel label = (GLabel)control;

            label.text = health.CurrentHealth + " / " + health.MaxHealth;
            label.resize();
        }
示例#13
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_MainType     = this.GetControllerAt(0);
            m_FacilityType = this.GetControllerAt(1);
            m_frame        = (GLabel)this.GetChildAt(0);
            m_List         = (GList)this.GetChildAt(6);
        }
示例#14
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_frame     = (GLabel)this.GetChildAt(0);
            m_BtnEnter  = (GButton)this.GetChildAt(2);
            m_InputName = (GLabel)this.GetChildAt(3);
            m_LabelCost = (GTextField)this.GetChildAt(4);
        }
示例#15
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_LabelName    = (GLabel)this.GetChildAt(1);
            m_LabelContent = (GTextField)this.GetChildAt(2);
            m_LoaderHead   = (GLoader)this.GetChildAt(3);
            m_BtnEscape    = (GButton)this.GetChildAt(4);
            m_BtnFight     = (GButton)this.GetChildAt(5);
        }
示例#16
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_frame        = (GLabel)this.GetChildAt(0);
            m_LoaderIcon   = (GLoader)this.GetChildAt(1);
            m_LabelContent = (GTextField)this.GetChildAt(2);
            m_BtnEnter     = (GButton)this.GetChildAt(4);
            m_LabelCost    = (GTextField)this.GetChildAt(5);
        }
示例#17
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_State      = this.GetControllerAt(0);
            m_LabelName  = (GLabel)this.GetChildAt(1);
            m_LabelLevel = (GTextField)this.GetChildAt(3);
            m_StarLevel  = (GComponent)this.GetChildAt(4);
            m_LoaderHead = (GLoader)this.GetChildAt(5);
        }
示例#18
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_Hot        = this.GetControllerAt(0);
            m_LoaderIcon = (GLoader)this.GetChildAt(1);
            m_LabelName  = (GLabel)this.GetChildAt(2);
            m_LabelInfo1 = (GTextField)this.GetChildAt(3);
            m_LabelInfo2 = (GTextField)this.GetChildAt(4);
        }
示例#19
0
 public GAttributeCurMax(int x, int y, int w, int h, int c, int m, IFont font, IHue hue)
     : base(x, y, w, h)
 {
     this.m_Current  = c;
     this.m_Maximum  = m;
     this.m_GCurrent = (GLabel) new GWrappedLabel(this.m_Current.ToString(), font, hue, 0, 0, w * 2);
     this.m_GMaximum = (GLabel) new GWrappedLabel(this.m_Maximum.ToString(), font, hue, 0, 11, w * 2);
     this.m_Children.Add((Gump)this.m_GCurrent);
     this.m_Children.Add((Gump)this.m_GMaximum);
     this.Update();
 }
示例#20
0
        public GSellGump_OfferedItem(GSellGump owner, SellInfo si)
            : base(32, 67, 196, 0)
        {
            this.m_OfferMenu = owner.OfferMenu;
            IFont font = (IFont)Engine.GetUniFont(3);
            IHue  hue  = Hues.Load(648);

            this.m_xAmount     = si.ToSell;
            this.m_Amount      = new GLabel(si.ToSell.ToString(), font, hue, 0, 0);
            this.m_Description = (GLabel) new GWrappedLabel(string.Format("{0} at {1} gp", (object)si.Name, (object)si.Price), font, hue, 41, 0, 105);
            this.m_More        = new GSellGump_AmountButton(owner, si, 5, 55, 155);
            this.m_Less        = new GSellGump_AmountButton(owner, si, -5, 56, 173);
            this.m_Height      = this.m_Amount.Image.yMax - this.m_Amount.Image.yMin + 1;
            int num = this.m_Description.Image.yMax - this.m_Description.Image.yMin + 1;

            if (num > this.m_Height)
            {
                this.m_Height = num;
            }
            int height1 = this.m_More.Height;

            if (height1 > this.m_Height)
            {
                this.m_Height = height1;
            }
            int height2 = this.m_Less.Height;

            if (height2 > this.m_Height)
            {
                this.m_Height = height2;
            }
            this.m_Amount.X      -= this.m_Amount.Image.xMin;
            this.m_Amount.Y       = (this.m_Height - (this.m_Amount.Image.yMax - this.m_Amount.Image.yMin + 1)) / 2;
            this.m_Description.X -= this.m_Description.Image.xMin;
            this.m_Description.Y  = (this.m_Height - (this.m_Description.Image.yMax - this.m_Description.Image.yMin + 1)) / 2;
            if (this.m_Amount.Y > this.m_Description.Y)
            {
                this.m_Amount.Y = this.m_Description.Y;
            }
            this.m_Amount.Y      -= this.m_Amount.Image.yMin;
            this.m_Description.Y -= this.m_Description.Image.yMin;
            this.m_More.Y         = (this.m_Height - this.m_More.Height) / 2;
            this.m_Less.Y         = (this.m_Height - this.m_Less.Height) / 2;
            this.m_Children.Add((Gump)this.m_Amount);
            this.m_Children.Add((Gump)this.m_Description);
            this.m_Children.Add((Gump)this.m_More);
            this.m_Children.Add((Gump)this.m_Less);
            this.Clipper = this.m_OfferMenu.ContentClipper;
            if (!Engine.ServerFeatures.AOS)
            {
                return;
            }
            this.Tooltip = (ITooltip) new ItemTooltip(si.Item);
        }
示例#21
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_LoaderHead = (GLoader)this.GetChildAt(2);
            m_LabelLevel = (GTextField)this.GetChildAt(4);
            m_LabelName  = (GLabel)this.GetChildAt(5);
            m_LabelAttr1 = (GTextField)this.GetChildAt(7);
            m_LabelAttr2 = (GTextField)this.GetChildAt(9);
            m_StarLevel  = (GComponent)this.GetChildAt(11);
        }
示例#22
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_frame      = (GLabel)this.GetChildAt(0);
            m_BtnCancel  = (GButton)this.GetChildAt(3);
            m_BtnSetting = (GButton)this.GetChildAt(4);
            m_LabelPrice = (GLabel)this.GetChildAt(5);
            m_BtnPlus    = (GButton)this.GetChildAt(6);
            m_BtnMinus   = (GButton)this.GetChildAt(7);
        }
示例#23
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_ViewState        = this.GetControllerAt(0);
            m_frame            = (GLabel)this.GetChildAt(0);
            m_TabActorInfo     = (UI_TabActorInfo)this.GetChildAt(7);
            m_TabSecretaryInfo = (UI_TabSecretaryInfo)this.GetChildAt(8);
            m_TabGuardInfo     = (UI_TabGuardInfo)this.GetChildAt(9);
            m_TabZooInfo       = (UI_TabZooInfo)this.GetChildAt(10);
        }
示例#24
0
 public MiddleFadeEffect(Playback video, string[] text, int index)
     : base(0, 1f, 1f, text[index] == "" ? 1f : 4f)
 {
     this._video        = video;
     this._text         = text;
     this._index        = index;
     this.m_Label       = new GLabel(this._text[this._index], (IFont)Engine.GetFont(4), Hues.Load(33921), 0, 0);
     this.m_Label.Alpha = 0.0f;
     this.m_Label.X     = (Engine.GameWidth - this.m_Label.Width) / 2;
     this.m_Label.Y     = (Engine.GameHeight - this.m_Label.Height) / 2;
     Gumps.Desktop.Children.Add((Gump)this.m_Label);
 }
示例#25
0
        void Start()
        {
            m_i = PlayerPrefs.GetInt("m_i");
            UIPanel    panel = gameObject.GetComponent <UIPanel>();
            GComponent view  = panel.ui; // 整个UI的集合

            m_dialog      = view.GetChild("Dialog").asLabel;
            m_dialog.text = "";
            m_nextButton  = view.GetChild("NextButton").asButton;
            m_nextButton.onClick.Add(nextButton_Click);
            isActive = true;
        }
示例#26
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_CondType       = this.GetControllerAt(0);
            m_Type           = this.GetControllerAt(1);
            m_Icon           = (GButton)this.GetChildAt(1);
            m_LabelName      = (GTextField)this.GetChildAt(2);
            m_LabelCond      = (GTextField)this.GetChildAt(3);
            m_LabelTypeValue = (GLabel)this.GetChildAt(5);
            m_LabelCount     = (GTextField)this.GetChildAt(6);
        }
示例#27
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_ViewState  = this.GetControllerAt(0);
            m_SortType   = this.GetControllerAt(1);
            m_ListFrame  = (GLabel)this.GetChildAt(1);
            m_List       = (GList)this.GetChildAt(7);
            m_LabelCount = (GTextField)this.GetChildAt(8);
            m_CBSort     = (GComboBox)this.GetChildAt(9);
            m_LabelEmpty = (GTextField)this.GetChildAt(11);
            m_BtnBack    = (GButton)this.GetChildAt(12);
        }
示例#28
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_IconHead        = (GLoader)this.GetChildAt(1);
            m_LabelName       = (GLabel)this.GetChildAt(2);
            m_StarLevel       = (GComponent)this.GetChildAt(3);
            m_LabelLevel      = (GTextField)this.GetChildAt(5);
            m_IconXinFaCond   = (GLoader)this.GetChildAt(6);
            m_IconCanBenCond  = (GLoader)this.GetChildAt(7);
            m_LabelXinFaCond  = (GTextField)this.GetChildAt(8);
            m_LabelCanBenCond = (GTextField)this.GetChildAt(9);
        }
示例#29
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_ViewState   = this.GetControllerAt(0);
            m_frame       = (GLabel)this.GetChildAt(0);
            m_BtnJump     = (GComponent)this.GetChildAt(1);
            m_TypeList    = (GList)this.GetChildAt(2);
            m_LoaderIcon  = (GLoader)this.GetChildAt(3);
            m_AttrList    = (GList)this.GetChildAt(4);
            m_ListBuyItem = (GList)this.GetChildAt(7);
            m_GroupBuy    = (GGroup)this.GetChildAt(8);
        }
示例#30
0
            private void StartUp()
            {
                this.m_phoneNum    = this.FUIComponent.GetChild("n33").asLabel;
                this.m_name        = this.FUIComponent.GetChild("n34").asLabel;
                this.m_passWord    = this.FUIComponent.GetChild("n35").asLabel;
                this.m_registerBtn = this.FUIComponent.GetChild("n36").asButton;
                this.m_closeBtn    = this.FUIComponent.GetChild("n37").asButton;

                this.m_registerBtn.onClick.Set(RegistBtn_OnClick);

                this.m_closeBtn.onClick.Set(this.OnClose);

                this.UI();
            }