예제 #1
0
        public VTargetsWindow(int x) : base(x)
        {
            addBtn        = new VAddButton();
            addBtn.width  = width;
            addBtn.height = 24;
            VStringShelf shelff = new VStringShelf();

            shelff.width  = width;
            shelff.height = 24;
            targetObjects.Add(shelff);
            addBtn.clicked += (object a, EventArgs b) => {
                VStringShelf shelf = new VStringShelf();
                shelf.width  = width;
                shelf.height = 24;
                targetObjects.Add(shelf);
            };
            text = "Targets";
            //We have to register this manually
            OverlayHost.ui.Paint += (object sender, PaintEventArgs e) =>
            {
                if (visible)
                {
                    OnPaint(e);
                }
                addBtn.visible = visible;
            };
        }
예제 #2
0
        public VTargetsWindow(int x) : base(x)
        {
            instance      = this;
            addBtn        = new VAddButton();
            addBtn.width  = width;
            addBtn.height = 24;

            /*VStringShelf shelff = new VStringShelf();
             * shelff.width = width;
             * shelff.height = 24;
             * targetObjects.Add(shelff);*/
            FileMan.man.readConfig();
            addBtn.clicked += (object a, EventArgs b) => {
                VStringShelf shelf = new VStringShelf();
                shelf.width  = width;
                shelf.height = 24;
                targetObjects.Add(shelf);
                FileMan.man.saveConfig();
            };
            text = "Targets";
            //We have to register this manually
            OverlayHost.ui.Paint += (object sender, PaintEventArgs e) =>
            {
                if (visible)
                {
                    OnPaint(e);
                }
            };
        }