summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
AgeCommit message (Collapse)Author
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-05-21Codechange: Store base set related texts in std::strings.Michael Lutz
2020-05-21Codechange: Use std::string for storing GRF error messages.Michael Lutz
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-13Codechange: use std::sort() in GUIListglx
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Codechange: If something is a vector of strings, use a vector of strings ↵Michael Lutz
instead of an AutoFreeSmallVector.
2019-04-09Codechange: Switch DropDownList to directly use std::vector, thus making ↵Michael Lutz
AutoDeleteSmallVector obsolete. DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate copy-free code for most situations.
2019-03-28Fix: MSVC warnings (#7423)glx22
2019-03-26Codechange: Replaced SmallVector::Find() with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-24Codechange: Use override specifier in Window-derived classes.peter1138
2019-03-24Codechange: Use override specifer for overriding member declarationsHenry Wilson
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries. Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF. A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used. With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box. All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.
2019-03-10Remove: Unnecessary specialization of NewGRF preset list item.peter1138
2019-03-10Codechange: Use Colours type instead of byte.peter1138
2019-01-31Fix #7089: Close NewGRF textfile windows when their data is invalid (#7106)glx22
2019-01-28Add: allow opening of one TextfileWindow per typeglx
2019-01-26Add: more options for translatorsglx
2019-01-11Change: Use GUITimer class instead of bare int/uints.Peter Nelson
2019-01-11Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust ↵Peter Nelson
timers to work with milliseconds instead of ticks.
2018-10-31Doc: Lots and lots of doxymentation fixesCharles Pigott
2018-04-30Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation.J0an Josep
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2017-01-14(svn r27729) -Codechange: Do not count static NewGRF when checking for the ↵frosch
maximum number of NewGRFs in a game. -Codechange: Remove LAST_GRF_SLOT and MAX_NEWGRFS. Now NETWORK_MAX_GRF_COUNT is the only constant to specify the maximum number of non-static NewGRF. -Codechange: Increase the number of file slots, effectively increasing the maximum number of static NewGRF and baseset GRFs.
2017-01-07(svn r27724) -Cleanup: Remove pointless usage of IsOpenTTDBaseGRF. System ↵frosch
GRFs are never listed in the NewGRF GUI.
2015-08-10(svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing ↵michi_cc
conversions in initializer lists.
2014-10-04(svn r26954) -Codechange: GUI-scale for AI/GS settings and NewGRF settings ↵peter1138
windows.
2014-06-10(svn r26640) -Cleanup: Remove some pointless STR_JUST_STRING detours.frosch
2014-05-24(svn r26613) -Feature: Upgrade currently active newgrfs to newest installed ↵alberth
version.
2014-05-24(svn r26610) -Feature: Select an editable preset name for saving.alberth
2014-04-25(svn r26509) -Codechange: replace strdup with stredup (the latter ensures ↵rubidium
the return is not NULL)
2014-04-23(svn r26486) -Codechange: replace a number of snprintfs with seprintfrubidium
2014-04-23(svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy ↵frosch
and strecat.
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-11-24(svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for ↵rubidium
dropdowns
2013-11-24(svn r26084) -Fix: don't allow executing the palette toggling code when it's ↵rubidium
not editable
2013-11-22(svn r26053) -Fix: possible use-after-freerubidium
2013-09-22(svn r25794) -Change: No point to toggle a NewGRF's palette if its author ↵planetmaker
declared one.
2013-09-22(svn r25792) -Change: Clarify the relevance of the permissible palettesplanetmaker
2013-08-05(svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of ↵michi_cc
just UCS-2 to the window key press handlers.
2013-06-30(svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of ↵frosch
rows and columns from the resize step size.
2013-06-30(svn r25536) -Cleanup: No need to set scrollbar capacity anywhere but in ↵frosch
OnResize.
2013-06-30(svn r25533) -Codechange: Use SetCapacityFromWidget more often.frosch
2013-06-30(svn r25532) -Fix: Do not make the minimal size of matrix or panel widgets ↵frosch
depend on their number of rows, since that changes when resizing the window.
2013-06-30(svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX ↵frosch
widgets.
2013-06-15(svn r25413) -Fix-ish: Suppress focussing editboxes which are not visible.frosch