Esempio n. 1
0
 /// <summary>
 /// 矩形区域发生变化
 /// </summary>
 protected virtual void OnRectChanged(GUIEventArgs e)
 {
     if (RectChanged != null)
     {
         RectChanged(owner, e);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Handler invoked internally when the button is clicked.
 /// </summary>
 protected internal void OnCliked(GUIEventArgs e)
 {
     if (Clicked != null)
     {
         Clicked(this, e);
     }
 }
Esempio n. 3
0
 protected virtual void OnOwnerChanged(GUIEventArgs e)
 {
     if (OwnerChanged != null)
     {
         OwnerChanged(owner, e);
     }
 }
Esempio n. 4
0
 private void closeButton_Clicked(object sender, GUIEventArgs e)
 {
     if (CloseButtonClicked != null)
     {
         CloseButtonClicked(this, e);
     }
 }
Esempio n. 5
0
        protected internal override void OnSized(GUIEventArgs e)
        {
            base.OnSized(e);

            ConfigureScrollBars();
            //LayoutComponentWidgets();
        }
Esempio n. 6
0
 protected virtual void OnCaptureGained(GUIEventArgs e)
 {
     if (CaptureGained != null)
     {
         CaptureGained(this, e);
     }
 }
Esempio n. 7
0
 virtual protected void OnResourceTextureChange(GUIEventArgs gUIEventArgs)
 {
     if (ResourceTextureChange != null)
     {
         ResourceTextureChange(this, gUIEventArgs);
     }
 }
Esempio n. 8
0
        protected internal override void OnCaptureLost(GUIEventArgs e)
        {
            base.OnCaptureLost(e);

            dragging  = false;
            e.Handled = true;
        }
Esempio n. 9
0
 protected virtual void OnCaptureLost(GUIEventArgs e)
 {
     if (CaptureLost != null)
     {
         CaptureLost(this, e);
     }
 }
Esempio n. 10
0
 /// <summary>
 /// 文字内容发生改变
 /// </summary>
 protected virtual void OnTextChanged(GUIEventArgs e)
 {
     if (TextChanged != null)
     {
         TextChanged(this, e);
     }
 }
Esempio n. 11
0
        void btnOK_Clicked(object sender, GUIEventArgs e)
        {
            // 发送创建角色消息
            C2S_CharCreate msg;

            msg.messageId = C2S_CharCreate.Id;
            GameFrameManager.SendNetMessage <C2S_CharCreate>(msg);
        }
Esempio n. 12
0
        protected internal override void OnCaptureLost(GUIEventArgs e)
        {
            base.OnCaptureLost(e);

            pushed = false;
            UpdateInternalState(MouseCursor.Instance.Position);
            RequestRedraw();
        }
        protected override void OnOwnerChanged(GUIEventArgs e)
        {
            base.OnOwnerChanged(e);

            foreach (var item in treeNodes)
            {
                item.Owner = this.Owner;
            }
        }
Esempio n. 14
0
        protected internal override void OnCaptureLost(GUIEventArgs e)
        {
            base.OnCaptureLost(e);

            // we are no longer dragging no that the thumb is released
            isBeingDragged = false;

            // send notification whenever thumb is released
            OnPositionChanged(new WindowEventArgs(this));
        }
Esempio n. 15
0
        protected override void OnOwnerChanged(GUIEventArgs e)
        {
            base.OnOwnerChanged(e);
            InvalidateComponentRect();
            owner.RectChanged          += new EventHandler <GUIEventArgs>(owner_RectChanged);
            owner.AlphaChanged         += new EventHandler <GUIEventArgs>(owner_AlphaChanged);
            owner.InheritsAlphaChanged += new EventHandler <GUIEventArgs>(owner_InheritsAlphaChanged);

            Alpha = Owner != null ? Owner.EffectiveAlpha : 1.0f;
        }
Esempio n. 16
0
        private void addRowBtn_Clicked(object sender, GUIEventArgs e)
        {
            int     index = this.AppendRow();
            GridRow row   = this.GridData[index];

            for (int col = 0; col < ColumnCount; ++col)
            {
                UIComp_DrawListboxItem comp = row[col];
                comp.Text = "C " + index.ToString(System.Globalization.CultureInfo.CurrentCulture) + "-" + col.ToString(System.Globalization.CultureInfo.CurrentCulture);
            }
        }
Esempio n. 17
0
        public void OnDraw(Object sender, GUIEventArgs args)
        {
            //绘制周围的角色信息
            DrawAroundRoles();

            //绘制指北针
            DrawNorthPointer();

            //绘制角色所在的位置
            DrawPlayerPosition();
        }
Esempio n. 18
0
        private void addItemBtn_Clicked(object sender, GUIEventArgs e)
        {
            UIComp_TreeNodeBase newNode = this.AppendTreeNode(this.RootNode);

            newNode.Text = "My custom node";
            int count = 10;

            while (--count > 0)
            {
                newNode = newNode.InsertTreeNode(0);
            }
        }
Esempio n. 19
0
        protected override void OnOwnerChanged(GUIEventArgs e)
        {
            base.OnOwnerChanged(e);

            CacheOwnerData();
            if (this.nodeText != null)
            {
                this.nodeText.Owner = owner;
            }
            if (this.nodeIcon != null)
            {
                this.nodeIcon.Owner = owner;
            }
        }
Esempio n. 20
0
 private void addCellBtn_Clicked(object sender, GUIEventArgs args)
 {
     try
     {
         this.SetGridItem(0, 0, "addCellBtn_Clicked");
     }
     catch (Nexus.GUI.InvalidRequestException e)
     {
         NLogger.Instance.WriteString(LogType.Info, e.Message);
         throw e;
     }
     catch
     {
         NLogger.Instance.WriteString(LogType.Info, "Can not set grid item content.");
     }
 }
Esempio n. 21
0
        void btnEnterGame_Clicked(object sender, GUIEventArgs e)
        {
            // 发送进入游戏消息
            C2S_CharEnterGame enterGameReq;

            enterGameReq.messageId = C2S_CharEnterGame.Id;
            enterGameReq.PlayerId  = 125;
            GameFrameManager.SendNetMessage <C2S_CharEnterGame>(enterGameReq);

            // 请求服务器事件
            C2S_CheckTime checkTimeReq;

            checkTimeReq.MessageId       = C2S_CheckTime.Id;
            checkTimeReq.ClientTimeStamp = NativeEngineHelper.GetTimeSeconds();
            GameFrameManager.SendNetMessage <C2S_CheckTime>(checkTimeReq);

            btnEnterGame.Disable();
        }
Esempio n. 22
0
        void btnOK_Clicked(object sender, GUIEventArgs e)
        {
            // 发送登录消息
            // Create a point struct.
            C2S_LoginProof loginMsg;

            loginMsg.messageId  = C2S_LoginProof.Id;
            loginMsg.CurVersion = 0;
            loginMsg.AccountID  = NativeEngineHelper.CheckCRC(uiID.Text.ToString().Trim());
            string password = uiPassword.Text.ToString().Trim();

            loginMsg.Password = password;
            loginMsg.IP       = 0;
            loginMsg.Mac      = String.Empty;
            GameFrameManager.SendNetMessage <C2S_LoginProof>(loginMsg);

            btnOK.Disable();
        }
Esempio n. 23
0
        virtual protected void OnAltasItemChanged(GUIEventArgs gUIEventArgs)
        {
            NResourceTextureAtlas texAtlas = TextureAtlas;

            if (texAtlas != null)
            {
                NTexAtlasItem item = texAtlas.GetItem(atlasItemName);
                TextureUVRect = new Rect(item.UVStart.x, item.UVStart.y, item.UVEnd.x, item.UVEnd.y);

                if (AltasRectChanged != null)
                {
                    AltasRectChanged(this, new GUIEventArgs());
                }
            }

            if (AltasItemChanged != null)
            {
                AltasItemChanged(this, gUIEventArgs);
            }
        }
Esempio n. 24
0
        private void nodeText_TextChanged(object sender, GUIEventArgs e)
        {
            Rect textRect = this.nodeText.Font.MeasureString(this.nodeText.Text, this.nodeText.TextFormat);

            this.nodeText.Width = new UIDim(0, textRect.Width);
        }
        protected internal override void OnSized(GUIEventArgs e)
        {
            base.OnSized(e);

            UpdateThumb();
        }
Esempio n. 26
0
 private void window_CaptureLost(object sender, GUIEventArgs e)
 {
     OnCaptureLost(e);
 }
Esempio n. 27
0
 private void window_CaptureGained(object sender, GUIEventArgs e)
 {
     OnCaptureGained(e);
 }
Esempio n. 28
0
 void btnCancel_Clicked(object sender, GUIEventArgs e)
 {
     // 退出游戏
     Program.game.Exit();
 }
Esempio n. 29
0
 void btnCancel_Clicked(object sender, GUIEventArgs e)
 {
     // 返回选择角色界面
     GameFrameManager.Instance.CurrentFrameType = GameFrameType.SelectRole;
 }
Esempio n. 30
0
 private void increaseButton_Clicked(object sender, GUIEventArgs e)
 {
     ScrollPosition = position + stepSize;
 }