separate widgetry assets

might be helpful for packing separate widgetry crate
This commit is contained in:
Michael Kirk 2020-09-23 17:05:50 -07:00 committed by Dustin Carlino
parent 2c0f3a13f7
commit 8ad32c5cee
6 changed files with 6 additions and 6 deletions

View File

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

View File

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 382 B

View File

@ -35,14 +35,14 @@ impl Checkbox {
) -> Widget {
let label = label.into();
let (off, hitbox) = Widget::row(vec![
GeomBatch::load_svg(ctx.prerender, "system/assets/tools/toggle_off.svg")
GeomBatch::load_svg(ctx.prerender, "system/assets/widgetry/toggle_off.svg")
.batch()
.centered_vert(),
label.clone().batch_text(ctx),
])
.to_geom(ctx, None);
let (on, _) = Widget::row(vec![
GeomBatch::load_svg(ctx.prerender, "system/assets/tools/toggle_on.svg")
GeomBatch::load_svg(ctx.prerender, "system/assets/widgetry/toggle_on.svg")
.batch()
.centered_vert(),
label.clone().batch_text(ctx),
@ -116,7 +116,7 @@ impl Checkbox {
pub fn colored(ctx: &EventCtx, label: &str, color: Color, enabled: bool) -> Widget {
let (off, hitbox) = Widget::row(vec![
GeomBatch::load_svg(ctx.prerender, "system/assets/tools/checkbox.svg")
GeomBatch::load_svg(ctx.prerender, "system/assets/widgetry/checkbox.svg")
.color(RewriteColor::ChangeAll(color.alpha(0.3)))
.batch()
.centered_vert(),
@ -124,7 +124,7 @@ impl Checkbox {
])
.to_geom(ctx, None);
let (on, _) = Widget::row(vec![
GeomBatch::load_svg(ctx.prerender, "system/assets/tools/checkbox.svg")
GeomBatch::load_svg(ctx.prerender, "system/assets/widgetry/checkbox.svg")
.color(RewriteColor::Change(Color::BLACK, color))
.batch()
.centered_vert(),
@ -172,12 +172,12 @@ impl Checkbox {
left_label.clone().draw_text(ctx),
Checkbox::new(
enabled,
Btn::svg_def("system/assets/tools/toggle_right.svg").build(
Btn::svg_def("system/assets/widgetry/toggle_right.svg").build(
ctx,
left_label,
hotkey.clone(),
),
Btn::svg_def("system/assets/tools/toggle_left.svg").build(
Btn::svg_def("system/assets/widgetry/toggle_left.svg").build(
ctx,
right_label.clone(),
hotkey,