diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-08 14:22:22 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-08 14:22:22 +1000 |
commit | 8a8a0501590e83cbc598c7491fca0b767094466f (patch) | |
tree | 4fd806e646179fa9a7e4027cc60e19492d003ade /assets/opensb/interface | |
parent | 4458d2e85ed7f9e373af290dbe8063a52d2824b5 (diff) |
2 features: multi-sample anti-aliasing & Lua patches for images
Diffstat (limited to 'assets/opensb/interface')
-rw-r--r-- | assets/opensb/interface/graphicsmenu/body.png | bin | 754 -> 0 bytes | |||
-rw-r--r-- | assets/opensb/interface/graphicsmenu/body.png.patch.lua | 6 | ||||
-rw-r--r-- | assets/opensb/interface/windowconfig/graphicsmenu.config.patch | 70 | ||||
-rw-r--r-- | assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua | 35 |
4 files changed, 41 insertions, 70 deletions
diff --git a/assets/opensb/interface/graphicsmenu/body.png b/assets/opensb/interface/graphicsmenu/body.png Binary files differdeleted file mode 100644 index e721afa..0000000 --- a/assets/opensb/interface/graphicsmenu/body.png +++ /dev/null diff --git a/assets/opensb/interface/graphicsmenu/body.png.patch.lua b/assets/opensb/interface/graphicsmenu/body.png.patch.lua new file mode 100644 index 0000000..0c811cd --- /dev/null +++ b/assets/opensb/interface/graphicsmenu/body.png.patch.lua @@ -0,0 +1,6 @@ +function patch(image) + -- Camera Pan Speed + image:copyInto({119, 68}, image:process("?crop=19;68;117;87")) + -- Anti-Aliasing + image:copyInto({119, 26}, image:process("?crop=19;26;117;35")) +end
\ No newline at end of file diff --git a/assets/opensb/interface/windowconfig/graphicsmenu.config.patch b/assets/opensb/interface/windowconfig/graphicsmenu.config.patch deleted file mode 100644 index d8da2c5..0000000 --- a/assets/opensb/interface/windowconfig/graphicsmenu.config.patch +++ /dev/null @@ -1,70 +0,0 @@ -{ - "paneLayout": { - "panefeature": { "positionLocked": false }, - "cameraSpeedLabel" : { - "type" : "label", - "position" : [170, 112], - "hAnchor" : "mid", - "value" : "CAMERA PAN SPEED" - }, - "cameraSpeedValueLabel" : { - "type" : "label", - "position" : [202, 99], - "hAnchor" : "mid", - "value" : "Replace Me" - }, - "cameraSpeedSlider" : { - "type" : "slider", - "position" : [126, 98], - "gridImage" : "/interface/optionsmenu/smallselection.png" - } - }, - "zoomList": [ - 1, - 1.125, - 1.25, - 1.375, - 1.5, - 1.675, - 1.75, - 1.875, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32 - ], - "cameraSpeedList" : [ - 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, - 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, - 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, - 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, - 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0 - ] -}
\ No newline at end of file diff --git a/assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua b/assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua new file mode 100644 index 0000000..b8c18b1 --- /dev/null +++ b/assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua @@ -0,0 +1,35 @@ +-- gadgets +local function jcopy(base) return sb.jsonMerge(base, {}) end + +local function clone(base, a, b) + local copy = jcopy(base[a]) + base[b] = copy + return copy +end + +local function shift(thing, x, y) + thing.position[1] = thing.position[1] + (tonumber(x) or 0) + thing.position[2] = thing.position[2] + (tonumber(y) or 0) + return thing +end + +-- patch function, called by the game +function patch(config) + local layout = config.paneLayout + layout.panefeature.positionLocked = false + + -- Create the camera pan speed widgets + shift(clone(layout, "zoomLabel", "cameraSpeedLabel"), 100).value = "CAMERA PAN SPEED" + shift(clone(layout, "zoomSlider", "cameraSpeedSlider"), 100) + shift(clone(layout, "zoomValueLabel", "cameraSpeedValueLabel"), 100) + -- Populate camera speed list + config.cameraSpeedList = jarray() + for i = 1, 50 do config.cameraSpeedList[i] = i / 10 end + for i = 1, 32 do config.zoomList[i] = i end + + -- Create anti-aliasing toggle + shift(clone(layout, "multiTextureLabel", "antiAliasingLabel"), 100).value = "SUPER-SAMPLED AA" + shift(clone(layout, "multiTextureCheckbox", "antiAliasingCheckbox"), 100) + + return config +end
\ No newline at end of file |