Ejemplo n.º 1
0
 void InitTableWidget()
 {
     table                = new TableWidget(game);
     table.font           = font;
     table.ElementsPerRow = game.PureClassic ? 9 : 10;
     table.Init();
 }
Ejemplo n.º 2
0
        public override void Init()
        {
            table                = new TableWidget(game);
            table.font           = font;
            table.ElementsPerRow = game.PureClassic ? 9 : 10;
            table.Init();

            // Can't immediately move to selected here, because cursor visibility
            // might be toggled after Init() is called. This causes the cursor to
            // be moved back to the middle of the window.
            deferredSelect = true;

            game.Events.BlockPermissionsChanged += OnBlockChanged;
            game.Events.BlockDefinitionChanged  += OnBlockChanged;
            Keyboard.KeyRepeat              = true;
            game.Graphics.ContextLost      += ContextLost;
            game.Graphics.ContextRecreated += ContextRecreated;
        }
Ejemplo n.º 3
0
        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;
        }