|
发表于 2006-1-21 16:16:40
|
显示全部楼层
我对色彩操作其实还不太熟悉,所以这里搞得不好。
不好意思
所以只是简单的把下一个牌面色彩拿过来当提示颜色,所以造成颜色过浅
如果你有兴趣,可以自己修改代码
/*
replace with new image at (i,j)
*/
gboolean
ui_replace_image(struct AlgorithmPoint p1,struct AlgorithmPoint p2)
{
********
if(p2.x != -1 && p2.y != -1)
{
/* Draw card back image */
*******
/* Draw card's front image */
gdk_pixbuf_render_to_drawable_alpha(ui_pixbuf.cardimages,ui_double_pixmap,
(algorithm_game.data[p2.x][p2.y] - 1)*UI_IMAGE_SIZE,0,
UI_FIXED_START_DRAW_LEFT + (p2.y - algorithm_game.difficulty)*(UI_BACK_WIDTH-UI_BACK_BORDER_1) +
(UI_BACK_WIDTH-UI_BACK_BORDER_1-UI_IMAGE_SIZE)/2,
UI_FIXED_START_DRAW_TOP + p2.x*(UI_BACK_HEIGHT - UI_BACK_BORDER_2)+
(UI_BACK_HEIGHT-UI_BACK_BORDER_2-UI_IMAGE_SIZE)/2,
UI_IMAGE_SIZE,UI_IMAGE_SIZE,
GDK_PIXBUF_ALPHA_BILEVEL,128,
GDK_RGB_DITHER_NORMAL, 0, 0);
**********
}
return TRUE;
} |
|