Esempio n. 1
0
        public FormObjectBrowser(IEditorPlugin editorPlugin)
        {
            InitializeComponent();

            this.editorPlugin = editorPlugin;
            ini = editorPlugin.GetConfig();

            CreateSettings();
            ini.Load();

            Width  = ini.GetInt("ObjectBrowser", "width");
            Height = ini.GetInt("ObjectBrowser", "height");
            chkKeepOnTop.Checked = ini.GetBool("ObjectBrowser", "keepOnTop");

            tvDirectories.BackColor = Colors.PrimaryHighlight();
            lbFiles.BackColor       = Colors.PrimaryHighlight();

            tvDirectories.ForeColor = Colors.Font();
            lbFiles.ForeColor       = Colors.Font();

            tvDirectories.BorderStyle = BorderStyle.None;
            lbFiles.BorderStyle       = BorderStyle.None;

            Task loadRepo = LoadRepo();

            GameDragDropEventHandlers.OnDragDrop  += OnDragDrop;
            GameDragDropEventHandlers.OnDragEnter += OnDragEnter;
            GameDragDropEventHandlers.OnDragOver  += OnDragOver;

            lbFiles.QueryContinueDrag += lbFiles_QueryContinueDrag;

            editorPlugin.GetHotkeyManager().Add(new Hotkey("ToggleObjectBrowserKeepOnTop", "Toggle Object Browser KeepOnTop", "Shift, Control + T", ToggleKeepOnTop, false));
        }
Esempio n. 2
0
        public TheJawaToolboxPlugin()
        {
            Information = new PluginInformation("The Jawa Toolbox"
                                                , "An SWG Client development toolbox"
                                                , "Timbab");

            Log.Info("Created: The Jawa Toolbox");

            ini = new UtINI(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\settings.ini");

            forms.Add(new FormObjectBrowser(this));

            panels.Add(new SubPanelContainer("Controls", new SubPanel[]
            {
                new ScenePanel(this, hotkeyManager, ini),
                new SnapshotPanel(this, hotkeyManager, ini),
                new PlayerPanel(hotkeyManager),
                new FreeCamPanel(hotkeyManager),
                new GraphicsPanel(ini),
                new MiscPanel(ini)
            }));

            hotkeyManager.CreateSettings();
            hotkeyManager.Load();
        }
Esempio n. 3
0
        public GraphicsPanel(UtINI ini) : base("Graphics")
        {
            InitializeComponent();

            graphics = new GraphicsImpl();

            CreateSettings(ini);
            ini.Load();

            chkWireframe.Checked = ini.GetBool("Graphics", "autoEnableWireframe");
        }
Esempio n. 4
0
        public MiscPanel(UtINI ini) : base("Misc")
        {
            InitializeComponent();

            cui  = new CuiImpl();
            misc = new MiscImpl(this);

            CreateSettings(ini);
            ini.Load();

            txtCreateObject.Text     = ini.GetString("Misc", "defaultCreateObjectFilename");
            txtCreateAppearance.Text = ini.GetString("Misc", "defaultCreateAppearanceFilename");
        }
Esempio n. 5
0
        public ScenePanel(IEditorPlugin editorPlugin, HotkeyManager hotkeyManager, UtINI ini) : base("Scene", false)
        {
            InitializeComponent();

            groundScene = new GroundSceneImpl(this, hotkeyManager);

            this.ini = ini;

            CreateSettings();
            ini.Load();

            txtAvatarObjectFilename.Text = ini.GetString("Scene", "defaultAvatarFilename");
        }
        public GraphicsPanel(UtINI ini) : base("Graphics")
        {
            InitializeComponent();

            graphics = new GraphicsImpl();

            CreateSettings(ini);
            ini.Load();

            Log.InfoSimple(ini.GetString("Scene", "defaultTerrainFilename"));

            chkWireframe.Checked = ini.GetBool("Graphics", "autoEnableWireframe");
        }
Esempio n. 7
0
        public SnapshotPanel(IEditorPlugin editorPlugin, HotkeyManager hotkeyManager, UtINI ini) : base("Snapshot")
        {
            InitializeComponent();

            worldSnapshot = new WorldSnapshotImpl(this, editorPlugin, hotkeyManager);

            this.ini = ini;

            CreateSettings();
            ini.Load();

            txtNewNodeFilename.Text          = ini.GetString("Snapshot", "defaultNodeObjectFilename");
            chkEnableNodeEditing.Checked     = ini.GetBool("Snapshot", "autoEnableSnapshotEditing");
            chkAllowTargetEverything.Checked = ini.GetBool("Snapshot", "autoAllowTargetEverything");
        }
Esempio n. 8
0
 private void CreateSettings(UtINI ini)
 {
     ini.AddSetting("Graphics", "autoEnableWireframe", "false", UtINI.Value.Types.VtBool);
 }
Esempio n. 9
0
 public HotkeyManager(bool onGameFocusOnly)
 {
     OnGameFocusOnly = onGameFocusOnly;
     ini             = new UtINI(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location) + "\\input.ini");
 }
Esempio n. 10
0
 private void CreateSettings(UtINI ini)
 {
     ini.AddSetting("Misc", "defaultCreateObjectFilename", "object/tangible/furniture/cheap/shared_armoire_s01.iff", UtINI.Value.Types.VtString);
     ini.AddSetting("Misc", "defaultCreateAppearanceFilename", "appearance/frn_all_chep_cabinet_s01.apt", UtINI.Value.Types.VtString);
 }