示例#1
0
 protected void triggerRegistered()
 {
     if (EditorArea.registered != null)
     {
         EditorArea.registered(this);
     }
 }
示例#2
0
        private static void handleEditorAreaRegistered(EditorArea area)
        {
            Delegate onRegionUpdated = area.onRegionUpdated;

            if (LevelObjects.< > f__mg$cache2 == null)
            {
                LevelObjects.< > f__mg$cache2 = new EditorRegionUpdated(LevelObjects.onRegionUpdated);
            }
            area.onRegionUpdated = (EditorRegionUpdated)Delegate.Combine(onRegionUpdated, LevelObjects.< > f__mg$cache2);
        }
        // Token: 0x06003509 RID: 13577 RVA: 0x0015F05C File Offset: 0x0015D45C
        public EditorLevelVisibilityUI()
        {
            EditorLevelVisibilityUI.localization = Localization.read("/Editor/EditorLevelVisibility.dat");
            EditorLevelVisibilityUI.container    = new Sleek();
            EditorLevelVisibilityUI.container.positionScale_X = 1f;
            EditorLevelVisibilityUI.container.sizeScale_X     = 1f;
            EditorLevelVisibilityUI.container.sizeScale_Y     = 1f;
            EditorUI.window.add(EditorLevelVisibilityUI.container);
            EditorLevelVisibilityUI.active      = false;
            EditorLevelVisibilityUI.roadsToggle = new SleekToggle();
            EditorLevelVisibilityUI.roadsToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.roadsToggle.positionOffset_Y = 90;
            EditorLevelVisibilityUI.roadsToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.roadsToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.roadsToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.roadsToggle.state            = LevelVisibility.roadsVisible;
            EditorLevelVisibilityUI.roadsToggle.addLabel(EditorLevelVisibilityUI.localization.format("Roads_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = EditorLevelVisibilityUI.roadsToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache0 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache0 = new Toggled(EditorLevelVisibilityUI.onToggledRoadsToggle);
            }
            sleekToggle.onToggled = EditorLevelVisibilityUI.< > f__mg$cache0;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.roadsToggle);
            EditorLevelVisibilityUI.navigationToggle = new SleekToggle();
            EditorLevelVisibilityUI.navigationToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.navigationToggle.positionOffset_Y = 140;
            EditorLevelVisibilityUI.navigationToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.navigationToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.navigationToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.navigationToggle.state            = LevelVisibility.navigationVisible;
            EditorLevelVisibilityUI.navigationToggle.addLabel(EditorLevelVisibilityUI.localization.format("Navigation_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle2 = EditorLevelVisibilityUI.navigationToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache1 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache1 = new Toggled(EditorLevelVisibilityUI.onToggledNavigationToggle);
            }
            sleekToggle2.onToggled = EditorLevelVisibilityUI.< > f__mg$cache1;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.navigationToggle);
            EditorLevelVisibilityUI.nodesToggle = new SleekToggle();
            EditorLevelVisibilityUI.nodesToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.nodesToggle.positionOffset_Y = 190;
            EditorLevelVisibilityUI.nodesToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.nodesToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.nodesToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.nodesToggle.state            = LevelVisibility.nodesVisible;
            EditorLevelVisibilityUI.nodesToggle.addLabel(EditorLevelVisibilityUI.localization.format("Nodes_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle3 = EditorLevelVisibilityUI.nodesToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache2 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache2 = new Toggled(EditorLevelVisibilityUI.onToggledNodesToggle);
            }
            sleekToggle3.onToggled = EditorLevelVisibilityUI.< > f__mg$cache2;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.nodesToggle);
            EditorLevelVisibilityUI.itemsToggle = new SleekToggle();
            EditorLevelVisibilityUI.itemsToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.itemsToggle.positionOffset_Y = 240;
            EditorLevelVisibilityUI.itemsToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.itemsToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.itemsToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.itemsToggle.state            = LevelVisibility.itemsVisible;
            EditorLevelVisibilityUI.itemsToggle.addLabel(EditorLevelVisibilityUI.localization.format("Items_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle4 = EditorLevelVisibilityUI.itemsToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache3 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache3 = new Toggled(EditorLevelVisibilityUI.onToggledItemsToggle);
            }
            sleekToggle4.onToggled = EditorLevelVisibilityUI.< > f__mg$cache3;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.itemsToggle);
            EditorLevelVisibilityUI.playersToggle = new SleekToggle();
            EditorLevelVisibilityUI.playersToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.playersToggle.positionOffset_Y = 290;
            EditorLevelVisibilityUI.playersToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.playersToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.playersToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.playersToggle.state            = LevelVisibility.playersVisible;
            EditorLevelVisibilityUI.playersToggle.addLabel(EditorLevelVisibilityUI.localization.format("Players_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle5 = EditorLevelVisibilityUI.playersToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache4 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache4 = new Toggled(EditorLevelVisibilityUI.onToggledPlayersToggle);
            }
            sleekToggle5.onToggled = EditorLevelVisibilityUI.< > f__mg$cache4;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.playersToggle);
            EditorLevelVisibilityUI.zombiesToggle = new SleekToggle();
            EditorLevelVisibilityUI.zombiesToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.zombiesToggle.positionOffset_Y = 340;
            EditorLevelVisibilityUI.zombiesToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.zombiesToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.zombiesToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.zombiesToggle.state            = LevelVisibility.zombiesVisible;
            EditorLevelVisibilityUI.zombiesToggle.addLabel(EditorLevelVisibilityUI.localization.format("Zombies_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle6 = EditorLevelVisibilityUI.zombiesToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache5 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache5 = new Toggled(EditorLevelVisibilityUI.onToggledZombiesToggle);
            }
            sleekToggle6.onToggled = EditorLevelVisibilityUI.< > f__mg$cache5;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.zombiesToggle);
            EditorLevelVisibilityUI.vehiclesToggle = new SleekToggle();
            EditorLevelVisibilityUI.vehiclesToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.vehiclesToggle.positionOffset_Y = 390;
            EditorLevelVisibilityUI.vehiclesToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.vehiclesToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.vehiclesToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.vehiclesToggle.state            = LevelVisibility.vehiclesVisible;
            EditorLevelVisibilityUI.vehiclesToggle.addLabel(EditorLevelVisibilityUI.localization.format("Vehicles_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle7 = EditorLevelVisibilityUI.vehiclesToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache6 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache6 = new Toggled(EditorLevelVisibilityUI.onToggledVehiclesToggle);
            }
            sleekToggle7.onToggled = EditorLevelVisibilityUI.< > f__mg$cache6;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.vehiclesToggle);
            EditorLevelVisibilityUI.borderToggle = new SleekToggle();
            EditorLevelVisibilityUI.borderToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.borderToggle.positionOffset_Y = 440;
            EditorLevelVisibilityUI.borderToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.borderToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.borderToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.borderToggle.state            = LevelVisibility.borderVisible;
            EditorLevelVisibilityUI.borderToggle.addLabel(EditorLevelVisibilityUI.localization.format("Border_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle8 = EditorLevelVisibilityUI.borderToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache7 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache7 = new Toggled(EditorLevelVisibilityUI.onToggledBorderToggle);
            }
            sleekToggle8.onToggled = EditorLevelVisibilityUI.< > f__mg$cache7;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.borderToggle);
            EditorLevelVisibilityUI.animalsToggle = new SleekToggle();
            EditorLevelVisibilityUI.animalsToggle.positionOffset_X = -210;
            EditorLevelVisibilityUI.animalsToggle.positionOffset_Y = 490;
            EditorLevelVisibilityUI.animalsToggle.positionScale_X  = 1f;
            EditorLevelVisibilityUI.animalsToggle.sizeOffset_X     = 40;
            EditorLevelVisibilityUI.animalsToggle.sizeOffset_Y     = 40;
            EditorLevelVisibilityUI.animalsToggle.state            = LevelVisibility.animalsVisible;
            EditorLevelVisibilityUI.animalsToggle.addLabel(EditorLevelVisibilityUI.localization.format("Animals_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle9 = EditorLevelVisibilityUI.animalsToggle;

            if (EditorLevelVisibilityUI.< > f__mg$cache8 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache8 = new Toggled(EditorLevelVisibilityUI.onToggledAnimalsToggle);
            }
            sleekToggle9.onToggled = EditorLevelVisibilityUI.< > f__mg$cache8;
            EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.animalsToggle);
            EditorLevelVisibilityUI.regionLabels = new SleekLabel[(int)(EditorLevelVisibilityUI.DEBUG_SIZE * EditorLevelVisibilityUI.DEBUG_SIZE)];
            for (int i = 0; i < EditorLevelVisibilityUI.regionLabels.Length; i++)
            {
                SleekLabel sleekLabel = new SleekLabel();
                sleekLabel.sizeOffset_X = 200;
                sleekLabel.sizeOffset_Y = 50;
                EditorLevelVisibilityUI.regionLabels[i] = sleekLabel;
                sleekLabel.foregroundTint = ESleekTint.NONE;
                EditorLevelVisibilityUI.container.add(sleekLabel);
            }
            EditorArea area            = Editor.editor.area;
            Delegate   onRegionUpdated = area.onRegionUpdated;

            if (EditorLevelVisibilityUI.< > f__mg$cache9 == null)
            {
                EditorLevelVisibilityUI.< > f__mg$cache9 = new EditorRegionUpdated(EditorLevelVisibilityUI.onRegionUpdated);
            }
            area.onRegionUpdated = (EditorRegionUpdated)Delegate.Combine(onRegionUpdated, EditorLevelVisibilityUI.< > f__mg$cache9);
        }