public static void drawScroll_Bar(int top_y, int scroolHeight, int sumNum,
int nowNum, int drawRow, Graphics g) {
int top_x = MainCanvas.CANVASWIDTH - 5;
// 绘制背景
g.setColor(0xcccccc);
g.fillRect(top_x, top_y, 5, scroolHeight);
g.setColor(0);
if (nowNum + drawRow >= sumNum) {
g.fillRect(top_x, top_y + scroolHeight - 5, 5, 5);
} else if (nowNum == 0) {
g.fillRect(top_x, top_y, 5, 5);
} else {
g.fillRect(top_x, top_y
+ (((nowNum + drawRow/2) * 1000 / sumNum) * scroolHeight)
/ 1000 - 5, 5, 5);
}
}
int nowNum, int drawRow, Graphics g) {
int top_x = MainCanvas.CANVASWIDTH - 5;
// 绘制背景
g.setColor(0xcccccc);
g.fillRect(top_x, top_y, 5, scroolHeight);
g.setColor(0);
if (nowNum + drawRow >= sumNum) {
g.fillRect(top_x, top_y + scroolHeight - 5, 5, 5);
} else if (nowNum == 0) {
g.fillRect(top_x, top_y, 5, 5);
} else {
g.fillRect(top_x, top_y
+ (((nowNum + drawRow/2) * 1000 / sumNum) * scroolHeight)
/ 1000 - 5, 5, 5);
}
}