public InteractiveDiscard(Card card, Game game) { this.card = card; this.grip = game.runner.zones.grip; this.heap = game.runner.zones.heap; this.grip.ObserveDiscarding(this); }
private void AddTouchedGrips(Grip grip) { if (grip) { touchedGrips.Add(grip); } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (_currentGrip != null) { _currentGrip.Update?.Invoke((SizeF)(e.Location - _startDrag)); _startDrag = _currentGrip.Location().Center; return; } var bounds = SizeBounds; var outer = RectangleF.Inflate(bounds, GripPadding * 2); IsSizing = outer.Contains(e.Location) && !bounds.Contains(e.Location); var grip = GetGrip(e.Location); if (grip != _hoverGrip) { _hoverGrip = grip; ToolTip = grip?.ToolTip; Invalidate(); } Cursor = grip?.Cursor ?? Cursors.Default; Invalidate(); }
// Start is called before the first frame update void Start() { conf = Memory.LoadConfig(); catCompo = CAT.GetComponent <ClassAffinityType>(); //ToolBox.FeedDatabases(new string[] { conf.VSPath + "MENU/SHIELD.SYD", conf.VSPath + "MENU/ARMOR.SYD", conf.VSPath + "MENU/BLADE.SYD", conf.VSPath + "MENU/ITEMNAME.BIN", conf.VSPath + "MENU/ITEMHELP.BIN" }); Grip.GripList(); Gem.GemList(); BladeDD.enabled = false; GripDD.enabled = false; Gem1DD.enabled = false; Gem2DD.enabled = false; Gem3DD.enabled = false; BladeDD.ClearOptions(); GripDD.ClearOptions(); Gem1DD.ClearOptions(); Gem2DD.ClearOptions(); Gem3DD.ClearOptions(); catCompo.RAZ(); MaterialDD.ClearOptions(); MaterialDD.AddOptions(new List <string>() { "Wood", "Leather", "Bronze", "Iron", "Hagane", "Silver", "Damascus" }); WeaponTypeDD.ClearOptions(); WeaponTypeDD.AddOptions(new List <string>() { "Weapon Type", "Dagger", "Sword", "Greatwsord", "Axe", "Mace", "Great Axe", "Staff", "Heavy Mace", "Polearm", "Crossbow", "Shield" }); }
private void Form1_Load(object sender, EventArgs e) { Text = _fielname; _sbRed = new SolidBrush(Color.FromArgb(128, 255, 160, 160)); _sbGreen = new SolidBrush(Color.FromArgb(128, 160, 255, 160)); _sbBlue = new SolidBrush(Color.FromArgb(128, 160, 160, 255)); _sbBlack = new SolidBrush(Color.FromArgb(160, 0, 0, 0)); _font = new Font(FontFamily.GenericMonospace, 12); _downShift = false; _downCtrl = false; _gripDown = Grip.None; _gripNow = Grip.None; _gripOld = Grip.None; _ptDown = new Point(0, 0); _ptGrip = new Point(0, 0); _optNoBorder = true; _optShowGrip = true; _optFitImage = true; _optShowDebug = false; CntMenuOptNoBorder.Checked = _optNoBorder; CntMenuOptShowGrip.Checked = _optShowGrip; CntMenuOptFitImage.Checked = _optFitImage; CntMenuOptShowDebug.Checked = _optShowDebug; CntMenuMirror.Checked = false; CntMenuFlip.Checked = false; ResizeBoundsToImage(); ResetZoom(); ResetAngle(); ResetCenter(); }
public ToolbarManager(IControl control, ToolbarPanel parent) { if (parent == null) { throw new ArgumentNullException(nameof(parent)); } grip = new Grip(); ToolbarPanel.SetDockDirection(grip, ToolbarPanel.DockDirection.None); grip.PointerPressed += ClickArea_PointerPressed; grip.PointerReleased += ClickArea_PointerReleased; grip.PointerMoved += ClickArea_PointerMoved; this.GetObservable(ToolbarEndProperty).Subscribe((_) => { parent?.InvalidateArrange(); }); Transitions = new Transitions(); Transitions.AddRange(positionTransitions); this.parent = parent; childToolbar = control; parent.Children.Add(grip); }
public override void Dispose() { LabelFont.Dispose(); Bar.Dispose(); Grip.Dispose(); base.Dispose(); }
private void grip_MouseDown(object sender, MouseButtonEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { Grip.CaptureMouse(); } }
private void grip_MouseUp(object sender, MouseButtonEventArgs e) { if (Grip.IsMouseCaptured) { Grip.ReleaseMouseCapture(); } }
public void drawEquipment(GameObject weapon) { var mainHandManager = skeletonMap[Bodypart.RIGHTHAND]; var offHandManager = skeletonMap[Bodypart.LEFTHAND]; var weaponManager = weapon.GetComponentInChildren <Equipment>(); var tracer = weapon.GetComponentInChildren <Tracer>(); if (tracer != null) { weaponTracer = tracer; } if (weaponManager.weight == WeightClass.HEAVY) { grip = Grip.TWOHANDED; mainHandManager.equipTwoHander(weapon, offHandManager); } else { grip = Grip.MAINHAND; var array = weaponManager.equippableSlots; for (int i = 0; i < array.Length; i++) { var manager = skeletonMap[array[i]].GetComponent <HandManager>(); if (manager.getOccupyingEquipment() == null) { manager.equip(weapon, true); return; } } } }
private void ToggleGrip(int extremity, bool switchOff = false) { var limb = (LimbsEnum)Enum.ToObject(typeof(LimbsEnum), extremity); switch (limb) { case LimbsEnum.LeftHand: { LeftHandGrip = switchOff ? null : Joints[extremity].GetComponent <Extremity>().GripInRange; break; } case LimbsEnum.RightHand: { RightHandGrip = switchOff ? null : Joints[extremity].GetComponent <Extremity>().GripInRange; break; } case LimbsEnum.LeftFoot: { LeftFootGrip = switchOff ? null : Joints[extremity].GetComponent <Extremity>().GripInRange; break; } case LimbsEnum.RightFoot: { RightFootGrip = switchOff ? null : Joints[extremity].GetComponent <Extremity>().GripInRange; break; } default: break; } }
public void onGripSelect() { Grip selectedGrip = Grip.FindByName(GripDD.options[GripDD.value].text); //Debug.Log(selectedGrip); if (selectedGrip.GemSlots > 0) { Gem1DD.enabled = true; Gem1DD.ClearOptions(); Gem1DD.AddOptions(Gem.slist); } if (selectedGrip.GemSlots > 1) { Gem2DD.enabled = true; Gem2DD.ClearOptions(); Gem2DD.AddOptions(Gem.slist); } if (selectedGrip.GemSlots > 2) { Gem3DD.enabled = true; Gem3DD.ClearOptions(); Gem3DD.AddOptions(Gem.slist); } actualiseCAT(); }
/// <summary> /// Visual Init. /// </summary> private void InitializeComponentSelf() { components = new Container(); _shortcutContextMenu = new ContextMenu(); _miDeleteShortcut = new MenuItem(); _tooltip = new ToolTip(components); SuspendLayout(); // // _chevronBar // _chevronBar = new ChevronBar(); _chevronBar.SetSite(this); _chevronBar.AllowDrop = true; _chevronBar.Name = "_chevronBar"; _chevronBar.TabIndex = 1; _chevronBar.ChevronMenuItemClick += OnChevronMenuItemClick; _chevronBar.DragDrop += OnDragDropAny; _chevronBar.DragEnter += OnDragEnterAny; _chevronBar.BackColor = SystemColors.Control; _chevronBar.GetChevronMenuText = OnGetChevronMenuText; _chevronBar.SeparateHiddenControls = true; _chevronBar.AllowOversizing = true; // // _shortcutContextMenu // _shortcutContextMenu.MenuItems.AddRange(new MenuItem[] { _miDeleteShortcut }); // // miDeleteShortcut // _miDeleteShortcut.Index = 0; _miDeleteShortcut.Text = "Delete Shortcut"; _miDeleteShortcut.Click += miDeleteShortcut_Click; // Grip _grip = new Grip(this); _grip.SetSite(this); // // ShortcutBar // Controls.Add(_chevronBar); AllowDrop = true; Name = "ShortcutBar"; Font = new Font("Tahoma", 8.25F, FontStyle.Bold, GraphicsUnit.Point, ((Byte)(204))); Text = "Shortcuts"; Size = new Size(308, 30); DragEnter += OnDragEnterAny; DragDrop += OnDragDropAny; ResumeLayout(false); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.CacheText | ControlStyles.ContainerControl | ControlStyles.ResizeRedraw | ControlStyles.Selectable | ControlStyles.UserPaint | ControlStyles.Opaque , true); }
public void Delete(int id) { Grip grip = context.Grips.Find(id); context.Grips.Remove(grip); Save(); }
public Grip Update(Grip grip) { context.Entry(grip).State = System.Data.Entity.EntityState.Modified; Save(); return(grip); }
public Grip Add(Grip grip) { var result = context.Grips.Add(grip); Save(); return(result); }
public Zones(Grip grip, Stack stack, Heap heap, Rig rig, Score score) { this.grip = grip; this.stack = stack; this.heap = heap; this.rig = rig; this.score = score; }
void Awake() { ammo = gameObject.GetComponent <Ammo>(); barrel = gameObject.GetComponent <Barrel>(); grip = gameObject.GetComponent <Grip>(); model = gameObject.GetComponentInParent <GunModel>(); swapper = GameObject.Find("Gun Swapper").GetComponent <SwappingGunModel>(); }
public virtual void StartGripping(Grip gripTarget) { if (!CanGrip) { return; } _gripTarget = gripTarget; _movement.ChangeState(CharacterStates.MovementStates.Gripping); }
public void Represent(Card card, Grip grip, Heap heap, DropZone zone) { this.card = card; this.grip = grip; this.heap = heap; this.zone = zone; grip.ObserveDiscarding(this); highlight = gameObject.AddComponent <Highlight>(); }
public InteractiveDiscard(Card card, DropZone activation, Game game) { this.card = card; this.Activation = activation; this.Active = false; this.grip = game.runner.zones.grip; this.heap = game.runner.zones.heap; this.grip.ObserveDiscarding(this); }
public IHttpActionResult Put([FromBody] Grip grip) { var result = new Grip(); if (ModelState.IsValid) { result = gripRepository.Update(grip); } return(Json(result)); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (_currentGrip != null) { _currentGrip = null; Cursor = Cursors.Default; Invalidate(); e.Handled = true; } }
public void attachHand(Grip grip, Hand hand) { checkAndHandleAttach(hand); if (grip == primaryGrip) { primaryHand = hand; } else if (grip == secondaryGrip) { secondaryHand = hand; } }
public void detachHand(Grip grip, Hand hand) { checkAndHandleDetach(hand); if (grip == primaryGrip) { primaryHand = null; } else if (grip == secondaryGrip) { secondaryHand = null; } }
/// <summary> /// Populate values from the base palette. /// </summary> public void PopulateFromBase() { Button.PopulateFromBase(); Grip.PopulateFromBase(); Menu.PopulateFromBase(); Rafting.PopulateFromBase(); MenuStrip.PopulateFromBase(); Separator.PopulateFromBase(); StatusStrip.PopulateFromBase(); ToolStrip.PopulateFromBase(); UseRoundedEdges = InternalKCT.UseRoundedEdges; }
private void ActionDeleteGripCommand(Grip obj) { try { Grips.Remove(obj); OnPropertyChanged(); } catch (Exception ex) { Debug.WriteLine($"Error deleting the grip - {ex.Message}"); } }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (e.Buttons == MouseButtons.Primary) { _currentGrip = GetGrip(e.Location); if (_currentGrip != null) { _startDrag = e.Location; _currentGrip?.Start?.Invoke(); Cursor = _currentGrip?.Cursor ?? Cursors.Default; e.Handled = true; } } }
public Combo(Context context) { this.context = context; localHero = context.LocalHero; ComboItems = context.RootMenu.CreateItemToggler("Items", items) .SetTooltip("Select combo items"); Smash = new Smash(localHero.GetAbilityById(AbilityId.earth_spirit_boulder_smash)); Roll = new Roll(localHero.GetAbilityById(AbilityId.earth_spirit_rolling_boulder)); Grip = new Grip(localHero.GetAbilityById(AbilityId.earth_spirit_geomagnetic_grip)); Stone = new Stone(localHero.GetAbilityById(AbilityId.earth_spirit_stone_caller)); Enchant = new Enchant(localHero.GetAbilityById(AbilityId.earth_spirit_petrify)); Magnetize = new Magnetize(localHero.GetAbilityById(AbilityId.earth_spirit_magnetize)); }
public Sword(int _bladeWeaponSet, int _gripWeaponSet, int _guardWeaponSet, int _pommelWeaponSet) { // transform.gameObject.AddComponent<Blade> (); // transform.gameObject.AddComponent<Grip> (); // transform.gameObject.AddComponent<Guard> (); // transform.gameObject.AddComponent<Pommel> (); // // blade = transform.gameObject.GetComponent<Blade> (); // grip = transform.gameObject.GetComponent<Grip> (); // guard = transform.gameObject.GetComponent<Guard> (); // pommel = transform.gameObject.GetComponent<Pommel> (); blade = new Blade (_bladeWeaponSet); grip = new Grip (_gripWeaponSet); guard = new Guard (_guardWeaponSet); pommel = new Pommel (_pommelWeaponSet); }
private void Form1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { _ptDown.X = e.X; _ptDown.Y = e.Y; _ptGrip.X = e.X; _ptGrip.Y = e.Y; _gripDown = GetGripType(e.X, e.Y); RefreshDebug(); } if (e.Button == MouseButtons.Right) { _ptDown.X = e.X; _ptDown.Y = e.Y; SetMenuInfo(); RefreshDebug(); } }