Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachHembree committed Sep 15, 2021
1 parent f3d5d18 commit 08370fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected override void Layout()

protected override void HandleInput(Vector2 cursorPos)
{
/* TextBoard Offsets 101:
/* TextBoard Offsets:
The TextBoard allows you to set an offset for the text being rendered starting from the
center of the element. Text outside the bounds of the element will not be drawn.
Expand All @@ -85,10 +85,6 @@ the opposite direction.
By default, the visible range of text will start at the first line on the first character.
It starts in the upper left hand corner.
If you wanted to move to the last line to the top of the element, you'd need to set a Y-offset
of TextSize.Y - lineSize.Y. If you wanted to move the last character in a line to the right side
of the element, you'd set an X-offset of -charOffset.X + charSize.X / 2f.
*/

ITextBoard textBoard = text.TextBoard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ public EditorToolBar(HudParentBase parent = null) : base(parent)
Text = "I",
};

/* HudChain is useful for organizing collections of elements into straight lines with regular spacing,
* either vertically horizontally. In this case, I'm organizing elements horizontally from left to right
* in the same order indicated by the collection initializer below.
*
* HudChain and its related types, like ScrollBox and the SelectionBox types, are powerful tools for
* organizing UI elements, especially when used in conjunction with oneanother.
*/
layout = new HudChain(false, this) // Set to alignVertical false to align the elements horizontally
{
// Automatically resize the height of the elements to match that of the chain and allow the chain to be
Expand Down

0 comments on commit 08370fa

Please sign in to comment.