public MogreForm(string theMesh)
        {
            InitializeComponent();
            myBrowser      = new Browser(this);
            this.Disposed += new EventHandler(MogreForm_Disposed);

            Directory.SetCurrentDirectory(Application.StartupPath);

            listBoxAnimations.Visible    = false;
            buttonPlayStop.Visible       = false;
            trackBarAnimPosition.Visible = false;

            trackBarRotateSpeed.Visible = false;
            trackBarRotateSpeed.Value   = 20;

            wardrobeToolStripMenuItem.Enabled = false;
            equipToolStripMenuItem.Enabled    = false;

            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);

            mogreWin = new OgreWindow(
                new Point(100, 30),
                new Size(mogrePanel.Height, mogrePanel.Width),
                mogrePanel.Handle);
            mogreWin.InitMogre();

            timerRender.Start();

            inputHandler = new CustomInputHandler(mogrePanel, this, mogreWin.camera);

            EquipSlotTagToName = new Dictionary <EquipWeaponSlot, string>();
            EquipSlotTagToName[EquipWeaponSlot.tag_leftarm]   = "Left Arm";
            EquipSlotTagToName[EquipWeaponSlot.tag_lefthand]  = "Left Hand";
            EquipSlotTagToName[EquipWeaponSlot.tag_righthand] = "Right Hand";

            myEquips = new string[Enum.GetValues(typeof(EquipWeaponSlot)).Length];

            AddMessageFilter(this.Handle);

            this.Text = string.Format("{0} v{1} ({2})", AsmInfo.Title, AsmInfo.Version, AsmInfo.CompanyName);
            //mogreWin.SetViewModel(@"D:\stuff\Torchlight_modding\Greg\MeshViewer\media\HuM_Nude_mesh.MESH");
            mogreWin.SetGrid();
            if (!string.IsNullOrEmpty(theMesh))
            {
                SetMeshModel(theMesh, false);
            }
        }
Пример #2
0
        public MogreForm(string theMesh)
        {
            InitializeComponent();
            myBrowser = new Browser(this);
            this.Disposed += new EventHandler(MogreForm_Disposed);

            Directory.SetCurrentDirectory(Application.StartupPath);

            listBoxAnimations.Visible = false;
            buttonPlayStop.Visible = false;
            trackBarAnimPosition.Visible = false;

            trackBarRotateSpeed.Visible = false;
            trackBarRotateSpeed.Value = 20;

            wardrobeToolStripMenuItem.Enabled = false;
            equipToolStripMenuItem.Enabled = false;

            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);

            mogreWin = new OgreWindow(
                new Point(100, 30),
                new Size(mogrePanel.Height, mogrePanel.Width),
                mogrePanel.Handle);
            mogreWin.InitMogre();

            timerRender.Start();

            inputHandler = new CustomInputHandler(mogrePanel, this, mogreWin.camera);

            EquipSlotTagToName = new Dictionary<EquipWeaponSlot, string>();
            EquipSlotTagToName[EquipWeaponSlot.tag_leftarm] = "Left Arm";
            EquipSlotTagToName[EquipWeaponSlot.tag_lefthand] = "Left Hand";
            EquipSlotTagToName[EquipWeaponSlot.tag_righthand] = "Right Hand";

            myEquips = new string[Enum.GetValues(typeof(EquipWeaponSlot)).Length];

            AddMessageFilter(this.Handle);

            this.Text = string.Format("{0} v{1} ({2})", AsmInfo.Title, AsmInfo.Version, AsmInfo.CompanyName);
            //mogreWin.SetViewModel(@"D:\stuff\Torchlight_modding\Greg\MeshViewer\media\HuM_Nude_mesh.MESH");
            mogreWin.SetGrid();
            if (!string.IsNullOrEmpty(theMesh))
            {
                SetMeshModel(theMesh, false);
            }
        }