title changes (moved quit button away) + better compressed all the pngs
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 101 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 754 B |
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 743 B |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 391 B |
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 79 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 496 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 83 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 383 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 810 B |
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 729 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 153 B |
BIN
assets/opensb/interface/title/barstound.png
Normal file
After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 79 KiB |
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"skyBackdropDarken" : [0, 0, 0, 64],
|
|
||||||
"backdropImages" : [ [ [0, 0], "/interface/title/starbound.png", 0.5, [0.5, 0.5] ] ]
|
|
||||||
}
|
|
17
assets/opensb/interface/windowconfig/title.config.patch.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
function patch(data)
|
||||||
|
for i, v in pairs(data.mainMenuButtons) do
|
||||||
|
if not v.rightAnchored then
|
||||||
|
v.offset[2] = v.offset[2] + (v.key == "quit" and -5 or 15)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
data.skyBackdropDarken = jarray{0, 0, 0, 64}
|
||||||
|
data.backdropImages = jarray{
|
||||||
|
jarray{
|
||||||
|
jarray{0, 0},
|
||||||
|
"/interface/title/" .. (sb.makeRandomSource():randUInt(100) == 0 and "barst" or "starb") .. "ound.png",
|
||||||
|
0.5,
|
||||||
|
jarray{0.5, 0.5}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
end
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 166 B |
@ -103,7 +103,8 @@ Maybe<RectU> FramesSpecification::getRect(String const& frame) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Assets::Assets(Settings settings, StringList assetSources) {
|
Assets::Assets(Settings settings, StringList assetSources) {
|
||||||
const char* const AssetsPatchSuffix = ".patch";
|
const char* AssetsPatchSuffix = ".patch";
|
||||||
|
const char* AssetsLuaPatchSuffix = ".patch.lua";
|
||||||
|
|
||||||
m_settings = std::move(settings);
|
m_settings = std::move(settings);
|
||||||
m_stopThreads = false;
|
m_stopThreads = false;
|
||||||
@ -190,6 +191,10 @@ Assets::Assets(Settings settings, StringList assetSources) {
|
|||||||
auto targetPatchFile = filename.substr(0, filename.size() - strlen(AssetsPatchSuffix));
|
auto targetPatchFile = filename.substr(0, filename.size() - strlen(AssetsPatchSuffix));
|
||||||
if (auto p = m_files.ptr(targetPatchFile))
|
if (auto p = m_files.ptr(targetPatchFile))
|
||||||
p->patchSources.append({filename, source});
|
p->patchSources.append({filename, source});
|
||||||
|
} else if (filename.endsWith(AssetsLuaPatchSuffix, String::CaseInsensitive)) {
|
||||||
|
auto targetPatchFile = filename.substr(0, filename.size() - strlen(AssetsLuaPatchSuffix));
|
||||||
|
if (auto p = m_files.ptr(targetPatchFile))
|
||||||
|
p->patchSources.append({filename, source});
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
if (filename.endsWith(AssetsPatchSuffix + toString(i), String::CaseInsensitive)) {
|
if (filename.endsWith(AssetsPatchSuffix + toString(i), String::CaseInsensitive)) {
|
||||||
|
@ -110,7 +110,7 @@ Json const AdditionalDefaultConfiguration = Json::parseJson(R"JSON(
|
|||||||
"ChatBegin" : [ { "type" : "key", "value" : "Return", "mods" : [] } ],
|
"ChatBegin" : [ { "type" : "key", "value" : "Return", "mods" : [] } ],
|
||||||
"ChatBeginCommand" : [ { "type" : "key", "value" : "/", "mods" : [] } ],
|
"ChatBeginCommand" : [ { "type" : "key", "value" : "/", "mods" : [] } ],
|
||||||
"ChatStop" : [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
|
"ChatStop" : [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
|
||||||
"InterfaceHideHud" : [ { "type" : "key", "value" : "Z", "mods" : [ "LAlt" ] } ],
|
"InterfaceHideHud" : [ { "type" : "key", "value" : "F1", "mods" : [] } ],
|
||||||
"InterfaceChangeBarGroup" : [ { "type" : "key", "value" : "X", "mods" : [] } ],
|
"InterfaceChangeBarGroup" : [ { "type" : "key", "value" : "X", "mods" : [] } ],
|
||||||
"InterfaceDeselectHands" : [ { "type" : "key", "value" : "Z", "mods" : [] } ],
|
"InterfaceDeselectHands" : [ { "type" : "key", "value" : "Z", "mods" : [] } ],
|
||||||
"InterfaceBar1" : [ { "type" : "key", "value" : "1", "mods" : [] } ],
|
"InterfaceBar1" : [ { "type" : "key", "value" : "1", "mods" : [] } ],
|
||||||
@ -129,7 +129,7 @@ Json const AdditionalDefaultConfiguration = Json::parseJson(R"JSON(
|
|||||||
"EssentialBar4" : [ { "type" : "key", "value" : "N", "mods" : [] } ],
|
"EssentialBar4" : [ { "type" : "key", "value" : "N", "mods" : [] } ],
|
||||||
"InterfaceRepeatCommand" : [ { "type" : "key", "value" : "P", "mods" : [] } ],
|
"InterfaceRepeatCommand" : [ { "type" : "key", "value" : "P", "mods" : [] } ],
|
||||||
"InterfaceToggleFullscreen" : [ { "type" : "key", "value" : "F11", "mods" : [] } ],
|
"InterfaceToggleFullscreen" : [ { "type" : "key", "value" : "F11", "mods" : [] } ],
|
||||||
"InterfaceReload" : [ ],
|
"InterfaceReload" : [],
|
||||||
"InterfaceEscapeMenu" : [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
|
"InterfaceEscapeMenu" : [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
|
||||||
"InterfaceInventory" : [ { "type" : "key", "value" : "I", "mods" : [] } ],
|
"InterfaceInventory" : [ { "type" : "key", "value" : "I", "mods" : [] } ],
|
||||||
"InterfaceCodex" : [ { "type" : "key", "value" : "L", "mods" : [] } ],
|
"InterfaceCodex" : [ { "type" : "key", "value" : "L", "mods" : [] } ],
|
||||||
|
@ -446,6 +446,10 @@ StringList imageOperationReferences(List<ImageOperation> const& operations) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void processImageOperation(ImageOperation const& operation, Image& image, ImageReferenceCallback refCallback) {
|
void processImageOperation(ImageOperation const& operation, Image& image, ImageReferenceCallback refCallback) {
|
||||||
|
if (image.bytesPerPixel() == 3) {
|
||||||
|
// Convert to an image format that has alpha so certain operations function properly
|
||||||
|
image = image.convert(image.pixelFormat() == PixelFormat::BGR24 ? PixelFormat::BGRA32 : PixelFormat::RGBA32);
|
||||||
|
}
|
||||||
if (auto op = operation.ptr<HueShiftImageOperation>()) {
|
if (auto op = operation.ptr<HueShiftImageOperation>()) {
|
||||||
image.forEachPixel([&op](unsigned, unsigned, Vec4B& pixel) {
|
image.forEachPixel([&op](unsigned, unsigned, Vec4B& pixel) {
|
||||||
if (pixel[3] != 0)
|
if (pixel[3] != 0)
|
||||||
|