Hey there!
So I’m currently working on a progress bar with verse, but having some troubles with it.
I’ve made a bar with color_block
that I want to offset on a value that gets changed in the code multiple times, but it don’t change.
This is my float:
var Slider : float = 2000.0
& this is the Widget:
MyCanvas : canvas = canvas:
Slots := array:
canvas_slot:
Anchors := anchors{Minimum := vector2{X := 0.5, Y := 0.97}, Maximum := vector2{X := 0.5, Y := 0.97}}
Offsets := margin{Top := 0.0, Left := -Slider, Right := 0.0, Bottom := 0.0}
Alignment := vector2{X := 0.5, Y := 0.5}
SizeToContent := true
Widget := color_block{DefaultColor:= color{R:=9.0, G:=226.0, B:=230.0}, DefaultDesiredSize := vector2{X := 2000.0, Y := 70.0}, DefaultOpacity := 1.0}
As you can see I’ve used the Slider float in Offsets := margin{Top := 0.0, Left := -Slider, Right := 0.0, Bottom := 0.0}
How can I consistently update this widget to see the right offset of the Widget?
Greetings!