This commit is contained in:
Sean Barrett 2018-01-29 03:29:59 -08:00
commit f22857495b
2 changed files with 4 additions and 4 deletions

View File

@ -1847,7 +1847,7 @@ static int stbte__minibutton(int colormode, int x, int y, int ch, int id)
int x0 = x, y0 = y, x1 = x+8, y1 = y+7; int x0 = x, y0 = y, x1 = x+8, y1 = y+7;
int over = stbte__hittest(x0,y0,x1,y1,id); int over = stbte__hittest(x0,y0,x1,y1,id);
if (stbte__ui.event == STBTE__paint) { if (stbte__ui.event == STBTE__paint) {
char str[2] = { ch,0 }; char str[2] = { (char)ch, 0 };
stbte__draw_textbox(x0,y0,x1,y1, str,1,0,colormode, STBTE__INDEX_FOR_ID(id,0,0)); stbte__draw_textbox(x0,y0,x1,y1, str,1,0,colormode, STBTE__INDEX_FOR_ID(id,0,0));
} }
return stbte__button_core(id); return stbte__button_core(id);
@ -1858,7 +1858,7 @@ static int stbte__layerbutton(int x, int y, int ch, int id, int toggled, int dis
int x0 = x, y0 = y, x1 = x+10, y1 = y+11; int x0 = x, y0 = y, x1 = x+10, y1 = y+11;
int over = !disabled && stbte__hittest(x0,y0,x1,y1,id); int over = !disabled && stbte__hittest(x0,y0,x1,y1,id);
if (stbte__ui.event == STBTE__paint) { if (stbte__ui.event == STBTE__paint) {
char str[2] = { ch,0 }; char str[2] = { (char)ch, 0 };
int off = (9-stbte__get_char_width(ch))/2; int off = (9-stbte__get_char_width(ch))/2;
stbte__draw_textbox(x0,y0,x1,y1, str, off+1,2, colormode, STBTE__INDEX_FOR_ID(id,disabled,toggled)); stbte__draw_textbox(x0,y0,x1,y1, str, off+1,2, colormode, STBTE__INDEX_FOR_ID(id,disabled,toggled));
} }

View File

@ -3,5 +3,5 @@ CFLAGS = -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -DSTB_DIVIDE_TEST
CPPFLAGS = -Wno-write-strings -DSTB_DIVIDE_TEST CPPFLAGS = -Wno-write-strings -DSTB_DIVIDE_TEST
all: all:
$(CC) $(INCLUDES) $(CFLAGS) ../stb_vorbis.c test_c_compilation.c -lm $(CC) $(INCLUDES) $(CFLAGS) ../stb_vorbis.c test_c_compilation.c -lm
$(CC) $(INCLUDES) $(CPPFLAGS) test_cpp_compilation.cpp -lm $(CC) $(INCLUDES) $(CPPFLAGS) test_cpp_compilation.cpp -lm -lstdc++