/////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////// METHODS ///////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// public static string ToHexString(WindowColor c) { /* * if (c == WindowColor.Base) return "#72e076"; * else if (c == WindowColor.Side1) return "#97ed9b"; * else if (c == WindowColor.Side2) return "#8ccc8f"; * else return "#ffffff"; */ if (c == WindowColor.Base) { return("#444444"); } else if (c == WindowColor.Side2) { return("#a6a6a6"); } else if (c == WindowColor.Side1) { return("#7a897b"); } else { return("#ffffff"); } }
// Update is called once per frame public void Update() { if (_lastSelectedCount != WindowCount) { WindowCountChanged(WindowCount); _lastSelectedCount = WindowCount; } if (_door != Door) { DoorChanged(Door); _door = Door; } if (_houseMaterial != HouseMaterial) { HouseMaterialChanged(HouseMaterial); _houseMaterial = HouseMaterial; } if (_doorMaterial != DoorMaterial) { DoorMaterialChanged(DoorMaterial); _doorMaterial = DoorMaterial; } if (_windowColor != WindowColor) { WindowColorChanged(WindowColor); _windowColor = WindowColor; } }
public static System.Drawing.Color GetColor(WindowColor c) { //return ColorTranslator.FromHtml(ToHexString(c)); return(c == WindowColor.Base ? Base : (c == WindowColor.Side1 ? Side1 : (c == WindowColor.Side2 ? Side2 : Color.White))); }
/// <summary> /// 显示并格式化提示信息. /// </summary> /// <param name='tips_message'> /// Tips_message. /// </param> /// <param name='move_allow'> /// 是否允许移动窗口. /// </param> /// <param name='window_color'> /// 背景颜色选择. /// </param> public void RectAdjust(string tips_message, bool move_allow, WindowColor window_color) { displayString = tips_message; FuncPara.sty_TipsWindow.normal.background = FuncPara.t2d_colorWindow[window_color]; //stringCount = TipsFormat(tips_message); TipsFormat(tips_message); FuncPara.tipsWindow = true; FuncPara.tipsMove = move_allow; tipsRect.x = Screen.width - tipsRect.width; tipsRect.y = Screen.height - tipsRect.height; }
/// <summary> /// 显示并格式化提示信息. /// </summary> /// <param name='window_on'> /// 是否打开Tips Window. /// </param> /// <param name='tips_string'> /// Tips_string. /// </param> /// <param name='move_allow'> /// 是否允许移动窗口 /// </param> /// <param name='window_color'> /// 背景颜色选择. /// </param> public void TipsWindow(bool window_on, string tips_string, bool move_allow, WindowColor window_color) { // if(FuncPara.currentMotion == MotionState.Exercising && !FuncPara.helpInfo){ //帮助禁止时不显示Tips窗口 // FuncPara.tipsWindow = false; // }else if (window_on) { st_Tips.RectAdjust(tips_string, move_allow, window_color); } else { FuncPara.tipsWindow = false; } }
private void WindowColorChanged(WindowColor windowColor) { if (windowColor == WindowColor.Blue) { ChangeAllGlassColors(Color.blue); } if (windowColor == WindowColor.Red) { ChangeAllGlassColors(Color.red); } if (windowColor == WindowColor.White) { ChangeAllGlassColors(Color.white); } }
/// <summary> /// 显示并格式化提示信息. /// </summary> /// <param name='tips_message'> /// Tips_message. /// </param> /// <param name='move_allow'> /// 是否允许移动窗口. /// </param> /// <param name='position_string'> /// 显示位置: down_left, down_right, top_right, top_left, center /// </param> /// <param name='window_color'> /// 背景颜色选择. /// </param> public void RectAdjust(string tips_message, bool move_allow, string position_string, WindowColor window_color) { RectAdjust(tips_message, move_allow, window_color); if(position_string == "down_left"){ tipsRect.x = 0; tipsRect.y = Screen.height - tipsRect.height; }else if(position_string == "down_right"){ tipsRect.x = Screen.width - tipsRect.width; tipsRect.y = Screen.height - tipsRect.height; }else if(position_string == "top_right"){ tipsRect.x = Screen.width - tipsRect.width; tipsRect.y = 0; }else if(position_string == "top_left"){ tipsRect.x = 0; tipsRect.y = 0; }else{ tipsRect.x = (Screen.width - tipsRect.width) / 2; tipsRect.y = (Screen.height - tipsRect.height) / 2; } }
/// <summary> /// 显示并格式化提示信息. /// </summary> /// <param name='tips_message'> /// Tips_message. /// </param> /// <param name='move_allow'> /// 是否允许移动窗口. /// </param> /// <param name='aim_rect'> /// 显示位置 /// </param> /// <param name='window_color'> /// 背景颜色选择. /// </param> public void RectAdjust(string tips_message, bool move_allow, Vector2 target_position, WindowColor window_color) { RectAdjust(tips_message, move_allow, window_color); tipsRect.x = target_position.x; tipsRect.y = target_position.y; }
/// <summary> /// 显示并格式化提示信息. /// </summary> /// <param name='tips_message'> /// Tips_message. /// </param> /// <param name='move_allow'> /// 是否允许移动窗口. /// </param> /// <param name='position_string'> /// 显示位置: down_left, down_right, top_right, top_left, center /// </param> /// <param name='window_color'> /// 背景颜色选择. /// </param> public void RectAdjust(string tips_message, bool move_allow, string position_string, WindowColor window_color) { RectAdjust(tips_message, move_allow, window_color); if (position_string == "down_left") { tipsRect.x = 0; tipsRect.y = Screen.height - tipsRect.height; } else if (position_string == "down_right") { tipsRect.x = Screen.width - tipsRect.width; tipsRect.y = Screen.height - tipsRect.height; } else if (position_string == "top_right") { tipsRect.x = Screen.width - tipsRect.width; tipsRect.y = 0; } else if (position_string == "top_left") { tipsRect.x = 0; tipsRect.y = 0; } else { tipsRect.x = (Screen.width - tipsRect.width) / 2; tipsRect.y = (Screen.height - tipsRect.height) / 2; } }
/// <summary> /// 显示并格式化提示信息. /// </summary> /// <param name='tips_message'> /// Tips_message. /// </param> /// <param name='move_allow'> /// 是否允许移动窗口. /// </param> /// <param name='position_string'> /// 显示位置: down_left, down_right, top_right, top_left, center /// </param> /// <param name='window_color'> /// 背景颜色选择. /// </param> public void TipsWindow(bool window_on, string tips_string, bool move_allow, string position_string, WindowColor window_color){ // if(FuncPara.currentMotion == MotionState.Exercising && !FuncPara.helpInfo){ //帮助禁止时不显示Tips窗口 // FuncPara.tipsWindow = false; // }else if(window_on) st_Tips.RectAdjust(tips_string, move_allow, position_string, window_color); else FuncPara.tipsWindow = false; }