• 6874阅读
  • 6回复

想实现一个象棋,当点中棋子时显示一个被选择的边框,求如何实现? [复制链接]

上一主题 下一主题
离线dzmcs
 
只看楼主 倒序阅读 楼主  发表于: 2010-05-13
点中棋子时显示一个只有四个拐角的框,四个拐角最好好看点,高手简单提点下大概思路
离线steinlee

只看该作者 1楼 发表于: 2010-05-17
You know all the positions of 棋子.
当点中棋子时, find this 棋子 and you will know its center. Then draw a 四个拐角的框 around this center.

引用楼主dzmcs于2010-05-13 02:09发表的 想实现一个象棋,当点中棋子时显示一个被选择的边框,求如何实现? :
点中棋子时显示一个只有四个拐角的框,四个拐角最好好看点,高手简单提点下大概思路
Looking for remote C/C++ and Qt 兼职
离线dzmcs
只看该作者 2楼 发表于: 2010-05-21
谢谢楼上的朋友,基本实现了。
就是那四个拐角还不好看,画了8段直线。
离线steinlee

只看该作者 3楼 发表于: 2010-05-24
引用第2楼dzmcs于2010-05-21 22:46发表的  :
谢谢楼上的朋友,基本实现了。
就是那四个拐角还不好看,画了8段直线。


You can also make or find a picture of 棋子. Move a picture when a 棋子 is moved. It will look better.
Looking for remote C/C++ and Qt 兼职
离线dzmcs
只看该作者 4楼 发表于: 2010-06-13
ls上朋友,本来我也想那样的,但画的图太难看,还不如画个格子。
已经可以在开发板上跑了,棋力还比较弱,图片:http://www.douban.com/photos/photo/501341618/
离线steinlee

只看该作者 5楼 发表于: 2010-06-19
Use word or open office to draw circles and put Chinese characters in them.
Output these pictures as gif files. Load them into your code. You will
be fine.
Looking for remote C/C++ and Qt 兼职
离线dzmcs
只看该作者 6楼 发表于: 2010-06-24
回 5楼(steinlee) 的帖子
谢谢!
好办法!棋盘用office画估计更好。不过用ps也可以,用maya建个模,还有3d效果。
快速回复
限100 字节
 
上一个 下一个