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

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

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

            msg.messageId = C2S_CharCreate.Id;
            GameFrameManager.SendNetMessage <C2S_CharCreate>(msg);
        }
Пример #12
0
        protected internal override void OnCaptureLost(GUIEventArgs e)
        {
            base.OnCaptureLost(e);

            pushed = false;
            UpdateInternalState(MouseCursor.Instance.Position);
            RequestRedraw();
        }
Пример #13
0
        protected override void OnOwnerChanged(GUIEventArgs e)
        {
            base.OnOwnerChanged(e);

            foreach (var item in treeNodes)
            {
                item.Owner = this.Owner;
            }
        }
Пример #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));
        }
Пример #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;
        }
Пример #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);
            }
        }
Пример #17
0
        public void OnDraw(Object sender, GUIEventArgs args)
        {
            //绘制周围的角色信息
            DrawAroundRoles();

            //绘制指北针
            DrawNorthPointer();

            //绘制角色所在的位置
            DrawPlayerPosition();
        }
Пример #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);
            }
        }
Пример #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;
            }
        }
Пример #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.");
     }
 }
Пример #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();
        }
Пример #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();
        }
Пример #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);
            }
        }
Пример #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);
        }
Пример #25
0
        protected internal override void OnSized(GUIEventArgs e)
        {
            base.OnSized(e);

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