2024-02-03 07:33:10 -08:00
|
|
|
fn init(state) {
|
|
|
|
|
|
|
|
|
|
|
|
let ring = SpriteBuilder(
|
|
|
|
"ring",
|
|
|
|
"ui::status",
|
|
|
|
Rect(
|
|
|
|
-5.0, -5.0, 100.0, 100.0,
|
|
|
|
SpriteAnchor::NorthEast,
|
|
|
|
SpriteAnchor::NorthEast
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
let shield = RadialBuilder(
|
|
|
|
"shield", 2.5,
|
|
|
|
Color(0.3, 0.6, 0.8, 1.0),
|
|
|
|
Rect(
|
|
|
|
-9.5, -9.5, 91.0, 91.0,
|
|
|
|
SpriteAnchor::NorthEast,
|
|
|
|
SpriteAnchor::NorthEast
|
|
|
|
)
|
|
|
|
);
|
|
|
|
shield.set_progress(0.2);
|
|
|
|
|
|
|
|
let hull = RadialBuilder(
|
|
|
|
"hull", 2.5,
|
|
|
|
Color(0.8, 0.7, 0.5, 1.0),
|
|
|
|
Rect(
|
|
|
|
-13.5, -13.5, 83.0, 83.0,
|
|
|
|
SpriteAnchor::NorthEast,
|
|
|
|
SpriteAnchor::NorthEast
|
|
|
|
)
|
|
|
|
);
|
|
|
|
hull.set_progress(0.4);
|
|
|
|
|
|
|
|
return [
|
|
|
|
ring,
|
|
|
|
shield,
|
|
|
|
hull
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2024-02-02 22:19:06 -08:00
|
|
|
fn hover(element, hover_state) {}
|
|
|
|
fn click(element, click_state) {}
|