forked from pyrite-dev/milsko
use proper method
This commit is contained in:
parent
f7df6df342
commit
3dac44ed92
1 changed files with 5 additions and 4 deletions
|
|
@ -46,6 +46,7 @@ static void color_set_disabled_if_disabled(MwWidget handle, MwLLColor rgb) {
|
|||
rgb->common.red = rgb->common.red + (c->common.red - rgb->common.red) * 0.5;
|
||||
rgb->common.green = rgb->common.green + (c->common.green - rgb->common.green) * 0.5;
|
||||
rgb->common.blue = rgb->common.blue + (c->common.blue - rgb->common.blue) * 0.5;
|
||||
MwLLColorUpdate(handle->lowlevel, rgb, rgb->common.red, rgb->common.green, rgb->common.blue);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -440,14 +441,14 @@ void MwDrawTriangle(MwWidget handle, MwRect* rect, MwLLColor color, int invert,
|
|||
MwLLColor darker = MwLightenColor(handle, color, -ColorDiff, -ColorDiff, -ColorDiff);
|
||||
MwLLColor lighter = MwLightenColor(handle, color, ColorDiff, ColorDiff, ColorDiff);
|
||||
MwLLColor col = invert ? MwLightenColor(handle, color, -8, -8, -8) : color;
|
||||
color_set_disabled_if_disabled(handle, col);
|
||||
color_set_disabled_if_disabled(handle, darker);
|
||||
color_set_disabled_if_disabled(handle, lighter);
|
||||
|
||||
double deg = 30 * ((direction == MwEAST || direction == MwWEST) ? 2 : 1);
|
||||
double c = cos(deg / 180 * M_PI);
|
||||
double s = sin(deg / 180 * M_PI);
|
||||
|
||||
color_set_disabled_if_disabled(handle, col);
|
||||
color_set_disabled_if_disabled(handle, darker);
|
||||
color_set_disabled_if_disabled(handle, lighter);
|
||||
|
||||
if(direction == MwNORTH) {
|
||||
p1[0].x = rect->x + rect->width / 2;
|
||||
p1[0].y = rect->y;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue