Exemple #1
0
        public MessageWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 320;
            Height      = 240;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            NWButton tRButton = new NWButton(this);

            tRButton.Left         = 210;
            tRButton.Top          = 190;
            tRButton.Width        = 90;
            tRButton.Height       = 30;
            tRButton.ImageFile    = "itf/DlgBtn.tga";
            tRButton.OnClick      = OnBtnClose;
            tRButton.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton.LangResID    = 8;

            fTextBox             = new TextBox(this);
            fTextBox.Left        = 20;
            fTextBox.Top         = 20;
            fTextBox.Height      = 160;
            fTextBox.Width       = 280;
            fTextBox.Links       = true;
            fTextBox.OnLinkClick = OnLinkClick;
        }
        public DivinationWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 420;
            Height      = 340;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            fTextBox        = new TextBox(this);
            fTextBox.Left   = 20;
            fTextBox.Top    = 50;
            fTextBox.Height = 230;
            fTextBox.Width  = 380;

            NWButton btnClose = new NWButton(this);

            btnClose.Left         = 310;
            btnClose.Top          = 290;
            btnClose.Width        = 90;
            btnClose.Height       = 30;
            btnClose.ImageFile    = "itf/DlgBtn.tga";
            btnClose.OnClick      = OnBtnClose;
            btnClose.OnLangChange = GlobalVars.nwrWin.LangChange;
            btnClose.LangResID    = 8;
        }
        public AlchemyWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 600;
            Height      = 460;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);
            Shifted     = true;

            fPackList              = new ListBox(this);
            fPackList.Bounds       = ExtRect.Create(309, 28, 589, 398);
            fPackList.OnItemSelect = null;
            fPackList.Visible      = true;
            fPackList.OnDragDrop   = OnPackDragDrop;
            fPackList.OnDragOver   = OnPackDragOver;
            fPackList.OnDragStart  = OnPackDragStart;
            fPackList.OnMouseDown  = OnListMouseDown;
            fPackList.ShowHints    = true;
            fPackList.OnMouseMove  = OnListMouseMove;

            fIngredientsList              = new ListBox(this);
            fIngredientsList.Bounds       = ExtRect.Create(10, 28, 290, 207);
            fIngredientsList.OnItemSelect = null;
            fIngredientsList.Visible      = true;
            fIngredientsList.OnDragDrop   = OnIngrDragDrop;
            fIngredientsList.OnDragOver   = OnIngrDragOver;
            fIngredientsList.OnDragStart  = OnIngrDragStart;
            fIngredientsList.OnMouseDown  = OnListMouseDown;
            fIngredientsList.ShowHints    = true;
            fIngredientsList.OnMouseMove  = OnListMouseMove;

            fResList             = new ListBox(this);
            fResList.Bounds      = ExtRect.Create(10, 225, 290, 398); // 7
            fResList.Visible     = true;
            fResList.ShowHints   = true;
            fResList.OnMouseMove = OnListMouseMove;

            NWButton btnAlchemy = new NWButton(this);

            btnAlchemy.Width        = 90;
            btnAlchemy.Height       = 30;
            btnAlchemy.Left         = fPackList.Left + 20;
            btnAlchemy.Top          = Height - 30 - 20;
            btnAlchemy.OnClick      = OnBtnAlchemy;
            btnAlchemy.OnLangChange = GlobalVars.nwrWin.LangChange;
            btnAlchemy.LangResID    = 131;
            btnAlchemy.ImageFile    = "itf/DlgBtn.tga";

            NWButton btnClose = new NWButton(this);

            btnClose.Width        = 90;
            btnClose.Height       = 30;
            btnClose.Left         = Width - 90 - 20;
            btnClose.Top          = Height - 30 - 20;
            btnClose.OnClick      = OnBtnClose;
            btnClose.OnLangChange = GlobalVars.nwrWin.LangChange;
            btnClose.LangResID    = 8;
            btnClose.ImageFile    = "itf/DlgBtn.tga";
        }
        public StartupWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 203;
            Height      = 230;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            NWButton btn = new NWButton(this);

            btn.Left         = 20;
            btn.Top          = 20;
            btn.Width        = 163;
            btn.Height       = StaticData.BtnHeight;
            btn.ImageFile    = "itf/MenuBtn.tga";
            btn.OnClick      = OnBtnNew;
            btn.OnLangChange = GlobalVars.nwrWin.LangChange;
            btn.LangResID    = 1;

            btn              = new NWButton(this);
            btn.Left         = 20;
            btn.Top          = 60;
            btn.Width        = 163;
            btn.Height       = StaticData.BtnHeight;
            btn.ImageFile    = "itf/MenuBtn.tga";
            btn.OnClick      = OnBtnLoad;
            btn.OnLangChange = GlobalVars.nwrWin.LangChange;
            btn.LangResID    = 2;

            btn              = new NWButton(this);
            btn.Left         = 20;
            btn.Top          = 100;
            btn.Width        = 163;
            btn.Height       = StaticData.BtnHeight;
            btn.ImageFile    = "itf/MenuBtn.tga";
            btn.OnClick      = OnBtnOptions;
            btn.OnLangChange = GlobalVars.nwrWin.LangChange;
            btn.LangResID    = 5;

            btn              = new NWButton(this);
            btn.Left         = 20;
            btn.Top          = 140;
            btn.Width        = 163;
            btn.Height       = StaticData.BtnHeight;
            btn.ImageFile    = "itf/MenuBtn.tga";
            btn.OnClick      = OnBtnAbout;
            btn.OnLangChange = GlobalVars.nwrWin.LangChange;
            btn.LangResID    = 4;

            btn              = new NWButton(this);
            btn.Left         = 20;
            btn.Top          = 180;
            btn.Width        = 163;
            btn.Height       = StaticData.BtnHeight;
            btn.ImageFile    = "itf/MenuBtn.tga";
            btn.OnClick      = OnBtnExit;
            btn.OnLangChange = GlobalVars.nwrWin.LangChange;
            btn.LangResID    = 6;
        }
        public PartyWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 600;
            Height      = 460;
            WindowStyle = new WindowStyles(WindowStyles.wsModal, WindowStyles.wsKeyPreview);
            Shifted     = true;

            fFormationList              = new ListBox(this);
            fFormationList.Mode         = ListBox.MODE_LIST;
            fFormationList.Bounds       = ExtRect.Create(10, 28, 290, 157);
            fFormationList.OnItemSelect = OnFormationSelect;
            fFormationList.Options      = new LBOptions(LBOptions.lboChecks, LBOptions.lboRadioChecks);

            fMercenariesList              = new ListBox(this);
            fMercenariesList.Mode         = ListBox.MODE_LIST;
            fMercenariesList.Bounds       = ExtRect.Create(10, 179, 290, 398); // 370
            fMercenariesList.OnItemSelect = OnMercenarySelect;

            fMercenaryPropsList        = new ListBox(this);
            fMercenaryPropsList.Mode   = ListBox.MODE_LIST;
            fMercenaryPropsList.Bounds = ExtRect.Create(309, 28, 589, 398);

            NWButton btn = new NWButton(this);

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

            btn              = new NWButton(this);
            btn.Width        = 90;
            btn.Height       = 30;
            btn.Left         = 20;
            btn.Top          = Height - 30 - 20;
            btn.ImageFile    = "itf/DlgBtn.tga";
            btn.OnClick      = OnBtnExchange;
            btn.OnLangChange = GlobalVars.nwrWin.LangChange;
            btn.LangResID    = (int)RS.rs_Exchange;

            btn              = new NWButton(this);
            btn.Width        = 90;
            btn.Height       = 30;
            btn.Left         = 20 + 90 + 20;
            btn.Top          = Height - 30 - 20;
            btn.ImageFile    = "itf/DlgBtn.tga";
            btn.OnClick      = OnBtnTeach;
            btn.OnLangChange = GlobalVars.nwrWin.LangChange;
            btn.LangResID    = (int)RS.rs_Teach;
        }
Exemple #6
0
        public RecruitWindow(BaseControl owner)
            : base(owner)
        {
            fMercenariesList        = new ListBox(this);
            fMercenariesList.Mode   = ListBox.MODE_REPORT;
            fMercenariesList.Bounds = ExtRect.Create(10, 10, 589, 398);
            fMercenariesList.ColumnTitles.Add("name", 400);
            fMercenariesList.ColumnTitles.Add("cost", 150);

            fRecruitBtn              = new NWButton(this);
            fRecruitBtn.OnClick      = OnBtnRecruit;
            fRecruitBtn.OnLangChange = GlobalVars.nwrWin.LangChange;
            fRecruitBtn.LangResID    = 49;
            fRecruitBtn.Width        = 90;
            fRecruitBtn.Height       = 30;
            fRecruitBtn.Left         = Width - 210;
            fRecruitBtn.Top          = Height - 30 - 20;
            fRecruitBtn.ImageFile    = "itf/DlgBtn.tga";
        }
Exemple #7
0
        public DialogWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 600;
            Height      = 460;
            WindowStyle = new WindowStyles(WindowStyles.wsModal, WindowStyles.wsKeyPreview);
            Shifted     = true;

            NWButton btnClose = new NWButton(this);

            btnClose.Width        = 90;
            btnClose.Height       = 30;
            btnClose.Left         = Width - 90 - 20;
            btnClose.Top          = Height - 30 - 20;
            btnClose.ImageFile    = "itf/DlgBtn.tga";
            btnClose.OnClick      = OnBtnClose;
            btnClose.OnLangChange = GlobalVars.nwrWin.LangChange;
            btnClose.LangResID    = 8;
        }
        public FilesWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 592;
            Height      = 432;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            fFiles = new GameFile[MaxList];

            NWButton btnClose = new NWButton(this);

            btnClose.Width        = 90;
            btnClose.Height       = 30;
            btnClose.Left         = Width - 90 - 20;
            btnClose.Top          = Height - 30 - 20;
            btnClose.ImageFile    = "itf/DlgBtn.tga";
            btnClose.OnClick      = OnBtnClose;
            btnClose.OnLangChange = GlobalVars.nwrWin.LangChange;
            btnClose.LangResID    = 8;
        }
Exemple #9
0
        public InputWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 480;
            Height      = 118;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            fEditBox           = new EditBox(this);
            fEditBox.Left      = 10;
            fEditBox.Top       = 10 + (CtlCommon.SmFont.Height + 10);
            fEditBox.Width     = Width - 20;
            fEditBox.OnKeyDown = OnEditKeyDown;

            NWButton closeBtn = new NWButton(this);

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

            NWButton tRButton = new NWButton(this);

            tRButton.Width        = 90;
            tRButton.Height       = 30;
            tRButton.Left         = closeBtn.Left - 90 - 10;
            tRButton.Top          = closeBtn.Top;
            tRButton.ImageFile    = "itf/DlgBtn.tga";
            tRButton.OnClick      = OnBtnAccept;
            tRButton.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton.LangResID    = 26;
        }
        public ConsoleWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Left        = 120;
            Top         = 90;
            Width       = 480;
            Height      = 300;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            fCmdHistory = new StringList();
            fCmdIndex   = -1;

            NWButton btn = new NWButton(this);

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

            fEditBox           = new EditBox(this);
            fEditBox.Left      = 20;
            fEditBox.Top       = 20;
            fEditBox.Width     = Width - 40;
            fEditBox.OnKeyDown = OnEditKeyDown;

            fTextBox        = new TextBox(this);
            fTextBox.Left   = 20;
            fTextBox.Top    = 20 + fEditBox.Height + 10;
            fTextBox.Width  = Width - 40;
            fTextBox.Height = Height - 100 - fEditBox.Height;
        }
Exemple #11
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;
        }
        public OptionsWindow(BaseControl owner)
            : base(owner)
        {
            Font        = CtlCommon.SmFont;
            Width       = 480;
            Height      = 390;
            WindowStyle = new WindowStyles(WindowStyles.wsScreenCenter, WindowStyles.wsModal, WindowStyles.wsKeyPreview);

            fPages        = new TabControl(this);
            fPages.Left   = 10;
            fPages.Top    = 10;
            fPages.Width  = Width - 20;
            fPages.Height = Height - 30 - 40;

            TabSheet ts = fPages.AddPage(BaseLocale.GetStr(RS.rs_CommonOptions));

            ts.OnLangChange = GlobalVars.nwrWin.LangChange;
            ts.LangResID    = 9;

            fSngVolume          = new ScrollBar(ts);
            fSngVolume.Min      = 0;
            fSngVolume.Max      = 255;
            fSngVolume.Pos      = 255;
            fSngVolume.OnChange = OnSongsVolumeChange;
            fSngVolume.Kind     = ScrollBar.SBK_HORIZONTAL;
            fSngVolume.Width    = ts.Width - 50;
            fSngVolume.Left     = 25;
            fSngVolume.Top      = 30;

            Label label = new Label(ts);

            label.Bounds       = ExtRect.Create(25, 30 - 20, 25 + fSngVolume.Width, 30);
            label.LangResID    = RS.rs_MusicVolume;
            label.OnLangChange = GlobalVars.nwrWin.LangChange;

            fSndVolume          = new ScrollBar(ts);
            fSndVolume.Min      = 0;
            fSndVolume.Max      = 255;
            fSndVolume.Pos      = 255;
            fSndVolume.OnChange = OnSoundsVolumeChange;
            fSndVolume.Kind     = ScrollBar.SBK_HORIZONTAL;
            fSndVolume.Width    = ts.Width - 50;
            fSndVolume.Left     = 25;
            fSndVolume.Top      = 70;

            label              = new Label(ts);
            label.Bounds       = ExtRect.Create(25, 70 - 20, 25 + fSndVolume.Width, 70);
            label.LangResID    = RS.rs_SoundsVolume;
            label.OnLangChange = GlobalVars.nwrWin.LangChange;

            fNewStyle = new CheckBox(ts);
            fNewStyle.OnLangChange = GlobalVars.nwrWin.LangChange;
            fNewStyle.LangResID    = 12;
            fNewStyle.Group        = 1;
            fNewStyle.Left         = 25;
            fNewStyle.Top          = 100;
            fNewStyle.Width        = Width - 50;
            fNewStyle.OnClick      = OnNewStyleClick;

            fModernStyle = new CheckBox(ts);
            fModernStyle.OnLangChange = GlobalVars.nwrWin.LangChange;
            fModernStyle.LangResID    = 13;
            fModernStyle.Group        = 1;
            fModernStyle.Left         = 225;
            fModernStyle.Top          = 100;
            fModernStyle.Width        = Width - 50;
            fModernStyle.OnClick      = OnModernStyleClick;

            fHideLocMap = new CheckBox(ts);
            fHideLocMap.OnLangChange = GlobalVars.nwrWin.LangChange;
            fHideLocMap.LangResID    = 14;
            fHideLocMap.Left         = 25;
            fHideLocMap.Top          = 130;
            fHideLocMap.Width        = Width - 50;
            fHideLocMap.OnClick      = OnHideLocMapClick;

            fHideCtlPanel = new CheckBox(ts);
            fHideCtlPanel.OnLangChange = GlobalVars.nwrWin.LangChange;
            fHideCtlPanel.LangResID    = 15;
            fHideCtlPanel.Left         = 25;
            fHideCtlPanel.Top          = 160;
            fHideCtlPanel.Width        = Width - 50;
            fHideCtlPanel.OnClick      = OnHideCtlPanelClick;

            fHideInfoPanel = new CheckBox(ts);
            fHideInfoPanel.OnLangChange = GlobalVars.nwrWin.LangChange;
            fHideInfoPanel.LangResID    = 16;
            fHideInfoPanel.Left         = 25;
            fHideInfoPanel.Top          = 190;
            fHideInfoPanel.Width        = Width - 50;
            fHideInfoPanel.OnClick      = OnHideInfoPanelClick;

            fInvOnlyIcons = new CheckBox(ts);
            fInvOnlyIcons.OnLangChange = GlobalVars.nwrWin.LangChange;
            fInvOnlyIcons.LangResID    = 549;
            fInvOnlyIcons.Left         = 25;
            fInvOnlyIcons.Top          = 220;
            fInvOnlyIcons.Width        = Width - 50;
            fInvOnlyIcons.OnClick      = OnInvOnlyIconsClick;

            ts = fPages.AddPage(BaseLocale.GetStr(RS.rs_KeyOptions));
            ts.OnLangChange = GlobalVars.nwrWin.LangChange;
            ts.LangResID    = 10;

            fKeyList        = new ListBox(ts);
            fKeyList.Mode   = ListBox.MODE_REPORT;
            fKeyList.Left   = 10;
            fKeyList.Top    = 10;
            fKeyList.Width  = ts.Width - 20;
            fKeyList.Height = ts.Height - 20;
            fKeyList.ColumnTitles.Add("name", 300);
            fKeyList.ColumnTitles.Add("key", 150);
            fKeyList.OnKeyDown = OnKeyListKeyDown;
            fKeyList.ShowHints = true;
            fKeyList.Hint      = "hint";

            ts = fPages.AddPage(BaseLocale.GetStr(RS.rs_GameplayOptions));
            ts.OnLangChange = GlobalVars.nwrWin.LangChange;
            ts.LangResID    = 11;

            fCircularFOV = new CheckBox(ts);
            fCircularFOV.OnLangChange = GlobalVars.nwrWin.LangChange;
            fCircularFOV.LangResID    = 17;
            fCircularFOV.Left         = 25;
            fCircularFOV.Top          = 25;
            fCircularFOV.Width        = Width - 50;
            fCircularFOV.OnClick      = OnCircularFOVClick;

            fAutoPickup = new CheckBox(ts);
            fAutoPickup.OnLangChange = GlobalVars.nwrWin.LangChange;
            fAutoPickup.LangResID    = 536;
            fAutoPickup.Left         = 25;
            fAutoPickup.Top          = 65;
            fAutoPickup.Width        = Width - 50;
            fAutoPickup.OnClick      = OnAutoPickupClick;

            fExtremeMode = new CheckBox(ts);
            fExtremeMode.OnLangChange = GlobalVars.nwrWin.LangChange;
            fExtremeMode.LangResID    = 82;
            fExtremeMode.Left         = 25;
            fExtremeMode.Top          = 105;
            fExtremeMode.Width        = Width - 50;
            fExtremeMode.OnClick      = OnExtremeModeClick;
            ts = fPages.AddPage(BaseLocale.GetStr(RS.rs_Language));
            ts.OnLangChange = GlobalVars.nwrWin.LangChange;
            ts.LangResID    = 815;

            fLangList         = new ListBox(ts);
            fLangList.Mode    = ListBox.MODE_LIST;
            fLangList.Options = new LBOptions(LBOptions.lboChecks, LBOptions.lboRadioChecks);
            fLangList.Left    = 10;
            fLangList.Top     = 10;
            fLangList.Width   = ts.Width - 20;
            fLangList.Height  = ts.Height - 20;

            Locale locale = GlobalVars.nwrWin.Locale;
            int    num    = locale.LangsCount;

            for (int i = 0; i < num; i++)
            {
                fLangList.Items.Add(locale.GetLang(i).Name, null);
            }
            fLangList.OnItemSelect = OnLangSelect;

            fPages.TabIndex = 0;

            NWButton tRButton = new NWButton(this);

            tRButton.Width        = 90;
            tRButton.Height       = 30;
            tRButton.Left         = Width - 90 - 20;
            tRButton.Top          = Height - 30 - 20;
            tRButton.ImageFile    = "itf/DlgBtn.tga";
            tRButton.OnClick      = OnBtnClose;
            tRButton.OnLangChange = GlobalVars.nwrWin.LangChange;
            tRButton.LangResID    = 8;
        }
Exemple #13
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;
        }