Commit graph

23 commits

Author SHA1 Message Date
Turo Lamminen
83d0f369df Make TXT_SetDesktopTitle parameter const 2018-03-13 12:31:51 +02:00
Simon Howard
356554c229 textscreen: Add help URL functionality for windows.
This adds the ability to associate a URL with a window that gives
some extra information about it and the configuration options found
in it.
2015-04-04 21:29:33 -04:00
Simon Howard
6b217ee03c textscreen: Exit immediately when all windows close.
The main loop should exit when the last window closes, but the loop
code was waiting for one event to be received before this took
effect.

This fixes #474. Thanks to Alexandre-Xavier for the report.
2014-11-27 18:58:58 -05:00
Simon Howard
7684ddcfd8 Clean up file headers.
This change rewrites and simplifies the copyright headers at the top
of all source files:

 * Remove "Emacs style mode select" line; this line was included in
   the headers for the originally released source files and appears
   to be to set the file type for old versions of Emacs. I'm not sure
   entirely why it was required but I don't think it is any more.
 * Remove "You should have received a copy of..." text from copyright
   header. This refers to the old 59 Temple Place address where the
   FSF headquarters used to be located and is no longer correct.
   Rather than change to the new address, just remove the paragraph
   as it is superfluous anyway. This fixes #311.
 * Remove ---- separator lines so that the file headers are barer
   and more simplified.
2014-05-05 00:20:54 -04:00
Simon Howard
a9d9335b20 textscreen: Use safe string functions.
Define TXT_{StringCopy,StringConcat,snprintf,vsnprintf} as analogs of
the m_misc.c versions so that the textscreen library does not need a
dependency on the Doom code, and change all textscreen code to use
these instead of unsafe functions. This fixes #372.
2014-04-01 21:49:16 -04:00
Simon Howard
58fba3477d Add textscreen functions to raise and lower windows.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2628
2013-08-31 00:12:09 +00:00
Simon Howard
379d372c65 Merge from trunk.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2464
2011-10-23 20:07:40 +00:00
Simon Howard
dd52766c7b Rework textscreen focus handling so that input boxes will stop editing
when they lose their focus (thanks Twelve).

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2460
2011-10-23 19:25:55 +00:00
Simon Howard
96f7da6adf Hook query code into setup tool, and add search results window.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2383
2011-09-18 14:16:27 +00:00
Simon Howard
9f3f6683d9 Change the background color when hovering over widgets.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2320
2011-04-04 20:07:07 +00:00
Simon Howard
42f7a9b8a2 Use "const char" in libtextscreen where appropriate (thanks entryway).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1679
2009-09-20 15:27:40 +00:00
Simon Howard
5859134e1c Better ASCII chart.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1509
2009-05-05 00:00:53 +00:00
Simon Howard
9d7126c11b Rename txt_main.c to txt_sdl.c; add txt_sdl.h for SDL-specific API
functions, while keeping txt_main.h for the common API. Add
TXT_SDL_SetEventCallback to allow programs to intercept SDL events in
the textscreen main loop.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 892
2007-06-04 18:32:50 +00:00
Simon Howard
2e3e45cb9b Add TXT_SetWindowTitle function to wrap SDL_WM_SetCaption, so that
txt_desktop.c doesn't need to call SDL functions directly.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 885
2007-05-24 14:29:08 +00:00
Simon Howard
9ee3b53c8e Stackable clip areas (useful for a future implementation of scrollable
panes).

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 713
2006-10-23 07:13:16 +00:00
Simon Howard
681c7bee78 Debug code for drawing an ASCII chart.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 658
2006-09-24 13:06:32 +00:00
Simon Howard
7bc72c666d Fix textscreen warnings.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 626
2006-09-19 23:49:20 +00:00
Simon Howard
c0d6fcfe03 Add missing copyright notices to textscreen and setup files.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 590
2006-08-31 20:40:48 +00:00
Simon Howard
fe1a0afdd7 Exit the main loop automatically after all windows are closed
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 577
2006-08-31 18:11:47 +00:00
Simon Howard
cef6abcea6 Always add a bit of padding inside windows (removes the need to add padding
explicitly in labels). Set the window title from the desktop title. 
Only draw widget selection highlight in the window with focus (top window).

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 560
2006-06-20 18:48:21 +00:00
Simon Howard
240a1cfcca Add a default action to close windows when escape is pressed. Do not
make escape quit the program unless there are no open windows. Add
TXT_ExitMainLoop().

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 518
2006-05-23 19:33:35 +00:00
Simon Howard
62b5f95367 Add main loop function and forward key presses to widgets.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 490
2006-05-20 16:34:34 +00:00
Simon Howard
344823214b Split off text mode gui desktop code into a separate file. Rename some
of the functions in txt_gui.c.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 483
2006-05-19 19:57:59 +00:00