Esempio n. 1
0
        public void SetSelectedItemCase(InventoryBoxRuntime ClickedBox)
        {
            foreach (InventoryBoxRuntime InventoryBox in ContainerItems.Children)
            {
                InventoryBox.CurrentVariableState = InventoryBoxRuntime.VariableState.Default;
            }

            ClickedBox.CurrentVariableState = InventoryBoxRuntime.VariableState.Selected;
        }
Esempio n. 2
0
        public void SetSelectedItemCase(int ItemIndex)
        {
            foreach (InventoryBoxRuntime InventoryBox in ContainerItems.Children)
            {
                InventoryBox.CurrentVariableState = InventoryBoxRuntime.VariableState.Default;
            }

            SelectedBox = ContainerItems.Children[ItemIndex] as InventoryBoxRuntime;
            SelectedBox.CurrentVariableState = InventoryBoxRuntime.VariableState.Selected;
        }
Esempio n. 3
0
        public void PlaceCasesInInventoryPanel(int NbOfCases, int NbOfCols)
        {
            var container = this.GetGraphicalUiElementByName("ContainerItems") as ContainerRuntime;

            for (int i = 0; i < NbOfCases; i++)
            {
                var box = new InventoryBoxRuntime();
                //box.Width = (float)(container.GetAbsoluteWidth() / NbOfCols);
                box.Name     = box.GetType().ToString() + i.ToString();
                box.BoxIndex = i;
                container.Children.Add(box);
            }

            AffectEvents();
        }