finnaly!
This commit is contained in:
parent
71bcd4d370
commit
e887e4f4da
@ -60,12 +60,12 @@ void sig_handler(int sig) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void print(int y, int x, char *str, int val) {
|
||||
void print(int y, int x, char *str, int val, int j) {
|
||||
if (val < 0)
|
||||
mvprintw(y, x, "%s", str);
|
||||
mvprintw(y + j, x, "%s", str);
|
||||
|
||||
else
|
||||
mvprintw(y, x, "%s", str);
|
||||
mvprintw(y - j, x, "%s", str);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
@ -100,13 +100,8 @@ int main(void) {
|
||||
max = val;
|
||||
|
||||
int lvl = (val - min) * (ws.ws_row / 5) / ((max - min) + 1);
|
||||
for (int j = 0; j < lvl; j++) {
|
||||
print(middle - j, i, "$", values[i]);
|
||||
print(middle + j, i, "$", values[i]);
|
||||
}
|
||||
|
||||
print(middle - lvl, i, ".", values[i]);
|
||||
print(middle + lvl, i, "'", values[i]);
|
||||
for (int j = 0; j < lvl; j++)
|
||||
print(middle, i, "$", values[i], j);
|
||||
}
|
||||
|
||||
refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user