| | |
| | | Gravity = Gravity.CenterHorizontal |
| | | }; |
| | | AddChidren(SceneIcon); |
| | | SceneIcon.SetViewShadow(true); |
| | | |
| | | sceneBG = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(487), |
| | | Height = Application.GetMinRealAverage(348), |
| | | UnSelectedImagePath = "Item/SceneCard.png", |
| | | Gravity = Gravity.CenterHorizontal |
| | | }; |
| | | AddChidren(sceneBG); |
| | | |
| | | //sceneBG = new Button |
| | | //{ |
| | | // Width = Application.GetMinRealAverage(487), |
| | | // Height = Application.GetMinRealAverage(348), |
| | | // UnSelectedImagePath = "Item/SceneCard.png", |
| | | // Gravity = Gravity.CenterHorizontal |
| | | //}; |
| | | //AddChidren(sceneBG); |
| | | |
| | | TimeButton = new Button() |
| | | { |
| | |
| | | /// </summary> |
| | | private void InitStatu() |
| | | { |
| | | SetIimeByDelayTime(scene.SceneDelayTime); |
| | | SetTimeByDelayTime(scene.SceneDelayTime); |
| | | SetSceneNameText(scene.Name); |
| | | SetIcon(scene.IconPath); |
| | | SetCollect(Common.Room.CurrentRoom.GetLoveRoom().SceneUIFilePathList.Contains(scene.FileName)); |
| | |
| | | TimeButton.MouseUpEventHandler += SetTimeEvents; |
| | | CollectButton.MouseUpEventHandler += CollectionEvent; |
| | | SceneIcon.MouseUpEventHandler += SceneUpHandler; |
| | | sceneBG.MouseUpEventHandler += SceneUpHandler; |
| | | SceneNameButton.MouseUpEventHandler += SceneUpHandler; |
| | | } |
| | | |
| | |
| | | /// SetIimeByDelayTime |
| | | /// </summary> |
| | | /// <param name="time"></param> |
| | | public void SetIimeByDelayTime(int time) |
| | | public void SetTimeByDelayTime(int time) |
| | | { |
| | | if (time > 0) |
| | | { |
| | |
| | | /// <param name="iconPath"></param> |
| | | public void SetIcon(string iconPath) |
| | | { |
| | | SceneIcon.UnSelectedImagePath = iconPath; |
| | | if (scene.IconPathType == 0) |
| | | { |
| | | SceneIcon.UnSelectedImagePath = iconPath; |
| | | } |
| | | else |
| | | { |
| | | SceneIcon.UnSelectedImagePath = System.IO.Path.Combine(Config.Instance.FullPath, iconPath); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | timeSelect.TimeAction = (t) => |
| | | { |
| | | scene.SceneDelayTime = t; |
| | | SetIimeByDelayTime(t); |
| | | SetTimeByDelayTime(t); |
| | | }; |
| | | } |
| | | |