Move more pngs into the images.svg file
@@ -104,6 +104,9 @@ Windows/*.ipch
|
||||
Windows/imgui.ini
|
||||
imgui.ini
|
||||
|
||||
# debug file
|
||||
ui_atlas_gen.png
|
||||
|
||||
# For vim
|
||||
*.swp
|
||||
tags
|
||||
|
||||
@@ -149,11 +149,6 @@ std::vector<Data> Bucket::Resolve(int image_width, Image &dest) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((int)dest.width() > image_width * 2) {
|
||||
printf("PACKING FAIL : height=%i", (int)dest.width());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Sort the data back by ID.
|
||||
std::sort(data.begin(), data.end(), CompareByID);
|
||||
|
||||
@@ -252,7 +247,7 @@ inline u32 blendOver(u32 dst, u32 src) {
|
||||
((u32)(outB * 255 + 0.5f) << 0);
|
||||
}
|
||||
|
||||
void addDropShadow(Image &img, int shadowSize) {
|
||||
void AddDropShadow(Image &img, int shadowSize, float intensity) {
|
||||
int radius = std::max(1, (int)(shadowSize * img.scale));
|
||||
|
||||
// Expand canvas so blur has space on all sides
|
||||
@@ -280,7 +275,7 @@ void addDropShadow(Image &img, int shadowSize) {
|
||||
for (int x = 0; x < newW; x++) {
|
||||
float a = blurred[y * newW + x];
|
||||
if (a > 0.001f) {
|
||||
u32 shadowColor = ((u32)(a * 180) << 24); // semi-transparent black
|
||||
u32 shadowColor = ((u32)(a * 255 * intensity) << 24); // semi-transparent black
|
||||
newData[y * newW + x] = blendOver(newData[y * newW + x], shadowColor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,8 @@ struct Image {
|
||||
std::vector<u32> dat;
|
||||
};
|
||||
|
||||
void addDropShadow(Image &img, int shadowSize);
|
||||
// Slow.
|
||||
void AddDropShadow(Image &img, int shadowSize, float intensity);
|
||||
|
||||
struct Data {
|
||||
// item ID
|
||||
|
||||
@@ -1261,7 +1261,7 @@ void MainScreen::CreateViews() {
|
||||
} else {
|
||||
logos->Add(new ImageView(ImageID("I_ICON"), "", IS_DEFAULT, new AnchorLayoutParams(64, 64, 0, 0, NONE, NONE, false)));
|
||||
}
|
||||
logos->Add(new ImageView(ImageID("I_LOGO"), "PPSSPP", IS_DEFAULT, new AnchorLayoutParams(180, 64, 64, -5.0f, NONE, NONE, false)));
|
||||
logos->Add(new ImageView(ImageID("I_LOGO"), "PPSSPP", IS_DEFAULT, new AnchorLayoutParams(180, 64, 64, 0.0f, NONE, NONE, false)));
|
||||
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
|
||||
@@ -878,12 +878,12 @@ void LogoScreen::DrawForeground(UIContext &dc) {
|
||||
// Manually formatting UTF-8 is fun. \xXX doesn't work everywhere.
|
||||
snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", cr->T_cstr("created", "Created by"), 0xC3, 0xA5);
|
||||
if (System_GetPropertyBool(SYSPROP_APP_GOLD)) {
|
||||
UI::DrawIconShine(dc, Bounds::FromCenter(bounds.centerX() - 120, bounds.centerY() - 30, 60.0f), 0.7f, true);
|
||||
dc.Draw()->DrawImage(ImageID("I_ICON_GOLD"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, 0xFFFFFFFF, ALIGN_CENTER);
|
||||
UI::DrawIconShine(dc, Bounds::FromCenter(bounds.centerX() - 125, bounds.centerY() - 30, 60.0f), 0.7f, true);
|
||||
dc.Draw()->DrawImage(ImageID("I_ICON_GOLD"), bounds.centerX() - 125, bounds.centerY() - 30, 1.2f, 0xFFFFFFFF, ALIGN_CENTER);
|
||||
} else {
|
||||
dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, 0xFFFFFFFF, ALIGN_CENTER);
|
||||
dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 125, bounds.centerY() - 30, 1.2f, 0xFFFFFFFF, ALIGN_CENTER);
|
||||
}
|
||||
dc.Draw()->DrawImage(ImageID("I_LOGO"), bounds.centerX() + 40, bounds.centerY() - 30, 1.5f, 0xFFFFFFFF, ALIGN_CENTER);
|
||||
dc.Draw()->DrawImage(ImageID("I_LOGO"), bounds.centerX() + 45, bounds.centerY() - 30, 1.5f, 0xFFFFFFFF, ALIGN_CENTER);
|
||||
//dc.Draw()->DrawTextShadow(UBUNTU48, "PPSSPP", bounds.w / 2, bounds.h / 2 - 30, textColor, ALIGN_CENTER);
|
||||
dc.SetFontScale(1.0f, 1.0f);
|
||||
dc.SetFontStyle(dc.GetTheme().uiFont);
|
||||
|
||||
@@ -39,17 +39,19 @@ static const std::string imageIDs[] = {
|
||||
"I_START",
|
||||
"I_ARROW",
|
||||
"I_ROUND",
|
||||
"I_ROUND_LINE",
|
||||
"I_RECT",
|
||||
"I_RECT_LINE",
|
||||
"I_STICK",
|
||||
"I_STICK_BG",
|
||||
"I_SHOULDER",
|
||||
"I_DIR",
|
||||
"I_DIR_LINE",
|
||||
"I_ROUND_LINE",
|
||||
"I_RECT_LINE",
|
||||
"I_SHOULDER_LINE",
|
||||
"I_STICK_LINE",
|
||||
"I_STICK_BG_LINE",
|
||||
"I_SHOULDER",
|
||||
"I_SHOULDER_LINE",
|
||||
"I_DIR",
|
||||
"I_DIR_LINE",
|
||||
"I_SQUARE_SHAPE",
|
||||
"I_SQUARE_SHAPE_LINE",
|
||||
"I_CHECKEDBOX",
|
||||
"I_UNCHECKEDBOX",
|
||||
"I_BG",
|
||||
@@ -87,8 +89,6 @@ static const std::string imageIDs[] = {
|
||||
"I_D",
|
||||
"I_E",
|
||||
"I_F",
|
||||
"I_SQUARE_SHAPE",
|
||||
"I_SQUARE_SHAPE_LINE",
|
||||
"I_FOLDER_OPEN",
|
||||
"I_WARNING",
|
||||
"I_TRASHCAN",
|
||||
@@ -240,7 +240,7 @@ Draw::Texture *GenerateUIAtlas(Draw::DrawContext *draw, Atlas *atlas, float dpiS
|
||||
}
|
||||
|
||||
img.scale = scale;
|
||||
addDropShadow(img, 4);
|
||||
AddDropShadow(img, 3, 0.66f);
|
||||
|
||||
// pngSave(Path(std::string("../buttons_") + PNGNameFromID(shapeId)), img.data(), img.width(), img.height(), 4);
|
||||
}
|
||||
@@ -317,7 +317,7 @@ Draw::Texture *GenerateUIAtlas(Draw::DrawContext *draw, Atlas *atlas, float dpiS
|
||||
atlas->num_images = (int)genAtlasImages.size();
|
||||
|
||||
// For debug, write out the atlas.
|
||||
// dest.SavePNG("../gen.png");
|
||||
dest.SavePNG("../ui_atlas_gen.png");
|
||||
|
||||
// Then, create the texture too.
|
||||
Draw::TextureDesc desc{};
|
||||
|
||||
|
Before Width: | Height: | Size: 530 B |
|
Before Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 710 B |
|
Before Width: | Height: | Size: 284 B |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 218 B |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 709 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 667 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |