void OnGUI() { if (showDebugInfo) { UtilGUI.DrawRectangle(new Rect(0, 0, 248, 148), Color.black, 0.2f); GUI.Label(new Rect(4, 4, 240, 20), "grav norm: " + gravityDir); GUI.Label(new Rect(4, 24, 240, 20), "grav force: " + gravity.magnitude); GUI.Label(new Rect(4, 44, 240, 20), "grav alts: " + gravityAlterations.Count); GUI.Label(new Rect(4, 64, 240, 20), "ground norm: " + groundNormal); GUI.Label(new Rect(4, 84, 240, 20), "ground local norm: " + warp * groundNormal); GUI.Label(new Rect(4, 108, 240, 20), "can air ability: " + canUseMidairAbility); if (onGround) { GUI.Label(new Rect(4, 128, 240, 20), "grnd spd/max: " + Mathf.Round(GetComponent <Rigidbody>().velocity.magnitude / maxGroundSpeed * 10000.0f) / 10000.0f); } else { Vector3 vel = GetComponent <Rigidbody>().velocity; vel = warp * vel; vel.y = 0; vel = Quaternion.Inverse(warp) * vel; GUI.Label(new Rect(4, 128, 240, 20), "air spd/max: " + Mathf.Round(vel.magnitude / maxAirSpeed * 10000.0f) / 10000.0f); } } }
private void FormMain_Load(object sender, EventArgs e) { // Create utility objects YaoDurant.Data.UtilData utilData = new UtilData(); YaoDurant.GUI.UtilGUI utilGUI = new UtilGUI(); // Set references to data objects. dsetTimeTracker = utilData.GetProjectsDataSet(); dtabProjects = dsetTimeTracker.Tables["Projects"]; dtabTasks = dsetTimeTracker.Tables["Tasks"]; // Make the Project table the DataSource. // Make the strIdent field of the currently // select row the Text property of the DataGrid // control. dgridDisplay.DataSource = dtabProjects; dgridDisplay.DataBindings.Clear(); dgridDisplay.DataBindings.Add( "Text", dgridDisplay.DataSource, "strIdent"); // Use a utility routine to style the // layout of Projects in the DataGrid. UtilGUI.AddCustomDataTableStyle(dgridDisplay, "Projects"); // Initialize the ContextMenu InitContextMenu(); }
private void FormMain_Load(object sender, EventArgs e) { // Make the Project table the DataSource. YaoDurant.Data.UtilData utilData = new UtilData(); dgrdProjects.DataSource = utilData.GetProjectsDT(); // Use a utility routine to style the // layout of Projects in the DataGrid. UtilGUI.AddCustomDataTableStyle(dgrdProjects, "Projects"); // Create the TextBox to be used with InPlace // editing and add it to the DataGrid control. textEdit = new TextBox(); textEdit.Visible = false; this.dgrdProjects.Controls.Add(textEdit); // Set Form GUI state to "Not Editing". this.SetEditingState(false); }
private void FormMain_Load(object sender, EventArgs e) { YaoDurant.Data.UtilData utilData = new UtilData(); YaoDurant.GUI.UtilGUI utilGUI = new UtilGUI(); // Make the Project table the DataSource. // Make the strIdent field of the currently // select row the Text property of the DataGrid // control. dgridProjects.DataSource = utilData.GetProjectsDT(); dgridProjects.DataBindings.Clear(); dgridProjects.DataBindings.Add( "Text", dgridProjects.DataSource, "strIdent"); // Use a utility routine to style the // layout of Projects in the DataGrid. UtilGUI.AddCustomDataTableStyle(dgridProjects, "Projects"); }
private void FormMain_Load(object sender, System.EventArgs e) { // Make the Project table the DataSource. YaoDurant.Data.UtilData utilData = new UtilData(); dgrdProjects.DataSource = utilData.GetProjectsDT(); // Use a utility routine to style the // layout of Projects in the DataGrid. UtilGUI.AddCustomDataTableStyle(dgrdProjects, "Projects"); // Create the TextBox to be used with InPlace // editing and add it to the DataGrid control. textEdit = new TextBox(); textEdit.Visible = false; this.dgrdProjects.Controls.Add(textEdit); // Initialize the Update/Cancel context menu this.InitContextMenu(); // The default is: Do the update. this.boolCancelUpdate = false; }
void OnGUI() { UtilGUI.DrawRectangle(new Rect(0, 0, Screen.width, Screen.height), Color.black, 1.0f - lerp); }
void OnGUI() { UtilGUI.DrawRectangle(new Rect(0, 0, Screen.width, Screen.height), Color.black, Mathf.Pow(lerp, 0.7f)); }