reduce the alpha of console selection (text was too hard to read)
This commit is contained in:
@@ -51,10 +51,10 @@ void fdrawcheckerboard(float x1, float y1, float x2, float y2);
|
||||
|
||||
/* OpenGL stipple defines */
|
||||
/* OpenGL stipple defines */
|
||||
extern unsigned char stipple_halftone[128];
|
||||
extern unsigned char stipple_quarttone[128];
|
||||
extern unsigned char stipple_diag_stripes_pos[128];
|
||||
extern unsigned char stipple_diag_stripes_neg[128];
|
||||
extern const unsigned char stipple_halftone[128];
|
||||
extern const unsigned char stipple_quarttone[128];
|
||||
extern const unsigned char stipple_diag_stripes_pos[128];
|
||||
extern const unsigned char stipple_diag_stripes_neg[128];
|
||||
|
||||
/**
|
||||
* Draw a lined (non-looping) arc with the given
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
/* ******************************************** */
|
||||
|
||||
/* defined in BIF_gl.h */
|
||||
GLubyte stipple_halftone[128] = {
|
||||
const GLubyte stipple_halftone[128] = {
|
||||
0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
|
||||
0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
|
||||
0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
|
||||
@@ -83,7 +83,7 @@ GLubyte stipple_halftone[128] = {
|
||||
* 00000000 */
|
||||
|
||||
|
||||
GLubyte stipple_quarttone[128] = {
|
||||
const GLubyte stipple_quarttone[128] = {
|
||||
136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
|
||||
136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
|
||||
136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
|
||||
@@ -94,7 +94,7 @@ GLubyte stipple_quarttone[128] = {
|
||||
136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0};
|
||||
|
||||
|
||||
GLubyte stipple_diag_stripes_pos[128] = {
|
||||
const GLubyte stipple_diag_stripes_pos[128] = {
|
||||
0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe,
|
||||
0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8,
|
||||
0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0,
|
||||
@@ -113,7 +113,7 @@ GLubyte stipple_diag_stripes_pos[128] = {
|
||||
0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f};
|
||||
|
||||
|
||||
GLubyte stipple_diag_stripes_neg[128] = {
|
||||
const GLubyte stipple_diag_stripes_neg[128] = {
|
||||
0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01,
|
||||
0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07,
|
||||
0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f,
|
||||
|
||||
@@ -71,14 +71,14 @@ BLI_INLINE void console_step_sel(ConsoleDrawContext *cdc, const int step)
|
||||
static void console_draw_sel(const int sel[2], const int xy[2], const int str_len_draw, int cwidth, int lheight)
|
||||
{
|
||||
if (sel[0] <= str_len_draw && sel[1] >= 0) {
|
||||
int sta = max_ii(sel[0], 0);
|
||||
int end = min_ii(sel[1], str_len_draw);
|
||||
const int sta = max_ii(sel[0], 0);
|
||||
const int end = min_ii(sel[1], str_len_draw);
|
||||
|
||||
glEnable(GL_POLYGON_STIPPLE);
|
||||
glPolygonStipple(stipple_halftone);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glColor4ub(255, 255, 255, 96);
|
||||
glColor4ub(255, 255, 255, 48);
|
||||
|
||||
glRecti(xy[0] + (cwidth * sta), xy[1] - 2 + lheight, xy[0] + (cwidth * end), xy[1] - 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user