Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
2024-01-16 21:57:05 +00:00
Peter Nelson
71aaed860b
Codechange: Missing some conversions to WidgetID. ( #11773 )
2024-01-14 16:47:10 +00:00
Peter Nelson
7124b4eef1
Codechange: Use std::unique_ptr for all NWidgets.
2023-12-31 15:33:56 +00:00
Peter Nelson
a0dfb76e34
Codechange: Replace mishmash of types for widget index with WidgetID.
...
Indices were stored as int, but often passed around as uint/uint8_t and casts.
Now they should all use WidgetID.
2023-12-30 00:23:57 +00:00
Peter Nelson
b86182ab84
Codechange: Use std::map to provide indexed widget access.
...
This removes the need to determine the biggest widget index and replaces C-style memory handling.
2023-12-29 18:45:43 +00:00
Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
2023-11-02 22:25:01 +00:00
frosch
b5885295f0
Codechange: Use parameters, which should be used.
2023-09-19 22:49:59 +02:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
2023-09-04 10:20:45 +01:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
glx22
46b504a700
Fix: ini_key issues reported by the script
2023-07-14 14:32:46 +02:00
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
d9f8a4c380
Codechange: use std::string GetString variant
2023-05-31 19:31:09 +02:00
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
2023-05-18 12:18:30 +01:00
Rubidium
6d1586dd49
Codechange: use std::string instead of char* for original editor strings
2023-05-10 23:15:09 +02:00
Peter Nelson
0880616851
Codechange: Remove various STRING strings.
2023-05-05 07:07:54 +01:00
Rubidium
f5f6306af3
Codechange: use string/fmt instead of printf for ShowInfo(F)
2023-04-24 17:51:54 +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
rubidium42
95386dc2b8
Codechange: move misc settings to std::string
2021-05-13 23:13:17 +02:00
Peter Nelson
09206be054
Fix: Use unscaled values for padding OSK
2021-04-30 17:08:15 +01:00
Peter Nelson
4791ff2862
Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.
2021-04-30 17:08:15 +01:00
Peter Nelson
2efa390a7d
Codechange: Simplify calling of DrawCharCentered()
2021-04-30 17:08:15 +01:00
Peter Nelson
b43cc21214
Fix: OSK layout not scaled for 2x or 4x GUI scale.
2021-03-20 17:55:17 +00: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
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
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
2018-10-31 12:35:54 +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
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
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
579ee7a592
(svn r25089) -Codechange: Move CharSetFilter from QueryString to Textbuf.
2013-03-17 13:04:10 +00:00
frosch
5dfd5e58ee
(svn r24774) -Fix: Invert the focus handling of the OSK. Keep the focus at the OSK and close it on losing focus. This makes the editbox in the OSK behave correctly.
2012-11-28 21:14:28 +00:00
frosch
bfba90f864
(svn r24773) -Fix: Shift in the OSK behaved like capslock.
2012-11-28 21:03:34 +00:00
frosch
155a9d784c
(svn r24772) -Codechange: Call Window::OnEditboxChanged only when the content changes, not when only moving the cursor.
2012-11-28 20:54:56 +00:00
frosch
aed11012d4
(svn r24746) -Cleanup: Remove weird lowering of editboxes.
2012-11-14 22:50:49 +00:00
frosch
f5d8ba5d7f
(svn r24742) -Codechange: Remove QueryStringBaseWindow and store QueryStrings per widget instead.
2012-11-14 22:50:35 +00:00
frosch
6653ac6b36
(svn r24739) -Codechange: Simplify some code by using Textbuf::Assign.
2012-11-14 22:50:21 +00:00
frosch
2c22fe98dd
(svn r24734) -Codechange: Move QueryStringBaseWindow::OnOSKInput to Window::OnEditboxChanged.
2012-11-13 21:47:07 +00:00
frosch
fd55399167
(svn r24731) -Codechange: Remove OnOpenOSKWindow and instead specify OK and CANCEL buttons via QueryString members.
2012-11-13 21:46:54 +00:00
frosch
67f92f16ed
(svn r24730) -Codechange: Allow OSK to simulate widget buttons with index 0.
2012-11-13 21:46:50 +00:00
frosch
03736af2ae
(svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default.
2012-11-11 16:10:43 +00:00
frosch
d58eee1e79
(svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions.
2012-06-04 15:30:29 +00:00
rubidium
bdb6280e79
(svn r23550) -Codechange: unify naming of the on screen keyboard widgets
2011-12-16 18:27:39 +00:00
truebrain
2aa774e831
(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h
2011-12-15 22:22:55 +00:00