public virtual void Init(Action <Place> callback)
            {
                this.callback                  = callback;
                placeSearcher                  = ScriptableObject.CreateInstance <PlaceSearcher>();
                placeSearcher.Label            = "Geo.PlaceInput.PlaceSearcher.Label".Traslate();
                placeSearcher.OnRequestRepaint = Repaint;

                if (searchData != null)
                {
                    placeSearcher.Place = searchData;
                }
                position = new Rect(Screen.width / 2 - 250, Screen.height / 2 - 150, 500, 300);
                ShowUtility();
            }
コード例 #2
0
        /* ----------------------------------
         * INIT: Used for late initialization after constructor
         * ----------------------------------*/
        void Init()
        {
            placeSearcher = new PlaceSearcher("Address");
            placeSearcher.OnRequestRepaint += Repaint;
            map = new GUIMap();
            map.Repaint += Repaint;
            map.Zoom = 19;

            actionsList = new ReorderableList(new List<GeoAction>(), typeof(GeoAction));
            actionsList.headerHeight = 40;
            actionsList.elementHeight = 60;
            actionsList.drawHeaderCallback = DrawActionsHeader;
            actionsList.drawElementCallback = DrawActionElement;
            actionsList.onAddDropdownCallback = OnAddActionDropdown;
        }
コード例 #3
0
        /* ----------------------------------
         * INIT: Used for late initialization after constructor
         * ----------------------------------*/
        void Init()
        {
            placeSearcher = new PlaceSearcher("Address");
            placeSearcher.OnRequestRepaint += Repaint;

            map          = new GUIMap();
            map.Repaint += Repaint;
            map.Zoom     = 19;

            mapElementReorderableList = new ReorderableList(new ArrayList(), typeof(MapElement), true, true, true, true);
            mapElementReorderableList.drawHeaderCallback    += DrawMapElementsHeader;
            mapElementReorderableList.drawElementCallback   += DrawMapElement;
            mapElementReorderableList.onAddDropdownCallback += OnAddMapElementDropdown;
            mapElementReorderableList.onRemoveCallback      += RemoveMapElement;

            this.positionManagers = new Dictionary <ExtElemReference, ExtElemReferenceGUIMapPositionManager>();
        }
コード例 #4
0
 public MapEditor() : base()
 {
     guiMap        = new GUIMap();
     placeSearcher = ScriptableObject.CreateInstance <PlaceSearcher>();
 }