mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
b267ad09ac
## Link to GitHub Issue, if one exists Fixes #263 ## Description of change Add "scenes" to screen resize. * UI changes - F11 menu now has a "scene switcher" for `Scene 1/2/3/4`. Clean up other UI bits. * Add hotkeys for `Screen Resize Scene 1`, `Screen Resize 2`, and so on. * Detect hot key and trigger resizes. * Add additional objects to screen_resize.json for saving and loading the new scene settings. * Existing screen resize data is backwards compatible (can be loaded/saved to JSON), and is treated as `Scene 1`. * Add API endpoint for `Resize`, allow toggling resize on/off, switching active scene * Add Python wrapper. Did not bother with the other wrappers (Dart, C++, etc)... ## Compiling 🥇 ## Testing Still testing, but seems to work fine for TDJ.
13 lines
377 B
Python
13 lines
377 B
Python
from .connection import Connection
|
|
from .request import Request
|
|
|
|
def image_resize_enable(con: Connection, enable: bool):
|
|
req = Request("resize", "image_resize_enable")
|
|
req.add_param(enable)
|
|
con.request(req)
|
|
|
|
def image_resize_set_scene(con: Connection, scene: int):
|
|
req = Request("resize", "image_resize_set_scene")
|
|
req.add_param(scene)
|
|
con.request(req)
|