summaryrefslogtreecommitdiff
path: root/textscreen
AgeCommit message (Collapse)Author
2015-06-07textscreen: Refactor TXT_OpenURL() to simplify.Simon Howard
In the Windows scenario we don't need to allocate any buffers; it's just a thin wrapper around ShellExecute().
2015-06-06textscreen: Pass url directly to ShellExecute, snprintf unneededMike Swanson
2015-06-05textscreen: use ShellExecute on Windows to open URLsMike Swanson
Trying to use the cmd.exe built-in has been causing nothing but troubles, this is the officially supported way to open them.
2015-06-04textscreen: Tweak to command line to open URL.Simon Howard
Alexandre-Xavier commented in #520 that the 'start' command line to open help URLs doesn't work. According to this page, 'start' is actually a cmd.exe built-in and can't be shelled out to directly: http://www.dwheeler.com/essays/open-files-urls.html This prepends cmd /c to the 'start' command; hopefully this should work. It might still be non-ideal if it causes a cmd.exe window to briefly pop up; in the long term we should probably switch to the ShellExecute() API function instead.
2015-04-10Strip out SDL_VERSION_ATLEAST #ifdef conditionals.Simon Howard
These were added ages ago as hacks to make the code compile with SDL2, back when SDL2 was still in development. They aren't relevant any more and aren't useful - the actual SDL2 port is proceeding on sdl2-branch.
2015-04-10Add missing #includes.Simon Howard
2015-04-04textscreen: Add help URL functionality for windows.Simon Howard
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-03-29textscreen: Remove screen size-based font selection.Simon Howard
This was removed on Windows a while back in favour of a more conservative approach that examined the system DPI settings, but the logic still remained for other systems and it really isn't a good idea. Remove the logic that chooses a large font on large monitors, and add a TODO comment to add proper Linux font selection in the future, based on the Gtk+ HiDPI setting.
2015-02-22Fix mistaken uses of memcpy() on overlapping memory.Simon Howard
The source and destination arguments to memcpy() cannot be overlapping as this is undefined behavior. In these situations memmove() must be used instead, and OpenBSD actually throws an error if this is done. Thanks to ryan-sg for reporting this. This fixes #510.
2014-12-26allow building in subdirectory or outside source directoryDave Murphy
2014-11-27textscreen: Exit immediately when all windows close.Simon Howard
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-10-19textscreen: Don't allow input of unprintable characters.Simon Howard
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-14textscreen: Fix use-after-free with mouse press.Simon Howard
When propagating mouse button presses to widgets within the window, return from MouseButtonPress() immediately, or we will fall through to additional code that references the window structure. If the handler for the widget we clicked on closes the window, this will have been freed. This fixed #439. Thanks to DuClare for telling me about this.
2014-08-16Warning fixes (23 remain...)James Haley
2014-05-05Clean up file headers.Simon Howard
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-04-29textscreen: Fix jump when clicking on scrollbars.Simon Howard
Clicking on a scrollbar should scroll the cursor to that location, but the logic for it was buggy because of loss of precision when doing an integer divide. When dividing by bar_max, seek up to the nearest value so that the cursor always arrives where we clicked. Thanks to Alexandre-Xavier for reporting this bug. This fixes #359.
2014-04-12textscreen: Init screen at native bit depth.Simon Howard
Always call SDL_SetVideoMode with bpp=0 to use the desktop's native bit depth, and instead draw into an intermediate 8-bit screenbuffer surface. This ensures that we do not encounter any palette mess-ups as on some systems true 8-bit screen modes are poorly supported.
2014-04-01misc: Fix safe vsnprintf() function.Simon Howard
An off-by-one error in the function caused the strings to be truncated one character too early. Change the return value check so that negative values are also interpreted as indicating truncation; this is the behavior of the Win32 API.
2014-04-01textscreen: Use safe string functions.Simon Howard
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-03-28textscreen: Add label for PrintScreen key.Simon Howard
Needed to properly fix bug #369.
2014-03-27Define a keyboard scan code for PrintScreen.Simon Howard
There is no real scan code for the PrintScreen key under DOS, but it is convenient to be able to bind it as a screenshot key. Define a "fake" scancode (126) to represent PrintScreen so that it can be represented as a key binding in configuration files. Also add some comments/notes to the scantokey[] lookup table. This fixes #369.
2013-11-03Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2742
2013-10-31Change gradient characters of 'large' textscreen font to be directSimon Howard
scale-ups of the standard res versions of the characters: in addition to giving a more 'authentic' retro look, this fixes a problem where the high-frequency dot patterns can cause weird moire effects on some monitors. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2735
2013-10-28Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2731
2013-10-28Use system DPI setting on Windows to determine whether to use the largeSimon Howard
font. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2730
2013-10-28Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2725
2013-10-28Determine which textscreen font to use by looking at the current desktopSimon Howard
screen resolution, not the largest fullscreen resolution offered by SDL. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2724
2013-10-20Oops.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2717
2013-10-20Disable file selector dialog on Windows.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2716
2013-09-08Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2639
2013-09-08Fix file select widget to emit "changed" signal properly. Reset variableSimon Howard
value to empty string rather than NULL if cancel is pressed in dialog (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2638
2013-08-31Add textscreen functions to raise and lower windows.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2628
2013-08-11Remove Windows CE support.Simon Howard
What support exists is for obsolete devices I no longer possess; I've never been contacted about the port and it's been several years since I even bothered to build a new version. All the extra overrides are clutter that can just be removed. Subversion-branch: /branches/v2-branch Subversion-revision: 2615
2013-05-27Remove use of WINAPI macro to fix compile under MSVC.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2602
2013-04-01Correct incorrect doc comment.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2579
2013-04-01Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2577
2013-03-31Fix Doxygen comments.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2576
2013-03-31Add back call to TXT_Delay to fix OS X freeze.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2575
2013-03-31Allow backspace or delete to clear the contents of an input box.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2574
2013-03-31Don't hog the CPU while waiting for the file selector.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2573
2013-03-31Fix file selector issues with Windows build.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2571
2013-03-31Add file selector widget to textscreen library.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2570
2012-12-24Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2553
2012-12-23Fix up weird looking '9' character in large font.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2549
2012-12-14Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2546
2012-11-18Add high-resolution font for textscreen.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2543
2012-10-28Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2537
2012-03-04Remove some calls to TXT_FGColor by using the new TXT_SaveColors systemSimon Howard
instead. Remove the unused "embedded color code" system from TXT_Puts. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2508
2012-03-01Rework the way that window background colors are set, and change theSimon Howard
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-02-03Fix crash when typing lots of Unicode characters into a number inputSimon Howard
box. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2494