home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume2
/
mines.shr
/
msgsw.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-11-20
|
973b
|
50 lines
/*
* message subwindow handling
*
* Copyright (c) 1987 Tom Anderson; 20831 Frank Waters Road;
* Stanwood, WA 98282. All rights reserved.
*/
static char copyright[] = "Copyright 1987 Tom Anderson";
#include <stdio.h>
#include <ctype.h>
#include <suntool/tool_hs.h>
#include <suntool/panel.h>
#include <strings.h>
#include "mines.h"
struct toolsw * MessageSW;
Panel MessagePanel;
Panel_item MessageItem;
/*
* set up the message subwindow
*/
void
InitMsgSW()
{
if ((MessageSW = panel_create(MinesTool, 0)) == NULL) {
fprintf(stderr, "Can't create message panel\n");
exit(1);
}
MessagePanel = MessageSW->ts_data;
/* create the message panel item */
MessageItem = panel_create_item(MessagePanel, PANEL_MESSAGE,
PANEL_LABEL_STRING, MineWarningMessage(),
PANEL_SHOW_ITEM, TRUE,
0);
panel_fit_height(MessagePanel);
}
void
Message(cp)
char * cp;
{
panel_set(MessageItem,
PANEL_LABEL_STRING, cp,
PANEL_SHOW_ITEM, TRUE,
0);
}