Commit graph

26 commits

Author SHA1 Message Date
Turo Lamminen
5f82ebd75b Make TXT_NewInvertedCheckBox label parameter const 2018-03-13 19:33:51 +02:00
Turo Lamminen
27a28b8ad9 Make TXT_NewCheckBox label parameter const 2018-03-13 19:33:51 +02:00
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
5da27e00a5 textscreen: Add table cell overflowing.
It's a common pattern in the setup tool that widgets are laid out in
a grid, except there inevitably end up being widgets that do not
conform to this grid. This become ugly to code around, as it ends up
requiring packing tables inside tables to get the desired result, when
all that is really wanted is a widget that can take up more than one
cell in the table. Overflowing allows cells in the table to be
designated as "overflows" of neighboring cells, to facilitate this.
2015-07-09 01:51:05 -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
003c82ce37 Remove some calls to TXT_FGColor by using the new TXT_SaveColors system
instead. Remove the unused "embedded color code" system from TXT_Puts.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2508
2012-03-04 12:06:29 +00: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
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
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
83fb03a0e0 When large numbers of screen resolutions are detected, increase the
number of columns in the mode list to fit them all on-screen. Remove
superfluous left-side spacing from the checkbox and radio button widgets
so that the modes can be packed closer together.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2242
2011-01-31 01:25:47 +00:00
Simon Howard
56824b130b Replace txt_widget_t#selectable with a callback function to query
whether the widget is selectable. This stops the table code from
selecting things that aren't really selectable - eg. empty tables,
scrollpanes containing unselectable widgets, etc.
Fixes a bug with the warp menu (thanks Proteh).

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2207
2010-12-10 20:31:46 +00:00
Simon Howard
e903ecbffb Use NULL for initialising pointers rather than 0.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 644
2006-09-21 11:49:13 +00:00
Russell Rice
6339c4cbeb Fix a lot of warnings (for fussy compilers) and one always-true check
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 641
2006-09-21 11:13:28 +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
6b9f3748cf Add inverted checkboxes (tick in box when value is false)
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 565
2006-06-29 18:07:32 +00:00
Simon Howard
ef92ce016e Make mouse button presses on widgets actually do useful things
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 553
2006-06-02 20:14:39 +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
59864df095 Fix compiler warnings caused by missing includes.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 517
2006-05-23 11:46:09 +00:00
Simon Howard
7c18ad6ccf CAST -> TXT_CAST_ARG, UNCAST -> TXT_UNCAST_ARG.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 509
2006-05-22 11:59:11 +00:00
Simon Howard
11643c0887 Add casting macros to allow for easy casts between types.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 503
2006-05-22 00:56:12 +00:00
Simon Howard
8d188ff3d1 More signals to detect when checkboxes/radiobuttons are changed.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 502
2006-05-22 00:26:34 +00:00
Simon Howard
283f71d0f5 Add a signals architecture to allow callbacks on GUI events.
Make all widget classes initialise widgets by calling TXT_InitWidget.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 501
2006-05-22 00:20:48 +00:00
Simon Howard
8741ed0339 Add table class. Allow widgets with heights of more than one line.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 492
2006-05-20 20:49:50 +00:00
Simon Howard
6ecffa76f7 Checkbox class
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 491
2006-05-20 17:37:57 +00:00