Esempio n. 1
0
        public MenuWindow(BaseControl owner)
            : base(owner)
        {
            fSplash = NWResourceManager.LoadImage(MainWindow.Screen, "itf/Splash.tga", Colors.None);

            int offset = 110;

            Width       = 204;
            Height      = 270 + offset;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            NWButton tRButton = new NWButton(this);

            tRButton.Left         = 20;
            tRButton.Top          = offset + 20;
            tRButton.Width        = 164;
            tRButton.Height       = 30;
            tRButton.ImageFile    = "itf/MenuBtn.tga";
            tRButton.OnClick      = OnBtnClose;
            tRButton.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton.LangResID    = 7;

            NWButton tRButton2 = new NWButton(this);

            tRButton2.Left         = 20;
            tRButton2.Top          = offset + 60;
            tRButton2.Width        = 164;
            tRButton2.Height       = 30;
            tRButton2.ImageFile    = "itf/MenuBtn.tga";
            tRButton2.OnClick      = OnBtnNew;
            tRButton2.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton2.LangResID    = 1;

            NWButton tRButton3 = new NWButton(this);

            tRButton3.Left         = 20;
            tRButton3.Top          = offset + 100;
            tRButton3.Width        = 164;
            tRButton3.Height       = 30;
            tRButton3.ImageFile    = "itf/MenuBtn.tga";
            tRButton3.OnClick      = OnBtnLoad;
            tRButton3.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton3.LangResID    = 2;

            NWButton tRButton4 = new NWButton(this);

            tRButton4.Left         = 20;
            tRButton4.Top          = offset + 140;
            tRButton4.Width        = 164;
            tRButton4.Height       = 30;
            tRButton4.ImageFile    = "itf/MenuBtn.tga";
            tRButton4.OnClick      = OnBtnSave;
            tRButton4.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton4.LangResID    = 3;

            NWButton tRButton5 = new NWButton(this);

            tRButton5.Left         = 20;
            tRButton5.Top          = offset + 180;
            tRButton5.Width        = 164;
            tRButton5.Height       = 30;
            tRButton5.ImageFile    = "itf/MenuBtn.tga";
            tRButton5.OnClick      = OnBtnOptions;
            tRButton5.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton5.LangResID    = 5;

            NWButton tRButton6 = new NWButton(this);

            tRButton6.Left         = 20;
            tRButton6.Top          = offset + 220;
            tRButton6.Width        = 164;
            tRButton6.Height       = 30;
            tRButton6.ImageFile    = "itf/MenuBtn.tga";
            tRButton6.OnClick      = OnBtnExit;
            tRButton6.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton6.LangResID    = 6;
        }
Esempio n. 2
0
        public InventoryWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 600;
            Height      = 460;
            WindowStyle = new WindowStyles(WindowStyles.wsModal, WindowStyles.wsKeyPreview);
            Shifted     = true;
            OnKeyDown   = OnCommonKeyDown;

            fContainer = null;

            fPayBtn              = new NWButton(this);
            fPayBtn.Left         = Width - 90 - 20 - 90 - 20;
            fPayBtn.Top          = Height - 30 - 20;
            fPayBtn.Width        = 90;
            fPayBtn.Height       = 30;
            fPayBtn.ImageFile    = "itf/DlgBtn.tga";
            fPayBtn.OnClick      = OnBtnPay;
            fPayBtn.OnLangChange = GlobalVars.nwrWin.LangChange;
            fPayBtn.LangResID    = 892;

            NWButton btnClose = new NWButton(this);

            btnClose.Left         = Width - 90 - 20;
            btnClose.Top          = Height - 30 - 20;
            btnClose.Width        = 90;
            btnClose.Height       = 30;
            btnClose.ImageFile    = "itf/DlgBtn.tga";
            btnClose.OnClick      = OnBtnClose;
            btnClose.OnLangChange = GlobalVars.nwrWin.LangChange;
            btnClose.LangResID    = 8;

            fPackList              = new ListBox(this);
            fPackList.Bounds       = ExtRect.Create(309, 28, 589, 367); // 2
            fPackList.OnItemSelect = Pack_ItemSelect;
            fPackList.Visible      = true;
            fPackList.OnDragDrop   = OnPackDragDrop;
            fPackList.OnDragOver   = OnPackDragOver;
            fPackList.OnDragStart  = OnPackDragStart;
            fPackList.OnMouseDown  = OnListMouseDown;
            fPackList.OnMouseMove  = OnListMouseMove;
            fPackList.OnKeyDown    = null;
            fPackList.ShowHints    = true;
            fPackList.Options.Include(LBOptions.lboIcons);
            fPackList.OnItemDraw = OnItemDraw;

            fEquipList              = new ListBox(this);
            fEquipList.Bounds       = ExtRect.Create(10, 28, 290, 187); // 0
            fEquipList.OnItemSelect = Equip_ItemSelect;
            fEquipList.Visible      = true;
            fEquipList.OnDragDrop   = OnEquipDragDrop;
            fEquipList.OnDragOver   = OnEquipDragOver;
            fEquipList.OnDragStart  = OnEquipDragStart;
            fEquipList.OnMouseDown  = OnListMouseDown;
            fEquipList.OnMouseMove  = OnListMouseMove;
            fEquipList.OnKeyDown    = null;
            fEquipList.ShowHints    = true;
            fEquipList.Options.Include(LBOptions.lboIcons);
            fEquipList.OnItemDraw = OnItemDraw;

            fOutList              = new ListBox(this);
            fOutList.Bounds       = ExtRect.Create(10, 208, 290, 367); // 1
            fOutList.OnItemSelect = Out_ItemSelect;
            fOutList.Visible      = true;
            fOutList.OnDragDrop   = OnOutDragDrop;
            fOutList.OnDragOver   = OnOutDragOver;
            fOutList.OnDragStart  = OnOutDragStart;
            fOutList.OnMouseDown  = OnListMouseDown;
            fOutList.OnMouseMove  = OnListMouseMove;
            fOutList.OnKeyDown    = null;
            fOutList.ShowHints    = true;
            fOutList.Options.Include(LBOptions.lboIcons);
            fOutList.OnItemDraw = OnItemDraw;
        }
Esempio n. 3
0
 public BaseHintWindow(BaseControl owner)
     : base(owner)
 {
     WindowStyle = new WindowStyles();
     fText       = new StringList();
 }