public EventingWidget(IContainer Parent) : base(Parent)
        {
            MainGrid = new Grid(this);
            MainGrid.SetColumns(
                new GridSize(222, Unit.Pixels),
                new GridSize(1, Unit.Pixels),
                new GridSize(1),
                new GridSize(288, Unit.Pixels)
                );

            MapSelectPanel = new MapSelectPanel(MainGrid);
            MapSelectPanel.SetGridColumn(0);

            Widget w = new Widget(MainGrid);

            w.SetBackgroundColor(28, 50, 73);
            w.SetGridColumn(1);

            MapViewer = new MapViewerEvents(MainGrid);
            MapViewer.SetGridColumn(2);

            EventMapImageWidget = new EventMapImageWidget(MapViewer.MainContainer);
            MapViewer.MapWidget = EventMapImageWidget;

            EventListPanel = new EventListPanel(MainGrid);
            EventListPanel.SetGridColumn(3);
        }
Beispiel #2
0
        public MappingWidget(IContainer Parent) : base(Parent)
        {
            Editor.MainWindow.MainEditorWidget = this;
            Grid layout = new Grid(this);

            layout.SetColumns(
                new GridSize(222, Unit.Pixels),
                new GridSize(1, Unit.Pixels),
                new GridSize(1)
                );

            // Left sidebar
            MapSelectPanel = new MapSelectPanel(layout);

            // Left sidebar divider
            Widget LeftSidebarDivider = new Widget(layout);

            LeftSidebarDivider.SetBackgroundColor(28, 50, 73);
            LeftSidebarDivider.SetGridColumn(1);

            Submodes = new SubmodeView(layout);
            Submodes.OnSelectionChanged += delegate(BaseEventArgs e)
            {
                ChangeSubmode();
            };
            Submodes.SetHeaderHeight(31);
            Submodes.SetHeaderSelHeight(1);
            Submodes.SetTextY(6);

            Submodes.SetGridColumn(2);
            Submodes.CreateTab("Tiles");
            //Submodes.CreateTab("Events");
            Submodes.CreateTab("Connections");
            //Submodes.CreateTab("Encounters");
            //Submodes.CreateTab("Properties");
            MapViewerTiles = new MapViewerTiles(Submodes.GetTab(0));
            //MapViewerEvents = new MapViewerEvents(Submodes.GetTab(1));
            MapViewerConnections = new MapViewerConnections(Submodes.GetTab(1));
            //MapViewerEncounters = new MapViewerEncounters(Submodes.GetTab(3));
            //MapViewerProperties = new MapViewerProperties(Submodes.GetTab(4));

            MapImageWidget = new MapImageWidget(MapViewerTiles.MainContainer);
            MapImageWidget.SetZIndex(3); // 1 for normal map connections, 2 for the selected map connection, so 3 for the main map.

            MapViewerTiles.MapWidget = MapImageWidget;
            //MapViewerEvents.MapWidget = MapImageWidget;
            MapViewerConnections.MapWidget = MapImageWidget;
            //MapViewerEncounters.MapWidget = MapImageWidget;
            //mapViewerProperties.MapWidget = MapImageWidget;

            SetHorizontalScroll(0.5);
            SetVerticalScroll(0.5);
        }