Exemplo n.º 1
0
 internal void SelectItem(itemPanel ip)
 {
     selectedItemPanel     = ip;
     verticalModifier      = selectedItemPanel.End();
     itemPanelScrollMatrix = Matrix.CreateTranslation(0, -verticalModifier, 0);
     openDifferentDescription();
 }
Exemplo n.º 2
0
        public void Clicked()
        {
            Rectangle titleActualBox = new Rectangle(Location().X, Location().Y, TitleTextBox.Width, TitleTextBox.Height);
            Vector2   beep           = Mouse.GetState().Position.ToVector2() / ResolutionUtility.stdScale;

            if (titleActualBox.Contains(beep) && !bBeingDragged)
            {
                clickMoveOffSet = Location().Location.ToVector2() - beep;
                bBeingDragged   = true;
            }
            else
            {
                foreach (var item in lip)
                {
                    if (item.frameLoc((int)(verticalModifier), Location().Location + itemCollectionRenderLocation.Location).Contains(beep))
                    {
                        selectedItemPanel     = item;
                        verticalModifier      = selectedItemPanel.End();
                        itemPanelScrollMatrix = Matrix.CreateTranslation(0, -verticalModifier, 0);
                        openDifferentDescription();
                        KeyboardMouseUtility.bPressed = true;
                        break;
                    }
                }
            }
        }