File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,16 @@ class UIImage(UIWidget):
17
17
18
18
If no size given, the texture size is used.
19
19
20
+ The UIImage supports rotation and alpha values, which only apply to the texture.
21
+ Border, and background color are not affected by this.
22
+ The size of the image is reduced when rotated to stay within bounce of the widget.
23
+
20
24
Args:
21
25
texture: Texture to show
22
26
width: width of widget
23
27
height: height of widget
28
+ angle: angle of the texture in degrees
29
+ alpha: alpha value of the texture, value between 0 and 255
24
30
**kwargs: passed to UIWidget
25
31
"""
26
32
@@ -39,9 +45,13 @@ def __init__(
39
45
texture : Union [Texture , NinePatchTexture ],
40
46
width : float | None = None ,
41
47
height : float | None = None ,
48
+ angle : int = 0 ,
49
+ alpha : int = 255 ,
42
50
** kwargs ,
43
51
):
44
52
self .texture = texture
53
+ self .angle = angle
54
+ self .alpha = alpha
45
55
46
56
super ().__init__ (
47
57
width = width if width else texture .width ,
You can’t perform that action at this time.
0 commit comments