Exemplo n.º 1
0
        //MainView is requested to get the event bindings to the editor windows done.
        public EditorInstance(MainViewBase m)
            : base("GameEditor")
        {
            mainView = m;

            registerEvent("addMessage", mainView.logView , typeof(LogView).GetMethod("addMessage"));
            registerEvent("logInfo", mainView.logView, typeof(LogView).GetMethod("logInfo"));
            registerEvent("logWarning", mainView.logView, typeof(LogView).GetMethod("logWarning"));
            registerEvent("logError", mainView.logView, typeof(LogView).GetMethod("logError"));

            registerEvent("addNode", mainView.archiveBrowser, typeof(ArchiveBrowser).GetMethod("addNode"));
            registerEvent("clearNodes", mainView.archiveBrowser, typeof(ArchiveBrowser).GetMethod("clearNodes"));

            registerEvent("addComponentClassName", mainView, typeof(MainViewBase).GetMethod("addComponentClassName"));

            registerEvent("entityListAddNode", mainView.entityList, typeof(EntityListView).GetMethod("addEntity"));
            registerEvent("entityListRemoveNode", mainView.entityList, typeof(EntityListView).GetMethod("removeEntity"));
            registerEvent("entityListClear", mainView.entityList, typeof(EntityListView).GetMethod("entityListClear"));
            registerEvent("entityListRenameEntity", mainView.entityList, typeof(EntityListView).GetMethod("entityListViewRenameEntity"));

            //Same editor, different targetType
            registerEvent("createTypeEditor", mainView, typeof(MainViewBase).GetMethod("createTypeEditor"));
            registerEvent("createEntityEditor", mainView, typeof(MainViewBase).GetMethod("createEntityEditor"));

            registerEvent("launchGameView", mainView, typeof(MainViewBase).GetMethod("launchGameView"));
        }
Exemplo n.º 2
0
        public EditorView(EditorInstance e, MainViewBase r)
        {
            InitializeComponent();
            editor = e;
            rootView = r;

            mouseLocked = false;
        }
Exemplo n.º 3
0
        public ArchiveBrowser(MainViewBase root)
        {
            InitializeComponent();

            rootView = root;

            /*
            System.Drawing.Icon icon = System.Drawing.Icon.ExtractAssociatedIcon("../data/dummy.type");
            archiveImageList.Images.Add(icon);
            */

            treeView.Nodes.Add("0", "/data/", 0);
        }
Exemplo n.º 4
0
        private String typeName; // "" if not set

        #endregion Fields

        #region Constructors

        public EntityEditorView(MainViewBase root,IntPtr inst, uint i, String name, EntityEditTargetType type)
        {
            InitializeComponent();

            hasType = false;

            instance = inst;

            rootView = root;

            targetId = i;
            targetType = type;

            Text = "Entity Editor - " + name + "[" + targetId + "]";

            this.name = name;
            nameBox.Text = name;

            //Fix right click on the treeview
            componentTreeView.MouseDown += (sender, args) => componentTreeView.SelectedNode = componentTreeView.GetNodeAt(args.X, args.Y);
        }
Exemplo n.º 5
0
        private MainViewBase rootView; //Required for delete calls to engine

        #endregion Fields

        #region Constructors

        public EntityListView(MainViewBase r)
        {
            InitializeComponent();

            rootView = r;
        }
 public ModelImporterInstance(MainViewBase rootView)
     : base("ModelImporterInstance")
 {
     root = rootView;
     registerEvent("requestArchiveRefresh", this, typeof(ModelImporterInstance).GetMethod("requestArchiveRefresh"));
 }