Base+CatDog: Move assets from /icons/ to /graphics/
The graphics directory is a more suitable home for demo assets. Also, update the example presenter file which uses a CatDog sprite.
Author: https://github.com/cubiclove Commit: https://github.com/SerenityOS/serenity/commit/240a56d9ce Pull-request: https://github.com/SerenityOS/serenity/pull/18646 Reviewed-by: https://github.com/AtkinsSJ ✅
|
@ -62,7 +62,7 @@
|
|||
"type": "image",
|
||||
|
||||
"rect": [50, 50, 200, 100],
|
||||
"path": "/res/icons/catdog/alert.png",
|
||||
"path": "/res/graphics/catdog/alert.png",
|
||||
"scaling": "fit-smallest",
|
||||
"scaling-mode": "nearest-neighbor"
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 649 B |
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 617 B |
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 744 B |
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 761 B |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 713 B |
Before Width: | Height: | Size: 775 B After Width: | Height: | Size: 775 B |
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 807 B |
Before Width: | Height: | Size: 764 B After Width: | Height: | Size: 764 B |
Before Width: | Height: | Size: 804 B After Width: | Height: | Size: 804 B |
Before Width: | Height: | Size: 602 B After Width: | Height: | Size: 602 B |
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 709 B After Width: | Height: | Size: 709 B |
Before Width: | Height: | Size: 623 B After Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 757 B |
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 756 B |
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
|
@ -22,30 +22,30 @@ ErrorOr<NonnullRefPtr<CatDog>> CatDog::create()
|
|||
// So items with the more bits should be placed before items with less bits to
|
||||
// ensure correct matching order. This also means that "Frame2" has to be first.
|
||||
static constexpr Array<ImageSource, 24> const image_sources = {
|
||||
ImageSource { State::Up | State::Right | State::Frame2, "/res/icons/catdog/nerun2.png"sv },
|
||||
{ State::Up | State::Right, "/res/icons/catdog/nerun1.png"sv },
|
||||
{ State::Up | State::Left | State::Frame2, "/res/icons/catdog/nwrun2.png"sv },
|
||||
{ State::Up | State::Left, "/res/icons/catdog/nwrun1.png"sv },
|
||||
{ State::Down | State::Right | State::Frame2, "/res/icons/catdog/serun2.png"sv },
|
||||
{ State::Down | State::Right, "/res/icons/catdog/serun1.png"sv },
|
||||
{ State::Down | State::Left | State::Frame2, "/res/icons/catdog/swrun2.png"sv },
|
||||
{ State::Down | State::Left, "/res/icons/catdog/swrun1.png"sv },
|
||||
{ State::Up | State::Frame2, "/res/icons/catdog/nrun2.png"sv },
|
||||
{ State::Up, "/res/icons/catdog/nrun1.png"sv },
|
||||
{ State::Down | State::Frame2, "/res/icons/catdog/srun2.png"sv },
|
||||
{ State::Down, "/res/icons/catdog/srun1.png"sv },
|
||||
{ State::Left | State::Frame2, "/res/icons/catdog/wrun2.png"sv },
|
||||
{ State::Left, "/res/icons/catdog/wrun1.png"sv },
|
||||
{ State::Right | State::Frame2, "/res/icons/catdog/erun2.png"sv },
|
||||
{ State::Right, "/res/icons/catdog/erun1.png"sv },
|
||||
{ State::Sleeping | State::Frame2, "/res/icons/catdog/sleep2.png"sv },
|
||||
{ State::Sleeping, "/res/icons/catdog/sleep1.png"sv },
|
||||
{ State::Idle | State::Artist, "/res/icons/catdog/artist.png"sv },
|
||||
{ State::Idle | State::Inspector, "/res/icons/catdog/inspector.png"sv },
|
||||
{ State::Idle, "/res/icons/catdog/still.png"sv },
|
||||
{ State::Alert | State::Artist, "/res/icons/catdog/artist.png"sv },
|
||||
{ State::Alert | State::Inspector, "/res/icons/catdog/inspector.png"sv },
|
||||
{ State::Alert, "/res/icons/catdog/alert.png"sv }
|
||||
ImageSource { State::Up | State::Right | State::Frame2, "/res/graphics/catdog/nerun2.png"sv },
|
||||
{ State::Up | State::Right, "/res/graphics/catdog/nerun1.png"sv },
|
||||
{ State::Up | State::Left | State::Frame2, "/res/graphics/catdog/nwrun2.png"sv },
|
||||
{ State::Up | State::Left, "/res/graphics/catdog/nwrun1.png"sv },
|
||||
{ State::Down | State::Right | State::Frame2, "/res/graphics/catdog/serun2.png"sv },
|
||||
{ State::Down | State::Right, "/res/graphics/catdog/serun1.png"sv },
|
||||
{ State::Down | State::Left | State::Frame2, "/res/graphics/catdog/swrun2.png"sv },
|
||||
{ State::Down | State::Left, "/res/graphics/catdog/swrun1.png"sv },
|
||||
{ State::Up | State::Frame2, "/res/graphics/catdog/nrun2.png"sv },
|
||||
{ State::Up, "/res/graphics/catdog/nrun1.png"sv },
|
||||
{ State::Down | State::Frame2, "/res/graphics/catdog/srun2.png"sv },
|
||||
{ State::Down, "/res/graphics/catdog/srun1.png"sv },
|
||||
{ State::Left | State::Frame2, "/res/graphics/catdog/wrun2.png"sv },
|
||||
{ State::Left, "/res/graphics/catdog/wrun1.png"sv },
|
||||
{ State::Right | State::Frame2, "/res/graphics/catdog/erun2.png"sv },
|
||||
{ State::Right, "/res/graphics/catdog/erun1.png"sv },
|
||||
{ State::Sleeping | State::Frame2, "/res/graphics/catdog/sleep2.png"sv },
|
||||
{ State::Sleeping, "/res/graphics/catdog/sleep1.png"sv },
|
||||
{ State::Idle | State::Artist, "/res/graphics/catdog/artist.png"sv },
|
||||
{ State::Idle | State::Inspector, "/res/graphics/catdog/inspector.png"sv },
|
||||
{ State::Idle, "/res/graphics/catdog/still.png"sv },
|
||||
{ State::Alert | State::Artist, "/res/graphics/catdog/artist.png"sv },
|
||||
{ State::Alert | State::Inspector, "/res/graphics/catdog/inspector.png"sv },
|
||||
{ State::Alert, "/res/graphics/catdog/alert.png"sv }
|
||||
};
|
||||
|
||||
auto catdog = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) CatDog));
|
||||
|
|