update ui
This commit is contained in:
parent
2a78f33239
commit
057efc9a8c
6 changed files with 39 additions and 93 deletions
|
@ -9,7 +9,7 @@ interface surfaceProps extends Roact.JsxInstanceProperties<Frame> {
|
|||
position: BindingOrValue<UDim2>
|
||||
ratio?: BindingOrValue<number>
|
||||
color?: BindingOrValue<Color3>
|
||||
blur?: BindingOrValue<boolean>
|
||||
anchor?: Vector2
|
||||
[Roact.Children]?: Roact.Children
|
||||
|
||||
Event?: Roact.JsxInstanceEvents<Frame>
|
||||
|
@ -17,14 +17,14 @@ interface surfaceProps extends Roact.JsxInstanceProperties<Frame> {
|
|||
}
|
||||
|
||||
function surface(props: surfaceProps): Roact.Element {
|
||||
const { size, position, ratio, color, blur } = props
|
||||
const { size, position, ratio, color, anchor } = props
|
||||
|
||||
const spreadableProps = { ...props } as Partial<surfaceProps>
|
||||
delete spreadableProps.size
|
||||
delete spreadableProps.position
|
||||
delete spreadableProps.ratio
|
||||
delete spreadableProps.color
|
||||
delete spreadableProps.blur
|
||||
delete spreadableProps.anchor
|
||||
delete spreadableProps[Roact.Children]
|
||||
|
||||
return (
|
||||
|
@ -33,24 +33,19 @@ function surface(props: surfaceProps): Roact.Element {
|
|||
Key={"surface container"}
|
||||
size={size}
|
||||
position={position}
|
||||
anchor={anchor}
|
||||
>
|
||||
<>
|
||||
{
|
||||
ratio !== undefined && <uiaspectratioconstraint
|
||||
AspectRatio={ratio}
|
||||
/>
|
||||
ratio !== undefined && <uiaspectratioconstraint AspectRatio={ratio}/>
|
||||
}
|
||||
</>
|
||||
|
||||
<>
|
||||
{
|
||||
blur !== false && <Acrylic
|
||||
Key={"acrylic"}
|
||||
radius={5}
|
||||
distance={0.001}
|
||||
/>
|
||||
}
|
||||
</>
|
||||
<Acrylic
|
||||
Key={"acrylic"}
|
||||
radius={5}
|
||||
distance={0.001}
|
||||
/>
|
||||
|
||||
<Fill
|
||||
color={color ? color : Color3.fromHex("#1e1e2e")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue