This is possible under DOS as well by writing to the appropriate VGA
registers, and the vanilla setup tool actually does this in earlier
versions to set "Romero Blue".
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.
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.
We use the SDL APIs to get a localized name for keys now. However, we
must consider that SDL's key names are in UTF8 format and can therefore
contain non-ASCII characters which cannot be displayed on the CP437 text
screen. So double-check if key names contain any unprintable characters
and if they do, use a fallback set of default key names instead.
This fixes#840. Thanks to Julian Nechaevsky for the report.
SDL2 has an API for getting a string description of a key. Change the
textscreen API which does the same to use it. This has the added bonus
that the setup tool will now adjust to show key descriptions that match
the system keyboard layout.
This replaces the old control over whether key mapping is enabled. We
have three different modes used in different situations: "normal" (used
when navigating windows, etc.); "raw" (used when configuring a key and
we want something derived from the scancode) and "text" (used when typing
something into an input box widget).
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.
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.
the clicked location. Interpret mousewheel events so that scroll panes
can be scrolled.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2307
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
Add the ability to enable/disable key mappings so that the raw key can
be read in setup, exactly the same way that it is in Doom.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 846
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