minor tweaks.

This commit is contained in:
Kelvin Sherlock 2018-12-09 13:15:06 -05:00
parent 91b9173244
commit bab3dfc384
1 changed files with 14 additions and 1 deletions

15
nda.c
View File

@ -302,7 +302,7 @@ pascal void DrawInfo(Rect *rect, const char *str, GrafPortPtr w) {
SetBackColor(0x0f);
EraseRect(rect);
if (str) {
MoveTo(/*8, 22*/ rect->h1 + 2, rect->v1 + 2);
MoveTo(/*8, 22*/ rect->h1 + 10, rect->v1 + 9);
DrawString(str);
}
}
@ -311,6 +311,11 @@ void DrawWindow(void) { DrawControls(GetPort()); }
#pragma databank 0
void MakeCtlTargetByID(GrafPortPtr window, Long resID) {
CtlRecHndl h = GetCtlHandleFromID(window, resID);
if (h) MakeThisCtlTarget(h);
}
void NDAInit(Word code) {
if (code) {
MyWindow = NULL;
@ -319,6 +324,7 @@ void NDAInit(Word code) {
MyID = MMStartUp();
ipid = 0;
st = st_none;
} else {
if (ToolsLoaded)
NDAShutDownTools(&ss);
@ -365,12 +371,19 @@ GrafPortPtr NDAOpen(void) {
rWindParam1);
SetInfoDraw(DrawInfo, MyWindow);
UpdateStatus(0);
AcceptRequests(ReqName, MyID, &HandleRequest);
MakeCtlTargetByID(MyWindow, rCtrlLE);
SetSysWindow(MyWindow);
ShowWindow(MyWindow);
SelectWindow(MyWindow);
ConnectionInit(&connection, MyID, MarinettiCallback);
NDAResourceRestore(&resInfo);