~kikoodx/sle

5d556f5f21a3b8dbf48827de8c83ef9065e79df3 — KikooDX 3 years ago de64f2a
config: background color options for editor and picker
3 files changed, 8 insertions(+), 2 deletions(-)

M include/conf.h
M src/editing_area/main.c
M src/tile_picker/main.c
M include/conf.h => include/conf.h +4 -0
@@ 7,6 7,10 @@
#define TILE_WIDTH  16
#define TILE_HEIGHT 16

#define EDITOR_BACKGROUND_COLOR                                        \
	(Color) { 0, 0, 0, 255 }
#define PICKER_BACKGROUND_COLOR                                        \
	(Color) { 0, 0, 0, 255 }
#define UNSELECTED_TILE_COLOR                                          \
	(Color) { 80, 80, 80, 255 }
#define OVERRING_TILE_COLOR                                            \

M src/editing_area/main.c => src/editing_area/main.c +2 -1
@@ 1,6 1,7 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright (C) 2021 KikooDX */

#include "conf.h"
#include "editing_area/draw.h"
#include "editing_area/level.h"
#include "info.h"


@@ 60,7 61,7 @@ int editing_area_main(struct Options options,
		/* draw */
		BeginDrawing();

		ClearBackground(BLACK);
		ClearBackground(EDITOR_BACKGROUND_COLOR);
		level_draw(level, options, tileset);
		editor_mouse_draw(options, mouse_x, mouse_y);


M src/tile_picker/main.c => src/tile_picker/main.c +2 -1
@@ 1,6 1,7 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright (C) 2021 KikooDX */

#include "conf.h"
#include "mouse.h"
#include "options.h"
#include "shared_data.h"


@@ 41,7 42,7 @@ int tile_picker_main(struct Options options,
			/* draw */
			BeginDrawing();

			ClearBackground(BLACK);
			ClearBackground(PICKER_BACKGROUND_COLOR);
			tileset_draw(tileset, options,
			             shared_data->selected_tile);