Skip to content

Commit b446c83

Browse files
committed
crop
1 parent 8421ace commit b446c83

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/engine/UI/ScreenButton.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module ScreenButtonModule
2020
textSize::Math.Vector2
2121
textTexture
2222
textColor::NTuple{4, Int}
23+
crop
2324

2425
function ScreenButton(clickEvent::Union{Function, Nothing} = nothing;
2526
id::String=JulGame.generate_uuid(),
@@ -43,7 +44,8 @@ module ScreenButtonModule
4344
text::String="",
4445
textOffset::Math.Vector2=Math.Vector2(0,0),
4546
parent::Union{UI.UIElement, Nothing, JulGame.IEntity, JulGame.ISprite}=nothing,
46-
rotation::Float64=0.0
47+
rotation::Float64=0.0,
48+
crop::Union{Ptr{Nothing}, Math.Vector4}=C_NULL
4749
)
4850
this = new()
4951

@@ -82,6 +84,7 @@ module ScreenButtonModule
8284
this.isWorldEntity = isWorldEntity
8385
this.parent = parent
8486
this.rotation = rotation
87+
this.crop = crop
8588
if clickEvent !== nothing
8689
push!(this.clickEvents, clickEvent)
8790
end

0 commit comments

Comments
 (0)