private void DrawMainWindow(int id) { if (!initted) { for (int i = 0; i < 10; i++) { digits[i] = StyleFactory.GetTexture("Digit" + i.ToString()); } colon = StyleFactory.GetTexture("colon"); minus = StyleFactory.GetTexture("minus"); initted = true; } GUILayout.BeginHorizontal(); //public static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect, Color color, float borderWidth, float borderRadius); GUI.DrawTexture(ScaleRect(new Rect(13, 41, 25, 27)), minus); GUI.DrawTexture(ScaleRect(new Rect(45, 14, 54, 77)), digits[0]); GUI.DrawTexture(ScaleRect(new Rect(98, 14, 54, 77)), digits[0]); GUI.DrawTexture(ScaleRect(new Rect(166, 28, 16, 51)), colon); GUI.DrawTexture(ScaleRect(new Rect(190, 14, 54, 77)), digits[0]); GUI.DrawTexture(ScaleRect(new Rect(247, 14, 54, 77)), digits[0]); GUI.DrawTexture(ScaleRect(new Rect(316, 28, 16, 51)), colon); int firstDigit = _tick / 10; int secondDigit = _tick % 10; //seconds GUI.DrawTexture(ScaleRect(new Rect(342, 14, 54, 77)), digits[firstDigit]); GUI.DrawTexture(ScaleRect(new Rect(396, 14, 54, 77)), digits[secondDigit]); GUILayout.EndHorizontal(); GUI.DragWindow(); }