forked from pyrite-dev/milsko
font
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@43 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
b20c81b46e
commit
a8764925f7
4 changed files with 141 additions and 141 deletions
|
|
@ -15,7 +15,7 @@ static void draw(MwWidget handle) {
|
||||||
|
|
||||||
MwDrawFrame(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)), handle->pressed);
|
MwDrawFrame(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)), handle->pressed);
|
||||||
|
|
||||||
// MwDrawRect(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)));
|
// MwDrawRect(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void click(MwWidget handle) {
|
static void click(MwWidget handle) {
|
||||||
|
|
|
||||||
10
src/draw.c
10
src/draw.c
|
|
@ -116,22 +116,22 @@ void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert) {
|
||||||
rect->height -= border * 2;
|
rect->height -= border * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor color){
|
void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor color) {
|
||||||
int i, x, y, sx, sy;
|
int i, x, y, sx, sy;
|
||||||
MwRect r;
|
MwRect r;
|
||||||
|
|
||||||
sx = point->x;
|
sx = point->x;
|
||||||
sy = point->y;
|
sy = point->y;
|
||||||
|
|
||||||
for(i = 0; text[i] != 0; i++){
|
for(i = 0; text[i] != 0; i++) {
|
||||||
for(y = 0; y < 14; y++){
|
for(y = 0; y < 14; y++) {
|
||||||
for(x = 0; x < 7; x++){
|
for(x = 0; x < 7; x++) {
|
||||||
r.x = sx + x;
|
r.x = sx + x;
|
||||||
r.y = sy + y;
|
r.y = sy + y;
|
||||||
r.width = 1;
|
r.width = 1;
|
||||||
r.height = 1;
|
r.height = 1;
|
||||||
|
|
||||||
if(MwFontData[(unsigned char)text[i]].data[y] & (1 << (7 - x))){
|
if(MwFontData[(unsigned char)text[i]].data[y] & (1 << (7 - x))) {
|
||||||
MwDrawRect(handle, &r, color);
|
MwDrawRect(handle, &r, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue