public MapWarehouseGuiScreen(InputHandler Input) : base(Input, true, true, true, false) { _modeBox = new ComboBox(Input); _modeBox.IsFocused = true; _modeBox.X = 160; _modeBox.Y = 10; _modeBox.Items.Add(Art.GRAPHICS[23, 19]); _modeBox.Items.Add(Art.GRAPHICS[24, 19]); _modeBox.Items.Add(Art.GRAPHICS[25, 19]); Controls.Add(_modeBox); Label temp = new Label(Input); temp.Text = "Search map"; temp.X = 300; temp.Y = 25; Controls.Add(temp); _searchBox = new TextBox(Input); _searchBox = new TextBox(Input); _searchBox.X = 390; _searchBox.Y = 25; _searchBox.MaxLength = 16; Controls.Add(_searchBox); _mapBox = new SelectableGrid(Input, 10, 65, 150); _mapBox.IsFocused = false; _mapBox.SetBorder(3); _mapBox.SetItemDimension(150, 150); ThreadPool.QueueUserWorkItem(_init); }
/// <summary> /// Ocures when block's grid wil lselected. /// </summary> /// <param name="obj"></param> private void SeatsBlock_GridSelected(SelectableGrid obj) { // Set binded block as current. Current = this; // Inform subscribers. BlockSelected?.Invoke(this); }
public void InitLevelList() { Controls.Clear(); Selector = new SelectableGrid(Input, 100, 60, 4); Selector.SetX(100); Selector.SetY(60); Selector.SetBorder(3); Selector.SetItemDimension(100, 100); LevelManager manager = new LevelManager(); for (int i = 0; i < manager.GetLevelsAmount(GameLevel.GetMode()); ++i) { string name = manager.GetLevelName(GameLevel.GetMode(), i); GBitmap thumbnail = LevelGen.CreateThumbnail(manager.GetLevelStream(GameLevel.GetMode(), i)); Selector.Push(new GridItem(manager.ParseName(GameLevel.GetMode(), name), thumbnail)); } Controls.Add(Selector); }
internal void _initToolbox() { _toolBox = new SelectableGrid(Input, 0, GameComponent.GetScreenHeight() - 55, 500); _toolBox.Selected = -1; _toolBox.SetItemDimension(30, 30); GridItem item = new GridItem("1", Art.GRAPHICS[0, 2]); _toolBox.Push(item); item = new GridItem("2", Art.GRAPHICS[0, 4]); _toolBox.Push(item); item = new GridItem("3", Art.GRAPHICS[0, 6]); _toolBox.Push(item); item = new GridItem("4", Art.GRAPHICS[0, 5]); _toolBox.Push(item); item = new GridItem("5", Art.GRAPHICS[0, 3]); _toolBox.Push(item); item = new GridItem("6", Art.GRAPHICS[1, 4]); _toolBox.Push(item); item = new GridItem("7", Art.GRAPHICS[3, 18]); _toolBox.Push(item); item = new GridItem("8", Art.GRAPHICS[2, 18]); _toolBox.Push(item); item = new GridItem("9", Art.GRAPHICS[5, 18]); _toolBox.Push(item); item = new GridItem("0", Art.GRAPHICS[4, 18]); _toolBox.Push(item); }
/// <summary> /// Occurs whwn any active border will selected. /// </summary> /// <param name="arg1"></param> /// <param name="arg2"></param> private void SeatsBlock_BorderSelected(SelectableGrid arg1, SelectableGrid.ActiveBorder arg2) { BorderSelected?.Invoke(this, arg2); }
public void SetUp() { Initialize(); _selectableGridPage = new SelectableGrid(Driver); _selectableGridPage.NavigateTo(); }
void Start() { if (viewCamera == null) { Debug.LogError ("no viewCamera"); } dynamicGrid = this.transform.parent.GetComponent<DynamicGrid> (); if (dynamicGrid == null) { Debug.LogError ("DynamicCell must has parent DynamicGrid"); } this.renderRange = dynamicGrid.renderRange; selectableGrid = transform.parent.GetComponent<SelectableGrid> (); }