Add buffer between columns
This commit is contained in:
parent
b0698395c0
commit
0d4d3e9212
@ -42,9 +42,9 @@ pub fn main() !void {
|
||||
const args = try std.process.argsAlloc(allocator);
|
||||
defer std.process.argsFree(allocator, args);
|
||||
|
||||
const window_width = 700;
|
||||
const window_width = 760;
|
||||
const window_height = 500;
|
||||
const column_width = 100;
|
||||
const column_width = 150;
|
||||
|
||||
if (c.SDL_Init(c.SDL_INIT_VIDEO) != 0) {
|
||||
c.SDL_Log("Unable to initialize SDL: %s", c.SDL_GetError());
|
||||
@ -238,9 +238,10 @@ pub fn main() !void {
|
||||
}
|
||||
}
|
||||
|
||||
const buffer: c_int = 5;
|
||||
var i: usize = 0;
|
||||
var column: c_int = 0;
|
||||
x = 0;
|
||||
x = buffer;
|
||||
var y: c_int = 0;
|
||||
|
||||
for (file_docmaps.items) |docmap| {
|
||||
@ -269,7 +270,7 @@ pub fn main() !void {
|
||||
column += 1;
|
||||
// std.debug.print("Column: {any}, x: {any}\n", .{column, column*column_width});
|
||||
}
|
||||
x = column * column_width;
|
||||
x = column * column_width + (column + 1) * buffer;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user