-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
142 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef STYLE_H | ||
#define STYLE_H | ||
|
||
#define NK_INCLUDE_FIXED_TYPES | ||
#define NK_INCLUDE_STANDARD_IO | ||
#define NK_INCLUDE_STANDARD_VARARGS | ||
#define NK_INCLUDE_DEFAULT_ALLOCATOR | ||
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT | ||
#define NK_INCLUDE_FONT_BAKING | ||
#define NK_INCLUDE_DEFAULT_FONT | ||
#define NK_KEYSTATE_BASED_INPUT | ||
#include <nuklear.h> | ||
|
||
enum theme { | ||
DARK_MODE, LIGHT_MODE, | ||
}; | ||
|
||
static inline void set_style(struct nk_context *ctx, enum theme theme) { | ||
struct nk_color table[NK_COLOR_COUNT]; | ||
|
||
table[NK_COLOR_TEXT] = nk_rgba(0x1B, 0x1B, 0x1B, 0xFF); | ||
table[NK_COLOR_WINDOW] = nk_rgba(0xD9, 0xD9, 0xD9, 0xFF); | ||
table[NK_COLOR_HEADER] = nk_rgba(175, 175, 175, 255); | ||
table[NK_COLOR_BORDER] = nk_rgba(0xD9, 0xD9, 0xD9, 255); | ||
table[NK_COLOR_BUTTON] = nk_rgba(0xD9, 0xD9, 0xD9, 255); | ||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(0xD9, 0xD9, 0xD9, 255); | ||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(0xD9, 0xD9, 0xD9, 255); | ||
table[NK_COLOR_SLIDER] = nk_rgba(0x82, 0x82, 0x82, 255); | ||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(0x1B, 0x1B, 0x1B, 255); | ||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(0x1B, 0x1B, 0x1B, 255); | ||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(0x1B, 0x1B, 0x1B, 255); | ||
table[NK_COLOR_PROPERTY] = nk_rgba(175, 175, 175, 255); | ||
table[NK_COLOR_EDIT] = nk_rgba(150, 150, 150, 255); | ||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(0, 0, 0, 255); | ||
table[NK_COLOR_COMBO] = nk_rgba(175, 175, 175, 255); | ||
table[NK_COLOR_CHART] = nk_rgba(160, 160, 160, 255); | ||
table[NK_COLOR_CHART_COLOR] = nk_rgba(45, 45, 45, 255); | ||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255); | ||
table[NK_COLOR_TAB_HEADER] = nk_rgba(180, 180, 180, 255); | ||
|
||
nk_style_from_table(ctx, table); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.