Material Box

Material Box

WEB Design & Material Images

Godot - Skew progress bar diagonally by changing skew property

Godot

GDScript to skew progress bar diagonally by changing skew property.


It is possible to skew progress bars diagonally by changing the skew property using StyleBoxFlat.
By specifying "fill" and "background" in add_theme_stylebox_override(), you can enable changing the style of the bar and background style.
Change the "skew" property with a 2D vector value.

# bar
var bar = StyleBoxFlat.new()
add_theme_stylebox_override('fill', bar)
bar.skew = Vector2(0.2, 0)

# background
var bg = StyleBoxFlat.new()
add_theme_stylebox_override('background', bg)
bg.skew = Vector2(0.2, 0)

Godot

TitleGodot - Skew progress bar diagonally by changing skew property

CategoryGodot

Created

Update

AuthorYousuke.U