mirror of https://git.sr.ht/~kikoodx/kble
parent
bd9cbf44a3
commit
b36001e209
|
@ -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`)
|
||||
|
|
|
@ -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 = .{
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue