public BGUIButtonDrawRequest(BGUIGroup context, BGUIButtonDelegate del, string s) { Message = new GUIContent(s); var size = GUI.skin.button.CalcSize(Message); pos = context.RequestNextRect(size.x + GUI.skin.button.padding.left, size.y); Delegate = del; }
/// <summary> /// Starts a new button inside of the current group /// </summary> /// <param name="del">The delegate function that takes no parameters. Looking like `void YourFunction();`</param> /// <param name="s">What you want the label inside the button to say.</param> /// <returns>Returns the group for easy method chaining.</returns> public BGUIGroup Button(BGUIButtonDelegate del, string s) { RegisterDrawRequest(new BGUIButtonDrawRequest(this, del, s)); return(this); }