Commit graph

23 commits

Author SHA1 Message Date
Simon Howard
7ad4a11afa textscreen: Make UTF8 the rule, not the exception.
Rename TXT_DrawString() to TXT_DrawCodePageString() and rename
TXT_DrawUTF8String() to TXT_DrawString(). It's better to just assume
everything is UTF8 and deal with the exceptions, as this is less likely
to cause bugs. There is only a small handful of places where we want to
draw a specific character from the native code page.
2017-01-21 17:15:00 +00:00
Simon Howard
06dd832185 textscreen: Change most strings to UTF-8.
If we are to accept arbitrary labels, window names etc., then it makes
sense for these to be in UTF-8 format rather than strings in the code
page extended ASCII format. This should make the API more interoperable
with other data sources.
2017-01-21 16:21:27 +00:00
Simon Howard
40d1ce5541 textscreen: Refactor code page mapping.
We were duplicating the Unicode/code page mapping table between
txt_gui.c and txt_sdl.c, but in an incomplete and inconsistent way. It
makes sense that the code page mapping should be kept with the font
files that represent the code page anyway, as there may be projects like
Julian Nechaevsky's Russian Doom which may want to change the code page.
2017-01-21 15:46:04 +00: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
16c56ea0c4 textscreen: Don't allow input of unprintable characters.
If a Unicode character is not part of the Extended ASCII set that
we can display on screen, don't allow it to be typed (which would
display a backwards question mark). Thanks Alexandre-Xavier for this
suggestion on #229.
2014-10-19 16:52:36 -04: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
9ffd1cc4d4 Rework the way that window background colors are set, and change the
background color of inactive windows to black, to give better contrast
when viewing many layered windows.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2507
2012-03-01 20:26:56 +00:00
Simon Howard
20f405ec54 Fix CP437-Unicode mapping of cedilla character.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2492
2012-02-03 21:38:06 +00:00
Simon Howard
c818fb0216 Split off UTF-8 code into separate file and add extra functions.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2489
2012-02-03 20:21:17 +00:00
Simon Howard
d4df22aa1e Beginnings of limited textscreen UTF-8 support.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2487
2012-02-02 23:35:16 +00:00
Simon Howard
1138de4fb6 Fix scroll bar behavior (thanks Alexandre Xavier).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2484
2012-02-02 21:10:20 +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
1715116ef1 Remove redundant variable assignment (thanks Quasar/Yagisan)
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1630
2009-07-20 22:27:59 +00:00
Simon Howard
5a122d591e Add scrollable pane widget to textscreen library.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1437
2009-01-29 22:54:13 +00:00
Simon Howard
38d45b879b Add missing #include.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 765
2006-12-05 21:05:26 +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
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
517af9477b textscreen: Rejig how the entire drawing process works. Add a recursive
layout method that assigns the position and size of widgets for the whole
window before drawing. Add another method that responds to mouse button
presses. Allow windows to have no title bar by specifying NULL as the
title.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 547
2006-06-02 19:29:24 +00:00
Simon Howard
1ba69c88d2 Clip windows against the workspace boundaries.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 487
2006-05-20 15:45:36 +00:00
Simon Howard
f761f821f9 Add selectable and visible properties to widgets. Allow the position of
windows to be set based on position of top/bottom/center,left/right,center
coordinates.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 486
2006-05-20 15:15:17 +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
Simon Howard
d78780cfc3 Add text-mode I/O functions.
Use text-mode screen for the waiting screen.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 291
2006-01-13 23:56:00 +00:00