public void Function() { // GUI.color = Color.cyan; //POS--------------------------------------------------------------------------------------------------- if (GUI.Button(new Rect((l_x) / 1000f * Main.width, (l_y + 4 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.POS)) { if (Main.ScreenPower) { PosButton(); } } //PROG--------------------------------------------------------------------------------------------------- if (GUI.Button(new Rect((l_x + left_x) / 1000f * Main.width, (l_y + 4 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.PROG)) { if (Main.ScreenPower) { ProgButton(); } } if (GUI.Button(new Rect((l_x + 2 * left_x) / 1000f * Main.width, (l_y + 4 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.SET)) { if (Main.ScreenPower) { OffSettingsButton(); } } if (GUI.Button(new Rect((l_x + 5 * left_x) / 1000f * Main.width, (l_y + 4 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.INPUT)) { if (Main.ScreenPower) { if (Main.SettingMenu) { if (Main.OffSetSetting) { if (Main.InputText != "") { CooSystem_script.set_parameter(Main.InputText); Main.InputText = ""; Main.CursorText.text = Main.InputText; Main.ProgEDITCusorPos = Main.corner_px + 23.5f; } } //刀偏界面的输入功能 if (Main.OffSetTool && Main.OffSetTwo) { if (Main.InputText != "") { CooSystem_script.Plus_Tool_Input(Main.InputText, false); Main.InputText = ""; Main.CursorText.text = Main.InputText; Main.ProgEDITCusorPos = Main.corner_px + 23.5f; } } if (Main.OffSetCoo && Main.OffSetTwo) { if (Main.InputText != "") { CooSystem_script.PlusInput(Main.InputText, false); Main.InputText = ""; Main.CursorText.text = Main.InputText; Main.ProgEDITCusorPos = Main.corner_px + 23.5f; } } } } } if (GUI.Button(new Rect((l_x) / 1000f * Main.width, (l_y + 5 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.SYSTEM)) { if (Main.ScreenPower) { SystemButton(); } } if (GUI.Button(new Rect((l_x + left_x) / 1000f * Main.width, (l_y + 5 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.MESSAGE)) { if (Main.ScreenPower) { MessageButton(); } } if (GUI.Button(new Rect((l_x + 2 * left_x) / 1000f * Main.width, (l_y + 5 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.ORPH)) { if (Main.ScreenPower) { } } // Event e = Event.current; // TestRect = new Rect((l_x + 2*left_x + btn_width/4)/1000f*Main.width, (l_y+5*left_y + btn_height/4)/1000f*Main.height,(btn_width/2)/1000f*Main.width, (btn_height/2)/1000f*Main.height); // GUI.Button(TestRect, ""); // if(TestRect.Contains(e.mousePosition)) // { // GUI.Box(new Rect((l_x + 1*left_x + btn_width/4)/1000f*Main.width, (l_y+4*left_y + btn_height/4)/1000f*Main.height, 2*left_x/1000f*Main.width, 2*left_y/1000f*Main.height), ""); // } if (GUI.Button(new Rect((l_x + 5 * left_x) / 1000f * Main.width, (l_y + 6 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.HELP)) { if (Main.ScreenPower) { } } // GUI.color = Color.white; if (GUI.Button(new Rect((l_x + 5 * left_x) / 1000f * Main.width, (l_y + 7 * left_y) / 1000f * Main.height, btn_width / 1000f * Main.width, btn_height / 1000f * Main.height), "", Main.RESET)) { if (Main.ScreenPower) { if (Main.ProgMenu) { Main.ProgEDITCusorV = 0; Main.ProgEDITCusorH = 0; Main.StartRow = 0; Main.EndRow = SystemArguments.EditLineNumber; Main.SelectStart = 0; Main.SelectEnd = 0; if (Main.ProgMDI) { MDIEdit_Script.EditProgRight(); } } Main.ALM_Control = false; Main.ALMBlink = false; Main.WarnningClear(); } } }
public void Function() { GUI.color = Color.cyan; //POS--------------------------------------------------------------------------------------------------- if (GUI.Button(new Rect(600f / 1000f * Main.width, 270f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "POS")) { if (Main.ScreenPower) { PosButton(); } } //PROG--------------------------------------------------------------------------------------------------- if (GUI.Button(new Rect(660f / 1000f * Main.width, 270f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "PROG")) { if (Main.ScreenPower) { ProgButton(); } } if (GUI.Button(new Rect(720f / 1000f * Main.width, 270f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "SET")) { if (Main.ScreenPower) { OffSettingsButton(); } } if (GUI.Button(new Rect(900f / 1000f * Main.width, 270f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "INPUT")) { if (Main.ScreenPower) { if (Main.SettingMenu) { if (Main.OffSetCoo && Main.OffSetTwo) { if (Main.InputText != "") { CooSystem_script.PlusInput(Main.InputText, false); Main.InputText = ""; Main.CursorText.text = Main.InputText; Main.ProgEDITCusorPos = 57f; } } } } } if (GUI.Button(new Rect(600f / 1000f * Main.width, 330f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "SYSTEM")) { if (Main.ScreenPower) { } } if (GUI.Button(new Rect(660f / 1000f * Main.width, 330f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "MESSAGE")) { if (Main.ScreenPower) { } } if (GUI.Button(new Rect(720f / 1000f * Main.width, 330f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "ORPH")) { if (Main.ScreenPower) { } } if (GUI.Button(new Rect(900f / 1000f * Main.width, 390f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "HELP")) { if (Main.ScreenPower) { } } GUI.color = Color.white; if (GUI.Button(new Rect(900f / 1000f * Main.width, 450f / 1000f * Main.height, 50f / 1000f * Main.width, 50f / 1000f * Main.height), "RESET")) { if (Main.ScreenPower) { } } }