void OnGUI() { if (Time.timeScale == 0) { return; } if (fingerDown) { GUI.color = buttonColor; GUI.DrawTexture(r_button_ring, t2d_button_ring); GUI.DrawTexture(r_button_finger, t2d_button_ring); } else { if (label != null) { GUI.color = labelColor; GUI.Label(r_label, label, OurStyles.LABELCJ(10)); } } // uncomment these lines to see the touchable rectangle // GUI.color = new Color (1, 1, 1, 0.2f); // GUI.DrawTexture (r_downable, LAZY.t2d_white32x32); }
void OnGUI() { foreach (ProximityButton pb in pbses) { GUI.color = new Color(0.7f, 0.7f, 0.7f, 0.7f); Rect r = new Rect(0, 0, Screen.width * 0.10f, Screen.height * 0.05f); r.center = pb.position; GUI.Label(r, pb.label, OurStyles.LABELCJ(10)); } }
void OnGUI() { if (showHeights) { int across = depths.GetLength(0); int down = depths.GetLength(1); int W = Screen.width; int H = Screen.height; int W2 = (int)(H * aspect); int X = (Screen.width - W2) / 2; X = 0; W2 = W; GUI.DrawTexture(new Rect(X, 0, W2, H), tex); GUI.color = ((Time.time % 1.0f) < 0.5f) ? Color.black : Color.white; for (int j = 0; j < down; j++) { for (int i = 0; i < across; i++) { int x = (W2 * i) / across; int y = (H * j) / down; int w = W / across; int h = W / down; GUI.Label( new Rect(X + x, y, w, h), depths[i, j].ToString(), OurStyles.LABELLJ(10)); } } } else { GUI.Label(MR.SR(0, 0, 0.5f, 0.1f), "Press H to show heights", OurStyles.LABELULX(14)); } }