public IS3View2D(UserControl parent, MapView mapView) { holder = parent as IViewHolder; _parent = parent; _mapView = mapView; _map = mapView.Map; // add default map tip _mapTip = new MapTip(); _mapTip.HorizontalAlignment = System.Windows.HorizontalAlignment.Right; _mapTip.VerticalAlignment = System.Windows.VerticalAlignment.Top; _mapTip.Visibility = System.Windows.Visibility.Collapsed; _mapView.Overlays.Items.Add(_mapTip); ////add default map legend //_mapLegend = new MapLegend(); //_mapLegend.HorizontalAlignment= HorizontalAlignment.Right; //_mapLegend.VerticalAlignment = VerticalAlignment.Top; //_mapLegend.Margin =new Thickness( 10); //_mapLegend.Padding =new Thickness( 5); ////_mapLegend.Visibility = System.Windows.Visibility.Collapsed; //_mapView.Overlays.Items.Add(_mapLegend); }
private void OnButtonClick(UnityEngine.GameObject go) { if (go != null) { try { int sceneId = Int32.Parse(go.name); UIManager.Instance.ShowWindowByName("Maptips"); UnityEngine.GameObject tip = UIManager.Instance.GetWindowGoByName("Maptips"); if (tip != null) { MapTip script = tip.GetComponent <MapTip>(); if (script != null) { script.UpdateView(sceneId); } } //ArkCrossEngine.Data_SceneConfig config = ArkCrossEngine.SceneConfigProvider.Instance.GetSceneConfigById(Int32.Parse(go.name)); //if (config != null) { // ArkCrossEngine.LogicSystem.PublishLogicEvent("ge_change_scene", "game", Int32.Parse(go.name)); //} else { // string chn_desc = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(31); // ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_screen_tip", "ui", chn_desc, UIScreenTipPosEnum.AlignCenter, new UnityEngine.Vector3(0f, 0f, 0f)); //} } catch (Exception e) { Debug.Log("[worldmap] wrong name"); //string chn_desc = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(31); //ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_screen_tip", "ui", chn_desc, UIScreenTipPosEnum.AlignCenter, new UnityEngine.Vector3(0f, 0f, 0f)); } } }
public IS3View(UserControl parent, MapView mapView) { _parent = parent; _mapView = mapView; _map = mapView.Map; // add default map tip _mapTip = new MapTip(); _mapTip.HorizontalAlignment = HorizontalAlignment.Right; _mapTip.VerticalAlignment = VerticalAlignment.Top; _mapTip.Visibility = Visibility.Collapsed; _mapView.Overlays.Items.Add(_mapTip); }