Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Screencap] Rudimentary Profiles #208

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Njaecha
Copy link

@Njaecha Njaecha commented Sep 30, 2024

Adds rudimentary support for additional resolution presets, which can be bound to additional hotkey.
They are not a hotkey to change the settings, but rather additional settings, independent of the normal settings.
Because of that they do not benefit from recent improvements like the guide lines.

@Njaecha
Copy link
Author

Njaecha commented Sep 30, 2024

Looks like this in the settings:
image

Comment on lines +216 to +219
presetKeys.Add(Config.Bind("Presets", $"~{i + 1} - Shortcut", KeyboardShortcut.Empty, new ConfigDescription($"Keyboard Shortcut for Preset #{i + 1}.", null, "Advanced")));
presetResX.Add(Config.Bind("Presets", $"~{i + 1} - Res Horizontal", Screen.width, new ConfigDescription($"Horizontal size (width) of rendered screenshots in pixels of Preset #{i + 1}.", new AcceptableValueRange<int>(ScreenshotSizeMin, ScreenshotSizeMax), "Advanced")));
presetResY.Add(Config.Bind("Presets", $"~{i + 1} - Res Vertical", Screen.height, new ConfigDescription($"Vertical size (height) of rendered screenshots in pixels of Preset #{i + 1}.", new AcceptableValueRange<int>(ScreenshotSizeMin, ScreenshotSizeMax), "Advanced")));
presetDownscaling.Add(Config.Bind("Presets", $"~{i + 1} - Upsampling Ratio", 2, new ConfigDescription($"Capture screenshots in a higher resolution and then downscale them to desired size for Preset #{i + 1}. Prevents aliasing, perserves small details and gives a smoother result, but takes longer to create.", new AcceptableValueRange<int>(1, 4), "Advanced")));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to include number of the preset in the category name? e.g. [Custom Hotkey 1]

Here's how I implemented something similar, a bit less user friendly though.

Comment on lines +79 to +82
public static List<ConfigEntry<KeyboardShortcut>> presetKeys { get; private set; } = new List<ConfigEntry<KeyboardShortcut>>();
public static List<ConfigEntry<int>> presetResX { get; private set; } = new List<ConfigEntry<int>>();
public static List<ConfigEntry<int>> presetResY { get; private set; } = new List<ConfigEntry<int>>();
public static List<ConfigEntry<int>> presetDownscaling { get; private set; } = new List<ConfigEntry<int>>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather make a struct to hold all these config entries in a single list.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understandable, I can fix that 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants