| | |
| | | /// 场景延时设置弹窗 |
| | | /// </summary> |
| | | /// <param name="function"></param> |
| | | public void SetSceneDelayDialog(Function function,Button btn) |
| | | public void SetSceneDelayDialog(Scene scene,Button btn) |
| | | { |
| | | Button lastButton = new Button(); |
| | | int changeDelay = 0; |
| | |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | X = Application.GetRealWidth(20), |
| | | Y = Application.GetRealHeight(80), |
| | | IsSelected = function.delayText == "30s" |
| | | IsSelected = scene.delayText == "30s" |
| | | }; |
| | | optionBaseView.AddChidren(btn1); |
| | | |
| | |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | X = Application.GetRealWidth(195), |
| | | Y = Application.GetRealHeight(80), |
| | | IsSelected = function.delayText == "1min" |
| | | IsSelected = scene.delayText == "1min" |
| | | }; |
| | | optionBaseView.AddChidren(btn2); |
| | | |
| | |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | X = Application.GetRealWidth(20), |
| | | Y = Application.GetRealHeight(140), |
| | | IsSelected = function.delayText == "2min" |
| | | IsSelected = scene.delayText == "2min" |
| | | }; |
| | | optionBaseView.AddChidren(btn3); |
| | | |
| | |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | X = Application.GetRealWidth(195), |
| | | Y = Application.GetRealHeight(140), |
| | | IsSelected = function.delayText == "5min" |
| | | IsSelected = scene.delayText == "5min" |
| | | }; |
| | | optionBaseView.AddChidren(btn4); |
| | | |
| | |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | function.delay = changeDelay; |
| | | btn.Text = function.delayText; |
| | | scene.delay = changeDelay; |
| | | btn.Text = scene.delayText; |
| | | }; |
| | | btn1.MouseUpEventHandler = (sender, e) => { |
| | | btn1.IsSelected = !btn1.IsSelected; |