private void ApplyFocus() { string nameOfFocusedControl = GUI.GetNameOfFocusedControl(); if (nameOfFocusedControl != "ChatInput") { GUI.FocusControl("ChatInput"); } ChatSelectBtns component = GameObject.Find("Main").GetComponent <ChatSelectBtns>(); if (component != null) { component.rcBox(offset.x + chatBtnSize, (float)Screen.height - offset.y + 2f); } }
public void SetChatStyle(LOBBYCHAT_STYLE style) { switch (style) { case LOBBYCHAT_STYLE.HIGH: crdInputTxtFld = crdInputTxtFldLobby; crdClient = crdChatClientHigh; crdChatRead = crdChatClientHigh; break; case LOBBYCHAT_STYLE.MIDDLE: crdInputTxtFld = crdInputTxtFldGR; crdClient = crdChatClientMid; crdChatRead = crdChatClientMid; break; case LOBBYCHAT_STYLE.LOW: crdInputTxtFld = crdInputTxtFldLobby; crdClient = crdChatClientLow; crdChatRead = crdChatClientLow; break; case LOBBYCHAT_STYLE.CLANMATCH: crdInputTxtFld = crdInputTxtFldCM; crdClient = crdChatClientCM; crdChatRead = crdChatClientCM; break; } crdChatRead.y += chatReadStartY; crdChatRead.height -= chatReadHeightSub; ChatSelectBtns component = GameObject.Find("Main").GetComponent <ChatSelectBtns>(); if (component != null) { component.rcBox(crdInputTxtFld.x, crdInputTxtFld.y); } }