npm.io
2.3.4 • Published 5 months ago

@quenty/roundedbackingbuilder

Licence
MIT
Version
2.3.4
Deps
0
Size
10 kB
Vulns
0
Weekly
0
Stars
592
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

RoundedBackingBuilder

Construct a rounded backing with a shadow. This existed before UICorner existed, and remains for backwards compatability with games that still leverage this. Note that the dropshadow created by this is still impossible to recreate with a UICorner, so this provides some utility.

Installation

npm install @quenty/roundedbackingbuilder --save

Usage

Usage is designed to be simple.

RoundedBackingBuilder.new(options)

Initializes a new RoundedBackingBuilder

RoundedBackingBuilder:Create(gui)
RoundedBackingBuilder:CreateBacking(gui)
RoundedBackingBuilder:CreateTopBacking(gui)

Only top two corners are rounded

RoundedBackingBuilder:CreateLeftBacking(gui)
RoundedBackingBuilder:CreateRightBacking(gui)
RoundedBackingBuilder:CreateBottomBacking(gui)

Only bottom two corners are rounded

RoundedBackingBuilder:CreateTopShadow(backing)
RoundedBackingBuilder:CreateShadow(backing)