Adaptive window size.

Updated README.md.
This commit is contained in:
KikooDX 2021-02-28 01:45:18 +01:00
parent bd9cbf44a3
commit b36001e209
3 changed files with 13 additions and 1 deletions

View File

@ -45,6 +45,10 @@ In `src/conf.zig`, edit values from `BEGIN USER CONFIG`.
The configuration is applied at compile time. You have the possibility to:
* Disable mouse support.
* Swap mouse buttons.
* Disable backups.
* Change default grid size.
* Change default scaling level.
* Disable adaptive window size.
* Change and add colors.
* Edit keybindings.
@ -91,7 +95,6 @@ Modes:
* Left or right click while un·selecting: end selection.
# Backups
*Can be disabled in the configuration.*
Safety backups are made when:
* Reading operation is started (`backup_read.kble`)
* The program exit (`backup_exit.kble`)

View File

@ -42,6 +42,8 @@ pub const default_window_size = .{
.height = default_grid_size.width * default_scaling_level,
};
pub const adaptive_window_size = true;
pub const theme = .{
.background = ray.BLACK,
.mode = .{

View File

@ -259,6 +259,13 @@ pub fn main() void {
}
}
// Adaptive window size.
if (conf.adaptive_window_size) {
const width = level.width * scale;
const height = level.height * scale;
ray.SetWindowSize(width, height);
}
ray.BeginDrawing();
defer ray.EndDrawing();