New NUI widgets (EmptyIfInvisibleContainer
, UIBackingBox
and UILabelledIcon
)
#664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds some now NUI widgets that will be used in when porting the remaining built-in UI screens to use NUI. It also makes some minor changes to the default
UILoadBar
style, which was unnecesarily constraining the size of load bars.EmptyIfInvisibleContainer
This widget acts like a standard wrapper container, with the special case that if either its contents is empty or invisible, then it will report its own size as zero.
UIBackingBox
This widget acts like a standard
UIBox
, with the added functionality of consuming all mouse click events targeted within its area. This prevents mouse click events from propagating to layers beneath the box.UILabelledIcon
This widget allows the user to display an icon alongside a descriptive label, such as might be used in a HUD to display brief player statistics, The icon can be placed either to the left or the right of the label.
Testing
nuiExperiments
module. You'll need to fetch that into your workspace first. When asked to open a screen, open it using theshowNUIScreen <screenUrn>
command.EmptyIfInvisibleContainer
nuiExperiments:emptyIfInvisibleContainers
screen.Show
checkbox off.Show
checkbox on.UIBackingBox
nuiExperiments:uiBackingBoxes
screen.UILabelledIcon
nuiExperiments:uiLabelledIcons
screen.Notes
UIBackingBox
test is unlikely to succeed without General NUI Fixes #663, since it fixes mouse events previously not being consumed.