fix combinaton

This commit is contained in:
vrd
2023-01-20 23:12:38 +02:00
parent afe6d093a9
commit 9434edbe36
9 changed files with 207 additions and 157 deletions
+18 -1
View File
@@ -1 +1,18 @@
/* #include"help.h" */
#include "help.h"
bool willBeVisible(I16 drawY, I16 drawX, U16 height, U16 width)
{
return (drawY + height > 0) && (drawX + width > 0) &&
drawY < LINES && drawX < COLS;
}
void drawpad(WINDOW* pad, I16 drawY, I16 drawX)
{
const U16 pbegY = drawY>0 ? 0 : -drawY; /* pad top left coords to be displayed */
const U16 pbegX = drawX>0 ? 0 : -drawX;
pnoutrefresh(pad,
pbegY, pbegX,
drawY, drawX,
LINES - 1, COLS - 1);
}