void MoveToSelected() { table.SetBlockTo(game.Inventory.Selected); table.Recreate(); deferredSelect = false; // User is holding invalid block if (table.SelectedIndex == -1) { table.MakeDescTex(game.Inventory.Selected); } }
public override void Init() { table = new TableWidget(game); table.font = font; table.ElementsPerRow = game.PureClassic ? 9 : 10; table.Init(); // User is holding invalid block if (table.SelectedIndex == -1) { table.MakeDescTex(game.Inventory.Selected); } game.Events.BlockPermissionsChanged += OnBlockChanged; game.Events.BlockDefinitionChanged += OnBlockChanged; game.Keyboard.KeyRepeat = true; game.Graphics.ContextLost += ContextLost; game.Graphics.ContextRecreated += ContextRecreated; }