Add TXT_SetDesktopTitle()
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 482
This commit is contained in:
parent
f6e8d4c46e
commit
aaf96ab501
3 changed files with 17 additions and 3 deletions
|
|
@ -56,6 +56,7 @@ void Window2(void)
|
|||
int main()
|
||||
{
|
||||
TXT_Init();
|
||||
TXT_SetDesktopTitle("Not Chocolate Doom Setup");
|
||||
|
||||
Window2();
|
||||
SetupWindow();
|
||||
|
|
@ -64,7 +65,7 @@ int main()
|
|||
{
|
||||
firstwin->selected = (firstwin->selected + 1) % firstwin->num_widgets;
|
||||
|
||||
TXT_DrawAllWindows();
|
||||
TXT_DrawAllWindows();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#define MAXWINDOWS 128
|
||||
|
||||
static char *desktop_title;
|
||||
static txt_window_t *all_windows[MAXWINDOWS];
|
||||
static int num_windows = 0;
|
||||
|
||||
|
|
@ -152,11 +153,23 @@ static void DrawWindow(txt_window_t *window)
|
|||
TXT_DrawSeparator(window_x, window_y + 2 + window->num_widgets, window_w);
|
||||
}
|
||||
|
||||
void TXT_SetDesktopTitle(char *title)
|
||||
{
|
||||
free(desktop_title);
|
||||
desktop_title = strdup(title);
|
||||
}
|
||||
|
||||
void TXT_DrawAllWindows(void)
|
||||
{
|
||||
int i;
|
||||
char *title;
|
||||
|
||||
TXT_DrawDesktop("Not Chocolate Doom setup");
|
||||
if (desktop_title == NULL)
|
||||
title = "";
|
||||
else
|
||||
title = desktop_title;
|
||||
|
||||
TXT_DrawDesktop(title);
|
||||
|
||||
for (i=0; i<num_windows; ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ struct txt_window_s
|
|||
txt_window_t *TXT_NewWindow(char *title, int x, int y);
|
||||
void TXT_CloseWindow(txt_window_t *window);
|
||||
void TXT_AddWidget(txt_window_t *window, void *widget);
|
||||
|
||||
void TXT_SetDesktopTitle(char *title);
|
||||
void TXT_DrawAllWindows(void);
|
||||
|
||||
#endif /* #ifndef TXT_WINDOW_T */
|
||||
|
|
|
|||
Loading…
Reference in a new issue