Exemplo n.º 1
0
            internal static _Refresh Refresh()
            {
                if (_RefreshFunc == null)
                {
                    _RefreshFunc =
                        (_Refresh)Marshal.GetDelegateForFunctionPointer(
                            NativeLibrary.GetExport(
                                Torque3D.Torque3DLibHandle,
                                "fnGuiGameListMenuCtrl_refresh"), typeof(_Refresh));
                }

                return(_RefreshFunc);
            }
Exemplo n.º 2
0
            internal static _Refresh Refresh()
            {
                if (_RefreshFunc == null)
                {
                    _RefreshFunc =
                        (_Refresh)Marshal.GetDelegateForFunctionPointer(
                            Torque3D.DllLoadUtils.GetProcAddress(
                                Torque3D.Torque3DLibHandle,
                                "fnGuiGameListMenuCtrl_refresh"), typeof(_Refresh));
                }

                return(_RefreshFunc);
            }
Exemplo n.º 3
0
        public Dispatcher(MainWindow opener)
        {
            // References to Frontend and Backend objects
            _opener  = opener;
            _input   = new Input(this);
            _timer   = new EventLoop(this);
            _output  = new Draw(this);
            _toolbox = new Toolbox(this, "images/terrain_atlas.png", new System.Drawing.Rectangle(_opener.ClientRectangle.Width - 325, 60, 320, _opener.ClientRectangle.Height - 130));
            _map     = new Backend.Map(this, "start");
            if (_map.Width < 1)
            {
                _map = new Backend.Map(this, 10, 10, false);
            }
            _attachedImagePos = new System.Drawing.Rectangle();


            // Hook up Delegates
            Refresh  += _output.Refresh;
            Move     += _input.Move;
            Click    += _input.Click;
            Keyboard += _input.Keyboard;
            Repaint();

            // Generate lists for interaction objects
            _buttons = new List <Crawler.Frontend.Button>();
            _mapview = new MapTiles(this);

            _buttons.Add(new Frontend.Button("Map-Level", ToggleMap, 120, -1, -1, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button("Quit", Quit, -1, 5, _opener.ClientRectangle.Width - 5, -1));
            //  _buttons.Add(new Frontend.Button("Edit", Edit, -1, 5, _opener.ClientRectangle.Width - 64, -1));
            _buttons.Add(new Frontend.Button("Save", Save, -1, 5, _opener.ClientRectangle.Width - 114, -1));
            // _buttons.Add(new Frontend.Button("File", File, -1, 5, _opener.ClientRectangle.Width - 177, -1));

            _buttons.Add(new Frontend.Button("+", ZoomPageIn, -1, -1, _opener.ClientRectangle.Width - 130, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button("-", ZoomPageOut, -1, -1, _opener.ClientRectangle.Width - 105, _opener.ClientRectangle.Height - 28));

            _buttons.Add(new Frontend.Button("+", ZoomMapIn, 55, -1, -1, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button("-", ZoomMapOut, 29, -1, -1, _opener.ClientRectangle.Height - 28));


            _buttons.Add(new Frontend.Button("<", PrevPage, -1, -1, _opener.ClientRectangle.Width - 50, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button(">", NextPage, -1, -1, _opener.ClientRectangle.Width - 17, _opener.ClientRectangle.Height - 28));
        }
Exemplo n.º 4
0
        public Dispatcher(MainWindow opener)
        {
            // References to Frontend and Backend objects
            _opener = opener;
            _input = new Input(this);
            _timer = new EventLoop(this);
            _output = new Draw(this);
            _toolbox = new Toolbox(this, "images/terrain_atlas.png", new System.Drawing.Rectangle(_opener.ClientRectangle.Width - 325, 60, 320, _opener.ClientRectangle.Height - 130));
            _map = new Backend.Map(this, "start");
            if (_map.Width < 1)
            {
                _map = new Backend.Map(this, 10, 10, false);
            }
            _attachedImagePos = new System.Drawing.Rectangle();

            // Hook up Delegates
            Refresh += _output.Refresh;
            Move += _input.Move;
            Click += _input.Click;
            Keyboard += _input.Keyboard;
            Repaint();

            // Generate lists for interaction objects
            _buttons = new List<Crawler.Frontend.Button>();
            _mapview = new MapTiles(this);

            _buttons.Add(new Frontend.Button("Map-Level", ToggleMap, 120, -1, -1, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button("Quit", Quit, -1, 5, _opener.ClientRectangle.Width - 5, -1));
            //  _buttons.Add(new Frontend.Button("Edit", Edit, -1, 5, _opener.ClientRectangle.Width - 64, -1));
            _buttons.Add(new Frontend.Button("Save", Save, -1, 5, _opener.ClientRectangle.Width - 114, -1));
            // _buttons.Add(new Frontend.Button("File", File, -1, 5, _opener.ClientRectangle.Width - 177, -1));

            _buttons.Add(new Frontend.Button("+", ZoomPageIn, -1, -1, _opener.ClientRectangle.Width - 130, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button("-", ZoomPageOut, -1, -1, _opener.ClientRectangle.Width - 105, _opener.ClientRectangle.Height - 28));

            _buttons.Add(new Frontend.Button("+", ZoomMapIn, 55, -1, -1, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button("-", ZoomMapOut, 29, -1, -1, _opener.ClientRectangle.Height - 28));

            _buttons.Add(new Frontend.Button("<", PrevPage, -1, -1, _opener.ClientRectangle.Width - 50, _opener.ClientRectangle.Height - 28));
            _buttons.Add(new Frontend.Button(">", NextPage, -1, -1, _opener.ClientRectangle.Width - 17, _opener.ClientRectangle.Height - 28));
        }