variable in the config to show/hide shadow #424

This commit is contained in:
BADIM-PC\Vadim 2017-12-07 17:03:22 +03:00
parent 3030b5bafa
commit fbd7203599
5 changed files with 15 additions and 2 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -83,7 +83,10 @@ static void drawCode(Code* code, bool withCursor)
if(code->cursor.selection && pointer >= selection.start && pointer < selection.end) if(code->cursor.selection && pointer >= selection.start && pointer < selection.end)
code->tic->api.rect(code->tic, x-1, y-1, TIC_FONT_WIDTH+1, TIC_FONT_HEIGHT+1, getConfig()->theme.code.select); code->tic->api.rect(code->tic, x-1, y-1, TIC_FONT_WIDTH+1, TIC_FONT_HEIGHT+1, getConfig()->theme.code.select);
else code->tic->api.draw_char(code->tic, symbol, x+1, y+1, 0); else if(getConfig()->theme.code.shadow)
{
code->tic->api.draw_char(code->tic, symbol, x+1, y+1, 0);
}
code->tic->api.draw_char(code->tic, symbol, x, y, *colorPointer); code->tic->api.draw_char(code->tic, symbol, x, y, *colorPointer);

View File

@ -112,6 +112,15 @@ static void readCodeTheme(Config* config, lua_State* lua)
lua_pop(lua, 1); lua_pop(lua, 1);
} }
{
lua_getfield(lua, -1, "SHADOW");
if(lua_isboolean(lua, -1))
config->data.theme.code.shadow = lua_toboolean(lua, -1);
lua_pop(lua, 1);
}
} }
lua_pop(lua, 1); lua_pop(lua, 1);

View File

@ -88,6 +88,7 @@ typedef struct
u8 other; u8 other;
u8 select; u8 select;
u8 cursor; u8 cursor;
bool shadow;
} code; } code;
struct struct