Exemple #1
0
        public override void PreOpen()
        {
            base.PreOpen();
            _buttonsDescriptors = new List <ButtonTextDescriptorCoordinates>();
            var b1 = new ButtonTextDescriptorCoordinates("PLCOORDWIN_NorthPoleAbbr".Translate(),
                                                         "PLCOORDWIN_NorthPole".Translate(), Find.WorldGrid.NorthPolePos);

            _buttonsDescriptors.Add(b1);
            var b2 = new ButtonTextDescriptorCoordinates("PLCOORDWIN_SouthPoleAbbr".Translate(),
                                                         "PLCOORDWIN_SouthPole".Translate(), new Vector3(0, -100f, 0));

            _buttonsDescriptors.Add(b2);
            var b3 = new ButtonTextDescriptorCoordinates("PLCOORDWIN_OriginPointAbbr".Translate(),
                                                         "PLCOORDWIN_OriginPoint".Translate(),
                                                         new Vector3(0, 0, -100)); // note: negative z component is facing us at world start.

            _buttonsDescriptors.Add(b3);
            var b4 = new ButtonTextDescriptorCoordinates("PLCOORDWIN_AnteOriginAbbr".Translate(),
                                                         "PLCOORDWIN_AnteOrigin".Translate(), new Vector3(0, 0, 100));

            _buttonsDescriptors.Add(b4);

#if DEBUG_LONGLATDRAWER
            _longitudeLatitudeDrawer = new LongitudeLatitudeDrawer();
#endif
        }
Exemple #2
0
        public override void PreClose()
        {
            base.PreClose();
#if DEBUG_LONGLATDRAWER
            _longitudeLatitudeDrawer.UnRegister();
            _longitudeLatitudeDrawer = null;
#endif
        }