protected void PlayerPanel_MouseClick(object sender, Crow.MouseButtonEventArgs e) { MagicEngine me = MagicEngine.CurrentEngine; if (me.pp != me.ip) { return; } me.MagicStack.TryToHandleClick(this); }
void ActionDone_MouseClick(object sender, Crow.MouseButtonEventArgs e) { if (NextActionOnStack != null) { NextActionOnStack.Validate(); } else if (UIActionIsChoice) { PopMSE(); } //MagicEngine.CurrentEngine.CancelLastActionOnStack (); }
internal override void itemClick(object sender, MouseButtonEventArgs e) { GraphicObject tmp = sender as GraphicObject; if (!tmp.HasFocus) return; if (selectedItemContainer != null) { selectedItemContainer.Foreground = Color.Transparent; selectedItemContainer.Background = Color.Transparent; } selectedItemContainer = tmp; selectedItemContainer.Foreground = SelectionForeground; selectedItemContainer.Background = SelectionBackground; NotifyValueChanged ("SelectedItem", SelectedItem); raiseSelectedItemChanged (); }
public override void onMouseUp(object sender, MouseButtonEventArgs e) { base.onMouseUp (sender, e); GenericStack gs = Parent as GenericStack; if (init1 >= 0 && u1 == Unit.Percent) { if (gs.Orientation == Orientation.Horizontal) go1.Width = new Measure ((int)Math.Ceiling ( go1.Width.Value * 100.0 / (double)gs.Slot.Width), Unit.Percent); else go1.Height = new Measure ((int)Math.Ceiling ( go1.Height.Value * 100.0 / (double)gs.Slot.Height), Unit.Percent); } if (init2 >= 0 && u2 == Unit.Percent) { if (gs.Orientation == Orientation.Horizontal) go2.Width = new Measure ((int)Math.Floor ( go2.Width.Value * 100.0 / (double)gs.Slot.Width), Unit.Percent); else go2.Height = new Measure ((int)Math.Floor ( go2.Height.Value * 100.0 / (double)gs.Slot.Height), Unit.Percent); } }
void onMI_Click(object sender, MouseButtonEventArgs e) { Execute.Raise (this, null); if(!IsOpened) (LogicalParent as Menu).AutomaticOpenning = false; }
public virtual void onMouseDoubleClick(object sender, MouseButtonEventArgs e) { GraphicObject p = Parent as GraphicObject; if (p != null) p.onMouseDoubleClick(sender,e); MouseDoubleClick.Raise (this, e); }
public override void onMouseDown(object sender, MouseButtonEventArgs e) { base.onMouseDown (sender, e); if (e.Button == MouseButton.Left) updateMouseLocalPos (e.Position); }
public override void onMouseUp(object sender, MouseButtonEventArgs e) { base.onMouseUp (sender, e); if (!SelectionInProgress) return; updatemouseLocalPos (e.Position); SelectionInProgress = false; RegisterForRedraw (); }
/// <summary> /// Constructs a new <see cref="MouseButtonEventArgs"/> instance. /// </summary> /// <param name="args">The <see cref="MouseButtonEventArgs"/> instance to clone.</param> public MouseButtonEventArgs(MouseButtonEventArgs args) : this(args.X, args.Y, args.Button, args.IsPressed) { }
public override void onMouseDoubleClick(object sender, MouseButtonEventArgs e) { base.onMouseDoubleClick (sender, e); GotoWordStart (); SelBegin = CurrentPosition; GotoWordEnd (); SelRelease = CurrentPosition; SelectionInProgress = false; RegisterForRedraw (); }
protected void butQuitPress(object sender, MouseButtonEventArgs e) { CurrentInterface.MouseCursor = XCursor.Default; close (); }
public override void onMouseDown(object sender, MouseButtonEventArgs e) { base.onMouseDown (sender, e); holdCursor = true; }
protected void butMaximizePress(object sender, MouseButtonEventArgs e) { IsMaximized = !IsMaximized; }
public override void onMouseClick(object sender, MouseButtonEventArgs e) { Group pg = Parent as Group; if (pg != null) { for (int i = 0; i < pg.Children.Count; i++) { RadioButton c = pg.Children [i] as RadioButton; if (c == null) continue; c.IsChecked = (c == this); } } else IsChecked = !IsChecked; base.onMouseClick (sender, e); }
void onClearSplatting(object sender, Crow.MouseButtonEventArgs e) { CurrentState = State.ClearSplatting; }
void onClearHM(object sender, Crow.MouseButtonEventArgs e) { CurrentState = State.ClearHM; }
void onLoad(object sender, Crow.MouseButtonEventArgs e) { CurrentState = State.LoadMap; }
void onSaveSplatting(object sender, Crow.MouseButtonEventArgs e) { Texture.Save(splattingBrushShader.OutputTex, @"splat.png"); }
public override void onMouseDown(object sender, MouseButtonEventArgs e) { base.onMouseDown (sender, e); go1 = go2 = null; init1 = init2 = -1; delta = 0; GenericStack gs = Parent as GenericStack; int ptrSplit = gs.Children.IndexOf (this); if (ptrSplit == 0 || ptrSplit == gs.Children.Count - 1) return; go1 = gs.Children [ptrSplit - 1]; go2 = gs.Children [ptrSplit + 1]; if (gs.Orientation == Orientation.Horizontal) { initSplit (go1.Width, go1.Slot.Width, go2.Width, go2.Slot.Width); min1 = go1.MinimumSize.Width; min2 = go2.MinimumSize.Width; max1 = go1.MaximumSize.Width; max2 = go2.MaximumSize.Width; if (init1 >= 0) go1.Width = init1; if (init2 >= 0) go2.Width = init2; } else { initSplit (go1.Height, go1.Slot.Height, go2.Height, go2.Slot.Height); min1 = go1.MinimumSize.Height; min2 = go2.MinimumSize.Height; max1 = go1.MaximumSize.Height; max2 = go2.MaximumSize.Height; if (init1 >= 0) go1.Height = init1; if (init2 >= 0) go2.Height = init2; } }
public BubblingMouseButtonEventArg(MouseButtonEventArgs mbe) : base(mbe) { }
public override void onMouseDown(object sender, MouseButtonEventArgs e) { base.onMouseDown (sender, e); Rectangle cursInScreenCoord = ScreenCoordinates (cursor + Slot.Position); if (cursInScreenCoord.ContainsOrIsEqual (e.Position)) holdCursor = true; else if (_orientation == Orientation.Horizontal) { if (e.Position.X < cursInScreenCoord.Left) Value -= LargeIncrement; else Value += LargeIncrement; } else { if (e.Position.Y < cursInScreenCoord.Top) Value -= LargeIncrement; else Value += LargeIncrement; } }
public override void onMouseDown(object sender, MouseButtonEventArgs e) { if (this.HasFocus && _selectable){ updatemouseLocalPos (e.Position); SelBegin = -1; SelRelease = -1; SelectionInProgress = true; RegisterForRedraw();//TODO:should put it in properties } //done at the end to set 'hasFocus' value after testing it base.onMouseDown (sender, e); }
public override void onMouseUp(object sender,MouseButtonEventArgs e) { base.onMouseUp (sender, e); holdCursor = false; }
internal virtual void itemClick(object sender, MouseButtonEventArgs e) { SelectedIndex = data.IndexOf((sender as GraphicObject).DataSource); }
public override void onMouseDown(object sender, MouseButtonEventArgs e) { IsPressed = true; base.onMouseDown (sender, e); //TODO:remove NotifyValueChanged ("State", "pressed"); }
public override void onMouseUp(object sender, MouseButtonEventArgs e) { IsPressed = false; base.onMouseUp (sender, e); //TODO:remove NotifyValueChanged ("State", "normal"); }
void onDown(object sender, MouseButtonEventArgs e) { Value -= this.SmallIncrement; }
public virtual void onMouseUp(object sender, MouseButtonEventArgs e) { //bubble event to the top GraphicObject p = Parent as GraphicObject; if (p != null) p.onMouseUp(sender,e); MouseUp.Raise (this, e); if (MouseIsIn (e.Position) && IsActive) { if (CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick) CurrentInterface.eligibleForDoubleClick = this; onMouseClick (this, e); } }
void onUp(object sender, MouseButtonEventArgs e) { Value += this.SmallIncrement; }
public virtual void onMouseDown(object sender, MouseButtonEventArgs e) { if (CurrentInterface.eligibleForDoubleClick == this && CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick) onMouseDoubleClick (this, e); else currentInterface.clickTimer.Restart(); CurrentInterface.eligibleForDoubleClick = null; if (CurrentInterface.activeWidget == null) CurrentInterface.activeWidget = this; if (this.Focusable && !Interface.FocusOnHover) { BubblingMouseButtonEventArg be = e as BubblingMouseButtonEventArg; if (be.Focused == null) { be.Focused = this; CurrentInterface.FocusedWidget = this; } } //bubble event to the top GraphicObject p = Parent as GraphicObject; if (p != null) p.onMouseDown(sender,e); MouseDown.Raise (this, e); }
void Ti_MouseDown(object sender, MouseButtonEventArgs e) { SelectedTab = Children.IndexOf (sender as GraphicObject); }
public void onClickForExpand(object sender, MouseButtonEventArgs e) { IsExpanded = !IsExpanded; }
void onDirUp(object sender, MouseButtonEventArgs e) { }
public void butCloseTabClick(object sender, MouseButtonEventArgs e) { (Parent as TabView).RemoveChild(this); }
public void onMouseDown(object sender, MouseButtonEventArgs e) { Debug.WriteLine (sender.ToString ()); }
public override void onMouseUp(object sender, MouseButtonEventArgs e) { base.onMouseUp (sender, e); holdCursor = false; (Parent as TabView).UpdateLayout (LayoutingType.ArrangeChildren); }
void onSaveHM(object sender, Crow.MouseButtonEventArgs e) { Texture.Save(hmGenerator.OutputTex, @"heightmap.png"); }