Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/assets/opensb/interface
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-05-25 12:52:07 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-05-25 12:52:07 +1000
commitf3adb0b9d01783822a48d50111a9b99673b6b718 (patch)
treefc3bafee4d86d6c7ab3447e6c05a0d974253aa60 /assets/opensb/interface
parente31a37421214db40a631c2721381f240f03c770e (diff)
Add an interface scale slider
Diffstat (limited to 'assets/opensb/interface')
-rw-r--r--assets/opensb/interface/graphicsmenu/body.png.patch.lua20
-rw-r--r--assets/opensb/interface/graphicsmenu/shine.pngbin0 -> 740 bytes
-rw-r--r--assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua16
3 files changed, 25 insertions, 11 deletions
diff --git a/assets/opensb/interface/graphicsmenu/body.png.patch.lua b/assets/opensb/interface/graphicsmenu/body.png.patch.lua
index 32afe25..85ac17e 100644
--- a/assets/opensb/interface/graphicsmenu/body.png.patch.lua
+++ b/assets/opensb/interface/graphicsmenu/body.png.patch.lua
@@ -1,11 +1,13 @@
-function patch(image)
- -- Camera Pan Speed
- image:copyInto({119, 68}, image:process("?crop=19;68;117;87"))
+function patch(original)
+ local image = original:process("?crop=0;0;1;1?scalenearest=236;166")
+ image:copyInto({0, 28}, original)
+ image:copyInto({0, 0}, original:process("?crop=0;0;236;96"))
local checkbox = image:process("?crop=19;26;117;35")
- -- Anti-Aliasing
- image:copyInto({119, 26}, checkbox)
- -- Object Lighting
- image:copyInto({19, 15}, checkbox)
- -- Hardware Cursor
- image:copyInto({119, 15}, checkbox)
+ image:copyInto({119, 26}, checkbox) -- Anti-Aliasing
+ image:copyInto({19, 15}, checkbox) -- Object Lighting
+ image:copyInto({119, 15}, checkbox) -- Hardware Cursor
+
+ image:copyInto({119, 68}, image:process("?crop=19;68;117;87")) -- Camera Pan Speed
+
+ return image
end \ No newline at end of file
diff --git a/assets/opensb/interface/graphicsmenu/shine.png b/assets/opensb/interface/graphicsmenu/shine.png
new file mode 100644
index 0000000..fb130dd
--- /dev/null
+++ b/assets/opensb/interface/graphicsmenu/shine.png
Binary files differ
diff --git a/assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua b/assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua
index 50cf130..c808db7 100644
--- a/assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua
+++ b/assets/opensb/interface/windowconfig/graphicsmenu.config.patch.lua
@@ -17,14 +17,21 @@ end
function patch(config)
local layout = config.paneLayout
layout.panefeature.positionLocked = false
+ layout.panefeature.anchor = "center"
+ for i = 1, 32 do config.zoomList[i] = i end
-- 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 the interface scale widgets
+ shift(clone(layout, "zoomLabel", "interfaceScaleLabel"), 0, 28).value = "INTERFACE SCALE"
+ shift(clone(layout, "zoomSlider", "interfaceScaleSlider"), 0, 28)
+ shift(clone(layout, "zoomValueLabel", "interfaceScaleValueLabel"), 0, 28)
+ config.interfaceScaleList = {0, 1, 2, 3, 4, 5, 6} -- 0 = AUTO!
+
-- Create anti-aliasing toggle
shift(clone(layout, "multiTextureLabel", "antiAliasingLabel"), 98).value = "SUPER-SAMPLED AA"
shift(clone(layout, "multiTextureCheckbox", "antiAliasingCheckbox"), 99)
@@ -34,5 +41,10 @@ function patch(config)
-- Create hardware cursor toggle
shift(clone(layout, "multiTextureLabel", "hardwareCursorLabel"), 98, -11).value = "HARDWARE CURSOR"
shift(clone(layout, "multiTextureCheckbox", "hardwareCursorCheckbox"), 99, -11)
+
+ shift(layout.title, 0, 28)
+ shift(layout.resLabel, 0, 28)
+ shift(layout.resSlider, 0, 28)
+ shift(layout.resValueLabel, 0, 28)
return config
end \ No newline at end of file