// Update is called once per frame void Update() { if (!usingCallback) { for (int index = 6; index <= LogitechGSDK.LOGITECH_MAX_MOUSE_BUTTONS; index++) { if (LogitechGSDK.LogiGkeyIsMouseButtonPressed(index) == 1) { //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(0, "MOUSE", 255, 0, 0); LogitechGSDK.LogiLcdColorSetText(1, "Button : " + index, 255, 0, 0); } } for (int index = 1; index <= LogitechGSDK.LOGITECH_MAX_GKEYS; index++) { for (int mKeyIndex = 1; mKeyIndex <= LogitechGSDK.LOGITECH_MAX_M_STATES; mKeyIndex++) { if (LogitechGSDK.LogiGkeyIsKeyboardGkeyPressed(index, mKeyIndex) == 1) { //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(0, "KEYBOARD/HEADSET", 255, 0, 0); LogitechGSDK.LogiLcdColorSetText(1, "Button : " + index, 255, 0, 0); } } } } }
// remove entries method public static void RemoveEntries() { for (int i = 0; i < 8; i++) { LogitechGSDK.LogiLcdColorSetText(i, "", 255, 255, 255); } }
void OnGUI() { Customize.cust.windowx[windowID] = windowRect.x; Customize.cust.windowy[windowID] = windowRect.y; GUI.skin = com.Skin[GameControl.control.GUIID]; if (GameControl.control.LCDPage > 50 && GameControl.control.LCDPage < 100) { LogitechGSDK.LogiLcdColorSetTitle("Emails", 0, 255, 0); if (ContractSelect > -1) { LogitechGSDK.LogiLcdColorSetText(0, "Subject: " + Contracts[ContractSelect].Subject, 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(1, "Target: " + GameControl.control.Contracts[ContractSelect].Target, 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(2, "File: " + GameControl.control.Contracts[ContractSelect].File, 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(3, "Cash: " + GameControl.control.Contracts[ContractSelect].Cash.ToString(), 0, 255, 0); } } if (show == true) { GUI.color = com.colors[Customize.cust.WindowColorInt]; windowRect = WindowClamp.ClampToScreen(GUI.Window(windowID, windowRect, DoMyWindow, "")); } RefreshList(); }
// create initial display entries public static void InitDisplayEntries() { WriteDebugMessage(listEntries.Count + " apps found.. add them"); for (int i = 0; i <= maxLineNumber; i++) { LogitechGSDK.LogiLcdColorSetText(i + topOffset, paddingLeft + listEntries[i].Name, lineColorR, lineColorG, lineColorB); } LogitechGSDK.LogiLcdUpdate(); }
void RaveParty() { pixelMatrix = new byte[307200]; RandomColor(); for (int i = 0; i < 307200; i++) { if ((i % 1) == 0) { pixelMatrix[i] = (byte)blue; // blue } if ((i % 2) == 0) { pixelMatrix[i] = (byte)green; // green } if ((i % 3) == 0) { pixelMatrix[i] = (byte)red; // red } if ((i % 4) == 0) { pixelMatrix[i] = (byte)alpha; // red } } RandomColor(); LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(0, "JUST", red, blue, green); RandomColor(); LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(1, "LIVING", red, blue, green); RandomColor(); LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(2, "IN", red, blue, green); RandomColor(); LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(3, "THE", red, blue, green); RandomColor(); LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(4, "DATABASE", red, blue, green); RandomColor(); LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(5, "WOH ", red, blue, green); RandomColor(); LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(6, "OWW", red, blue, green); }
// no scroling, just change Entry public static void NoScroll(string valueType, int line) { for (int i = 0; i < listEntries.Count; i++) { if (i == line) { LogitechGSDK.LogiLcdColorSetText(i + topOffset, prefixSelector + getListEntryValue(i, valueType) + suffixSelector, selectedColorR, selectedColorG, selectedColorB); } else { LogitechGSDK.LogiLcdColorSetText(i + topOffset, paddingLeft + getListEntryValue(i, valueType), lineColorR, lineColorG, lineColorB); } } }
// scroll down method public static void Scroll(string valueType, int line, int index, int until) { for (int i = 0; i <= maxLineNumber; i++) { if (i == until) { LogitechGSDK.LogiLcdColorSetText(i + topOffset, prefixSelector + getListEntryValue(index, valueType) + suffixSelector, selectedColorR, selectedColorG, selectedColorB); } else { LogitechGSDK.LogiLcdColorSetText(i + topOffset, paddingLeft + getListEntryValue(index + i - maxLineNumber, valueType), lineColorR, lineColorG, lineColorB); } LogitechGSDK.LogiLcdUpdate(); } }
void GkeySDKCallback(LogitechGSDK.GkeyCode gKeyCode, String gKeyOrButtonString, IntPtr context) { if (gKeyCode.keyDown == 0) { if (gKeyCode.mouse == 1) { //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(0, "MOUSE " + gKeyOrButtonString, 255, 0, 0); LogitechGSDK.LogiLcdColorSetText(2, LogitechGSDK.LogiGkeyGetMouseButtonStr(gKeyCode.keyIdx), 255, 0, 0); LogitechGSDK.LogiLcdMonoSetText(2, "MOUSE " + gKeyOrButtonString); LogitechGSDK.LogiLcdMonoSetText(3, LogitechGSDK.LogiGkeyGetMouseButtonStr(gKeyCode.keyIdx)); } else { //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(0, "KEYBOARD/HEADSET " + gKeyOrButtonString, 255, 0, 0); LogitechGSDK.LogiLcdColorSetText(2, LogitechGSDK.LogiGkeyGetKeyboardGkeyStr(gKeyCode.keyIdx, gKeyCode.mState), 255, 0, 0); LogitechGSDK.LogiLcdMonoSetText(2, "KEYBOARD/HEADSET " + gKeyOrButtonString); LogitechGSDK.LogiLcdMonoSetText(3, LogitechGSDK.LogiGkeyGetKeyboardGkeyStr(gKeyCode.keyIdx, gKeyCode.mState)); } //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(1, " Released button :" + gKeyCode.keyIdx + " mode :" + gKeyCode.mState, 255, 0, 0); LogitechGSDK.LogiLcdMonoSetText(3, " Released button :" + gKeyCode.keyIdx + " mode :" + gKeyCode.mState); } else { if (gKeyCode.mouse == 1) { //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(0, "MOUSE " + gKeyOrButtonString, 255, 0, 0); LogitechGSDK.LogiLcdColorSetText(2, LogitechGSDK.LogiGkeyGetMouseButtonStr(gKeyCode.keyIdx), 255, 0, 0); LogitechGSDK.LogiLcdMonoSetText(2, "MOUSE " + gKeyOrButtonString); LogitechGSDK.LogiLcdMonoSetText(3, LogitechGSDK.LogiGkeyGetMouseButtonStr(gKeyCode.keyIdx)); } else { //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(0, "KEYBOARD/HEADSET " + gKeyOrButtonString, 255, 0, 0); LogitechGSDK.LogiLcdColorSetText(2, LogitechGSDK.LogiGkeyGetKeyboardGkeyStr(gKeyCode.keyIdx, gKeyCode.mState), 255, 0, 0); LogitechGSDK.LogiLcdMonoSetText(2, "KEYBOARD/HEADSET " + gKeyOrButtonString); LogitechGSDK.LogiLcdMonoSetText(3, LogitechGSDK.LogiGkeyGetKeyboardGkeyStr(gKeyCode.keyIdx, gKeyCode.mState)); } //These functions are not going to work if you didn't initialize the LCD SDK and calling LogiLcdUpdate every frame LogitechGSDK.LogiLcdColorSetText(1, " Pressed button :" + gKeyCode.keyIdx + " mode :" + gKeyCode.mState, 255, 0, 0); LogitechGSDK.LogiLcdMonoSetText(3, " Pressed button :" + gKeyCode.keyIdx + " mode :" + gKeyCode.mState); } }
void Test() { LogitechGSDK.LogiLcdColorSetTitle("Testing", 255, 0, 0); LogitechGSDK.LogiLcdColorSetText(0, "zero", 255, 255, 0); LogitechGSDK.LogiLcdColorSetText(1, "first", 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(2, "second", 0, 255, 30); LogitechGSDK.LogiLcdColorSetText(3, "third", 0, 255, 50); LogitechGSDK.LogiLcdColorSetText(4, "fourth", 0, 255, 90); LogitechGSDK.LogiLcdColorSetText(5, "fifth", 0, 255, 140); LogitechGSDK.LogiLcdColorSetText(6, "sixth", 0, 255, 200); LogitechGSDK.LogiLcdColorSetText(7, "seventh", 0, 255, 255); LogitechGSDK.LogiLcdColorSetText(8, "eight", 0, 255, 255); LogitechGSDK.LogiLcdMonoSetText(0, "testing"); LogitechGSDK.LogiLcdMonoSetText(1, "mono"); LogitechGSDK.LogiLcdMonoSetText(2, "chrome"); LogitechGSDK.LogiLcdMonoSetText(3, "lcd"); }
void OnGUI() { Customize.cust.windowx[windowID] = windowRect.x; Customize.cust.windowy[windowID] = windowRect.y; GUI.skin = com.Skin[GameControl.control.GUIID]; if (GameControl.control.LCDPage > 0 && GameControl.control.LCDPage < 50) { LogitechGSDK.LogiLcdColorSetTitle("Notification", 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(0, Notification, 0, 255, 0); } SetWindowPos(); if (show == true) { windowRect = WindowClamp.ClampToScreen(GUI.Window(windowID, windowRect, DoMyWindow, "")); } }
// start external application public static void SelectEntryOK(int line) { // remove alle entries RemoveEntries(); try { Process.Start(listEntries[line].Path); WriteDebugMessage("Start Application: " + listEntries[line].Path); // display execute path LogitechGSDK.LogiLcdColorSetText(1, "Excute... " + listEntries[line].Name, selectedColorR, selectedColorG, selectedColorB); LogitechGSDK.LogiLcdColorSetText(3, "@ " + listEntries[line].Path, lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdColorSetText(5, "(go back with <- )", lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdUpdate(); } catch (Exception ex) { var first = ex.Message.Substring(0, (int)(ex.Message.Length / 3)); var second = ex.Message.Substring((int)(ex.Message.Length / 3), (int)(ex.Message.Length / 3)); var third = ex.Message.Substring((ex.Message.Length / 3) + (ex.Message.Length / 3), (int)(ex.Message.Length / 3)); WriteDebugMessage("Faled to start Application: " + ex.ToString() + " " + listEntries[line].Path); LogitechGSDK.LogiLcdColorSetText(0, "failed: " + listEntries[line].Name, selectedColorR, selectedColorG, selectedColorB); LogitechGSDK.LogiLcdColorSetText(1, "Error:", lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdColorSetText(2, first, lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdColorSetText(3, second, lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdColorSetText(4, third, lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdColorSetText(6, "@ " + listEntries[line].Path, lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdColorSetText(7, "(go back with <- )", lineColorR, lineColorG, lineColorB); LogitechGSDK.LogiLcdUpdate(); } finally { noPageLock = false; } }
// Update is called once per frame void Update() { int StoredPage = GameControl.control.LCDPage; if (GameControl.control.Shutdown == true) { LogitechGSDK.LogiLcdShutdown(); } //BUTTON TEST String colorButtons = ""; String monoButtons = ""; if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_CANCEL)) { colorButtons += "Cancel"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_DOWN)) { colorButtons += "Down"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_LEFT)) { colorButtons += "Left"; GameControl.control.LCDPage--; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_MENU)) { colorButtons += "Menu"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_OK)) { colorButtons += "Ok"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_RIGHT)) { colorButtons += "Right"; GameControl.control.LCDPage++; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_UP)) { colorButtons += "Up"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_0)) { monoButtons += "Button 0"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_1)) { monoButtons += "Button 1"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_2)) { monoButtons += "Button 2"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_3)) { monoButtons += "Button 3"; } // LogitechGSDK.LogiLcdMonoSetText(0, monoButtons); // LogitechGSDK.LogiLcdColorSetText(5, colorButtons, 255, 255, 0); if (GameControl.control.LCDPage < 0) { GameControl.control.LCDPage = 0; } if (GameControl.control.LCDPage != StoredPage) { for (int i = 0; i < 8; i++) { LogitechGSDK.LogiLcdColorSetText(i, "", 0, 0, 0); } } if (GameControl.control.ChangeColor == true) { Timer -= 1 * Time.deltaTime; if (Timer <= 0) { Timer = 1; RaveParty(); } } LogitechGSDK.LogiLcdUpdate(); }
// Update is called once per frame void Update() { //BUTTON TEST String colorButtons = ""; String monoButtons = ""; if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_CANCEL)) { colorButtons += "Cancel"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_DOWN)) { colorButtons += "Down"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_LEFT)) { colorButtons += "Left"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_MENU)) { colorButtons += "Menu"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_OK)) { colorButtons += "Ok"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_RIGHT)) { colorButtons += "Right"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_COLOR_BUTTON_UP)) { colorButtons += "Up"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_0)) { monoButtons += "Button 0"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_1)) { monoButtons += "Button 1"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_2)) { monoButtons += "Button 2"; } if (LogitechGSDK.LogiLcdIsButtonPressed(LogitechGSDK.LOGI_LCD_MONO_BUTTON_3)) { monoButtons += "Button 3"; } LogitechGSDK.LogiLcdMonoSetText(0, monoButtons); LogitechGSDK.LogiLcdColorSetText(5, colorButtons, 255, 255, 0); //LCD TYPE CONNECTED TEST String lcdsConnected = "LCDs connected :"; if (LogitechGSDK.LogiLcdIsConnected(LogitechGSDK.LOGI_LCD_TYPE_MONO)) { lcdsConnected += "MONO "; } if (LogitechGSDK.LogiLcdIsConnected(LogitechGSDK.LOGI_LCD_TYPE_COLOR)) { lcdsConnected += "COLOR"; } LogitechGSDK.LogiLcdMonoSetText(1, lcdsConnected); LogitechGSDK.LogiLcdColorSetText(2, lcdsConnected, 255, 255, 0); LogitechGSDK.LogiLcdUpdate(); if (Input.GetKey(KeyCode.Mouse0)) { //COLOR TEST pixelMatrix = new byte[307200]; int red = 0; int blue = 0; int green = 0; int alpha = 0; System.Random random = new System.Random(); red = random.Next(0, 255); blue = random.Next(0, 255); green = random.Next(0, 255); alpha = random.Next(0, 255); for (int i = 0; i < 307200; i++) { if ((i % 1) == 0) { pixelMatrix[i] = (byte)blue; // blue } if ((i % 2) == 0) { pixelMatrix[i] = (byte)green; // green } if ((i % 3) == 0) { pixelMatrix[i] = (byte)red; // red } if ((i % 4) == 0) { pixelMatrix[i] = (byte)alpha; // red } } LogitechGSDK.LogiLcdColorSetBackground(pixelMatrix); LogitechGSDK.LogiLcdColorSetText(6, "color : " + red + " - " + blue + " - " + green + " - " + alpha, 255, 0, 0); } if (Input.GetKey(KeyCode.Mouse1)) { //MONO TEST pixelMatrix = new byte[6880]; int pixel; for (int i = 0; i < 6880; i++) { System.Random random = new System.Random(); pixel = random.Next(0, 255); pixelMatrix[i] = (byte)pixel; // red } LogitechGSDK.LogiLcdMonoSetBackground(pixelMatrix); } }
void DoMyWindow(int WindowID) { if (boot.Terminal == false) { if (CloseButton.Contains(Event.current.mousePosition)) { if (GUI.Button(new Rect(CloseButton), "X", Skin.customStyles [0])) { appman.SelectedApp = "Command Line V3"; } } else { GUI.backgroundColor = com.colors[Customize.cust.ButtonColorInt]; GUI.contentColor = com.colors[Customize.cust.FontColorInt]; GUI.Button(new Rect(CloseButton), "X", Skin.customStyles [1]); } if (MiniButton.Contains(Event.current.mousePosition)) { if (GUI.Button(new Rect(MiniButton), "-", Skin.customStyles [2])) { minimize = !minimize; Minimize(); } } else { GUI.backgroundColor = com.colors[Customize.cust.ButtonColorInt]; GUI.contentColor = com.colors[Customize.cust.FontColorInt]; if (GUI.Button(new Rect(MiniButton), "-", Skin.customStyles [2])) { minimize = !minimize; Minimize(); } } GUI.DragWindow(new Rect(DefaltBoxSetting)); GUI.Box(new Rect(DefaltBoxSetting), "Command-Line Interface"); } if (cli.PastCommands.Count > Customize.cust.DeletionAmt) { cli.PastCommands.RemoveAt(0); } if (cli.AutoScroll == true) { scrollpos.y = scrollsize * 20; cli.AutoScroll = false; } if (cli.SetScrollPos == true) { scrollpos.y = scrollsize * 20 / ScrollValue; cli.SetScrollPos = false; } Style.fontSize = Customize.cust.TerminalFontSize; //if (Event.current.type == EventType.KeyDown) //{ // AudioSoucres.pitch = Random.Range (0.96f, 1.04f); // AudioSoucres.PlayOneShot (AudioClips); // //AudioSoucres.pitch = 1; //} if (Event.current.type == EventType.keyDown && Event.current.keyCode == KeyCode.Return) { cli.PastCommands.Add(cli.Parse); cli.CommandCheck(); cli.Parse = ""; cli.SetScrollPos = true; for (int i = 0; i < 8; i++) { LogitechGSDK.LogiLcdColorSetText(i, "", 0, 0, 0); } LogitechGSDK.LogiLcdUpdate(); } if (Event.current.type == EventType.keyDown && Event.current.keyCode == KeyCode.DownArrow) { if (PastCommandSelect < scrollsize - 1) { PastCommandSelect++; cli.Parse = cli.PastCommands[PastCommandSelect]; } } if (Event.current.type == EventType.keyDown && Event.current.keyCode == KeyCode.UpArrow) { if (PastCommandSelect >= 1) { PastCommandSelect--; cli.Parse = cli.PastCommands[PastCommandSelect]; } } User = "" + GameControl.control.ProfileName + "@" + Customize.cust.GatewayName + ">"; SMod = Customize.cust.TerminalFontSize / 2 * 0.1f; //Customize.cust.TerminalTextPosMod = SMod * User.Length; if (boot.Terminal == true) { GUI.contentColor = Color.white; scrollpos = GUI.BeginScrollView(new Rect(2, 2, windowRect.width - 4, windowRect.height - HMod), scrollpos, new Rect(0, 0, 0, scrollsize * 22)); GUI.Label(new Rect(2, scrollsize * 20 * SMod, windowRect.width - 2, Customize.cust.FontSize + 2), User, Style); //cli.Parse = GUI.TextField(new Rect(User.Length + Customize.cust.TerminalTextPosMod * Customize.cust.TerminalFontSize, scrollsize*20-1*SMod, windowRect.width-84, 23), cli.Parse, 500,Style); cli.Parse = GUI.TextField(new Rect(User.Length + Customize.cust.TerminalTextPosMod * Customize.cust.TerminalFontSize, scrollsize * 20 * SMod, windowRect.width - 84, Customize.cust.FontSize + 2), cli.Parse, 500, Style); for (scrollsize = 0; scrollsize < cli.PastCommands.Count; scrollsize++) { GUI.Label(new Rect(2, scrollsize * 20 * SMod, windowRect.width - 2, 25), "" + cli.PastCommands [scrollsize], Style); } GUI.EndScrollView(); } else { GUI.contentColor = Color.green; scrollpos = GUI.BeginScrollView(new Rect(2, 25, windowRect.width - 4, windowRect.height - 40), scrollpos, new Rect(0, 0, 0, scrollsize * 24)); //GUI.Label (new Rect (2, windowRect.height - 50, windowRect.width-2, Customize.cust.FontSize+2),User,Style); //cli.Parse = GUI.TextField(new Rect(User.Length + Customize.cust.TerminalTextPosMod * Customize.cust.TerminalFontSize, scrollsize*20-1*SMod, windowRect.width-84, 23), cli.Parse, 500,Style); //cli.Parse = GUI.TextField(new Rect(User.Length + Customize.cust.TerminalTextPosMod * Customize.cust.TerminalFontSize, windowRect.height - 50, windowRect.width-84, Customize.cust.FontSize+2), cli.Parse, 500,Style); for (scrollsize = 0; scrollsize < cli.PastCommands.Count; scrollsize++) { GUI.Label(new Rect(2, scrollsize * 24, windowRect.width - 2, 20), "" + cli.PastCommands [scrollsize], Style); } GUI.EndScrollView(); GUI.Label(new Rect(2, windowRect.height - 20, windowRect.width - 2, Customize.cust.FontSize + 2), ">", Style); cli.Parse = GUI.TextField(new Rect(12, windowRect.height - 20, windowRect.width - 84, Customize.cust.FontSize + 2), cli.Parse, 500, Style); } }
void OnGUI() { Skin = com.Skin[GameControl.control.GUIID]; GUI.skin = Skin; Customize.cust.windowx[windowID] = windowRect.x; Customize.cust.windowy[windowID] = windowRect.y; if (show == true) { GUI.color = Color.black; windowRect = WindowClamp.ClampToScreen(GUI.Window(windowID, windowRect, DoMyWindow, "")); } if (GameControl.control.LCDPage > 100 && GameControl.control.LCDPage < 150) { LogitechGSDK.LogiLcdColorSetTitle("CLI", 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(7, "> " + cli.Parse, 0, 255, 0); if (cli.PastCommands.Count > 0) { LogitechGSDK.LogiLcdColorSetText(6, cli.PastCommands[cli.PastCommands.Count - 1], 0, 255, 0); } if (cli.PastCommands.Count > 1) { LogitechGSDK.LogiLcdColorSetText(5, cli.PastCommands[cli.PastCommands.Count - 2], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(6, cli.PastCommands[cli.PastCommands.Count - 1], 0, 255, 0); } if (cli.PastCommands.Count > 2) { LogitechGSDK.LogiLcdColorSetText(4, cli.PastCommands[cli.PastCommands.Count - 3], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(5, cli.PastCommands[cli.PastCommands.Count - 2], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(6, cli.PastCommands[cli.PastCommands.Count - 1], 0, 255, 0); } if (cli.PastCommands.Count > 4) { LogitechGSDK.LogiLcdColorSetText(3, cli.PastCommands[cli.PastCommands.Count - 4], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(4, cli.PastCommands[cli.PastCommands.Count - 3], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(5, cli.PastCommands[cli.PastCommands.Count - 2], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(6, cli.PastCommands[cli.PastCommands.Count - 1], 0, 255, 0); } if (cli.PastCommands.Count > 5) { LogitechGSDK.LogiLcdColorSetText(2, cli.PastCommands[cli.PastCommands.Count - 5], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(3, cli.PastCommands[cli.PastCommands.Count - 4], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(4, cli.PastCommands[cli.PastCommands.Count - 3], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(5, cli.PastCommands[cli.PastCommands.Count - 2], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(6, cli.PastCommands[cli.PastCommands.Count - 1], 0, 255, 0); } if (cli.PastCommands.Count > 6) { LogitechGSDK.LogiLcdColorSetText(1, cli.PastCommands[cli.PastCommands.Count - 6], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(2, cli.PastCommands[cli.PastCommands.Count - 5], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(3, cli.PastCommands[cli.PastCommands.Count - 4], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(4, cli.PastCommands[cli.PastCommands.Count - 3], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(5, cli.PastCommands[cli.PastCommands.Count - 2], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(6, cli.PastCommands[cli.PastCommands.Count - 1], 0, 255, 0); } if (cli.PastCommands.Count > 7) { LogitechGSDK.LogiLcdColorSetText(0, cli.PastCommands[cli.PastCommands.Count - 7], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(1, cli.PastCommands[cli.PastCommands.Count - 6], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(2, cli.PastCommands[cli.PastCommands.Count - 5], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(3, cli.PastCommands[cli.PastCommands.Count - 4], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(4, cli.PastCommands[cli.PastCommands.Count - 3], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(5, cli.PastCommands[cli.PastCommands.Count - 2], 0, 255, 0); LogitechGSDK.LogiLcdColorSetText(6, cli.PastCommands[cli.PastCommands.Count - 1], 0, 255, 0); } } }