Commit Graph

96 Commits

Author SHA1 Message Date
PeterN ebc451b071
Fix #10987: Double-close of dropdown stopped land-info tool working as default. (#11000)
Clicking and releasing on the query toolbar icon is meant to select the land-info tool.

This did not work as during closing a window, OnFocusLost() is called, which then closes the window again. These two calls toggled the land-info tool one and off in the same action.

Resolve by not calling Window::Close in OnFocusLost() if the window is already closing.
2023-06-12 08:42:02 +01:00
Rubidium 3f35787458 Codechange: replace stredup + StrMakeValidInPlace with std::string + StrMakeValid 2023-06-08 19:32:15 +02:00
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 2023-05-17 10:14:41 +01:00
Patric Stout 60399e17bd Codechange: C++-ify the Layouter and related functions
They all now access a std::string_view, instead of a "const char *"
or std::string (in some cases).

Additionally, GetCharAtPosition and friends now return an index
instead of a "const char *", as it makes for a more clear interface.
2023-05-08 19:21:42 +02:00
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
Patric Stout 1ba4dcc924 Codechange: migrate all Window-related timers to the new framework
This means we also say goodbye to GUITimers.
2023-04-15 13:58:55 +02:00
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2022-11-12 18:28:39 +00:00
Jonathan G Rennison 20f7ff8ac0 Codechange: Fix unnecessary string reallocation in IConsoleLine constructor 2022-09-21 12:32:07 +02:00
Niels Martin Hansen e6aab701c9 Fix #9977: Use a deque rather than linked list for console buffer 2022-08-27 16:03:41 +02:00
rubidium42 fc63432a11 Codechange: improve style/writing of IConsolePrint strings 2021-06-13 15:25:31 +02:00
rubidium42 eb6cdadc4d Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
2021-06-13 15:25:31 +02:00
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +02:00
glx22 1fb4ed8eef Fix: Use realtime for error message and console backlog timeouts 2021-01-10 14:07:17 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Jonathan G Rennison 81f159434d Codechange: Add EditBoxGainedFocus method to VideoDriver base class 2019-11-10 17:58:42 +00:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 2019-03-24 16:10:04 +01:00
rubidium b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 2014-04-28 21:06:51 +00:00
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
michi_cc 8ceef6ec61 (svn r26001) -Fix [FS#5795a] (r25686): [OSX] Clear any pending marked characters from an edit box losing focus. 2013-11-14 23:03:54 +00:00
michi_cc d15c1c5d4a (svn r25692) -Add: Replacement of a part of the edit box text with a new string. 2013-08-05 20:37:57 +00:00
michi_cc 30867c487f (svn r25691) -Add: [OSX] Support for mouse selection in the IME composition string. 2013-08-05 20:37:53 +00:00
michi_cc e2ec0ddb03 (svn r25690) -Change: [OSX] Position the candidate window at the caret position. 2013-08-05 20:37:48 +00:00
michi_cc f5e4131492 (svn r25689) -Add: [OSX] Display the IME composition string ourself. 2013-08-05 20:37:44 +00:00
michi_cc 0883cf76e3 (svn r25684) -Change: [Win32] Draw the composition string ourselves if possible. 2013-08-05 20:37:25 +00:00
michi_cc 64d2fc4d1e (svn r25683) -Add: Support for a marked/selected range to the textbuf. 2013-08-05 20:37:22 +00:00
michi_cc da09fd3077 (svn r25681) -Change: [Win32] Position the IME composition window at the caret position. 2013-08-05 20:37:14 +00:00
michi_cc 7422120014 (svn r25679) -Codechange: [Win32] Get the result string of an IME input directly without a trip through the window messaging system. 2013-08-05 20:37:06 +00:00
michi_cc 13873d2534 (svn r25678) -Codechange: Notify the video driver when an edit box lost (global) focus so it can abort any current input composition. 2013-08-05 20:37:02 +00:00
michi_cc b911f4a452 (svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers. 2013-08-05 20:36:24 +00:00
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 2013-05-26 19:25:01 +00:00
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 2013-05-26 19:23:42 +00:00
frosch c2c50b0c50 (svn r25092) -Codechange: Deduplicate keyboard handling between console and editboxes. 2013-03-17 13:05:45 +00:00
frosch 6653ac6b36 (svn r24739) -Codechange: Simplify some code by using Textbuf::Assign. 2012-11-14 22:50:21 +00:00
frosch f6d4200f86 (svn r24738) -Codechange: Remove Textbuf::Initialize in favour of a constructor. 2012-11-14 22:50:17 +00:00
frosch d58eee1e79 (svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions. 2012-06-04 15:30:29 +00:00
frosch 31eb896143 (svn r24323) -Codechange: Split Textbuf and associated functions to separate files. 2012-06-04 15:29:37 +00:00
truebrain e9f584ac21 (svn r23531) -Codechange: document and rename widgets to be consistent and understandable 2011-12-16 16:27:45 +00:00
truebrain 2aa774e831 (svn r23528) -Codechange: move widget enums to widgets/NNN_type.h 2011-12-15 22:22:55 +00:00
yexo 0143f00d6f (svn r23489) -Change: don't wrap around the console history and give an empty line if you click the down-key enough 2011-12-11 11:37:03 +00:00
frosch 5e449b8fae (svn r22429) -Add: some constants for specific palette colours used in the GUI. 2011-05-06 21:13:29 +00:00
frosch 22286bd7b6 (svn r22421) -Fix: Replace various references to Windows palette greyscale indices with the DOS palette indices. 2011-05-04 17:45:16 +00:00
frosch e9e6444138 (svn r21982) -Add: Wheel scrolling to console. 2011-02-05 17:54:36 +00:00
frosch 82f260e15f (svn r21981) -Codechange: Deduplicate the code and unify the bounds of console scrolling. 2011-02-05 17:53:29 +00:00
frosch 582d30c979 (svn r21980) -Codechange: Draw one line more at the top of the console, i.e. clip the top-most line if there is not enough room instead of not drawing it at all. 2011-02-05 17:44:44 +00:00
frosch c000f6b939 (svn r21979) -Fix: Scrolling of the console in pages used wrong line height and scrolled too much. 2011-02-05 17:41:05 +00:00