/// <summary> /// 矩形区域发生变化 /// </summary> protected virtual void OnRectChanged(GUIEventArgs e) { if (RectChanged != null) { RectChanged(owner, e); } }
/// <summary> /// Handler invoked internally when the button is clicked. /// </summary> protected internal void OnCliked(GUIEventArgs e) { if (Clicked != null) { Clicked(this, e); } }
protected virtual void OnOwnerChanged(GUIEventArgs e) { if (OwnerChanged != null) { OwnerChanged(owner, e); } }
private void closeButton_Clicked(object sender, GUIEventArgs e) { if (CloseButtonClicked != null) { CloseButtonClicked(this, e); } }
protected internal override void OnSized(GUIEventArgs e) { base.OnSized(e); ConfigureScrollBars(); //LayoutComponentWidgets(); }
protected virtual void OnCaptureGained(GUIEventArgs e) { if (CaptureGained != null) { CaptureGained(this, e); } }
virtual protected void OnResourceTextureChange(GUIEventArgs gUIEventArgs) { if (ResourceTextureChange != null) { ResourceTextureChange(this, gUIEventArgs); } }
protected internal override void OnCaptureLost(GUIEventArgs e) { base.OnCaptureLost(e); dragging = false; e.Handled = true; }
protected virtual void OnCaptureLost(GUIEventArgs e) { if (CaptureLost != null) { CaptureLost(this, e); } }
/// <summary> /// 文字内容发生改变 /// </summary> protected virtual void OnTextChanged(GUIEventArgs e) { if (TextChanged != null) { TextChanged(this, e); } }
void btnOK_Clicked(object sender, GUIEventArgs e) { // 发送创建角色消息 C2S_CharCreate msg; msg.messageId = C2S_CharCreate.Id; GameFrameManager.SendNetMessage <C2S_CharCreate>(msg); }
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; } }
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)); }
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; }
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); } }
public void OnDraw(Object sender, GUIEventArgs args) { //绘制周围的角色信息 DrawAroundRoles(); //绘制指北针 DrawNorthPointer(); //绘制角色所在的位置 DrawPlayerPosition(); }
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); } }
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; } }
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."); } }
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(); }
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(); }
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); } }
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(); }
private void window_CaptureLost(object sender, GUIEventArgs e) { OnCaptureLost(e); }
private void window_CaptureGained(object sender, GUIEventArgs e) { OnCaptureGained(e); }
void btnCancel_Clicked(object sender, GUIEventArgs e) { // 退出游戏 Program.game.Exit(); }
void btnCancel_Clicked(object sender, GUIEventArgs e) { // 返回选择角色界面 GameFrameManager.Instance.CurrentFrameType = GameFrameType.SelectRole; }
private void increaseButton_Clicked(object sender, GUIEventArgs e) { ScrollPosition = position + stepSize; }