summaryrefslogtreecommitdiff
path: root/src/company_gui.cpp
AgeCommit message (Collapse)Author
2021-04-28Cleanup: Replace FOR_ALL_SORTED_ROADTYPES macro with range iterator.Peter Nelson
2021-04-28Cleanup: Replace FOR_ALL_SORTED_RAILTYPES macro with range iterator.Peter Nelson
2021-04-22Codechange: Use alignment feature in company finances window.Peter Nelson
2021-04-22Codechange: Replace face window custom drawing with new widget features.Peter Nelson
2021-04-21Cleanup: Remove unnecessary parameter of GetScrolledRowFromWidget()Peter Nelson
Line height defaults to the resize height of the relevant widget, which is set in all cases. Therefore it is not necessary to specify this value every time. Additionally fixes scrolled padding for the framerate window.
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2021-01-05Change: move "give money" from client-list to company windowPatric Stout
This is a much better location for this button, as you send money from one company to another company, not from player to player. This is based on work done by JGRPP in: https://github.com/JGRennison/OpenTTD-patches/commit/f82054339124cc6b89c5f4f9dac2d9da62f0108b and surrounding commits, which took the work from estys: https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311 We did modify it to fix several bugs and clean up the code while here anyway. The callback was removed, as it meant a modified client could prevent anyone from seeing money was transfered. The message is now generated in the command itself, making that impossible.
2021-01-05Fix: make the "password" button the same size as the other buttons in ↵Patric Stout
Company window Currently password-lock icon + button was the same size, but this looks really weird. Now they are in sync, even with other fonts and languages.
2021-01-05Codechange: fix alignment of Company GUIPatric Stout
Code acted as if WWT_TEXT starts a scope; it does not.
2021-01-05Fix: change all Company planes on paint, not only the first that needs changingPatric Stout
Otherwise it can take a few OnPaint() calls before all planes are set correctly when switching companies.
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-07-27Codechange: Spell 'Viewport' consistentlyTechGeekNZ
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'. This patch makes everything consistent.
2020-07-02 Fix #8250: [NRT] Company infrastructure window always omits last road/tramtypestormcone
2020-06-18Fix: Violation of strict weak ordering in group name sortersJonathan G Rennison
This could be caused by a group being renamed, and the old name being cached from a previous sort. See: #7838
2019-12-21Codechange: Replace FOR_ALL_GROUPS with range-based for loopsglx
2019-12-21Codechange: Replace FOR_ALL_ENGINES with range-based for loopsglx
2019-12-21Codechange: Replace FOR_ALL_COMPANIES with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-05-01Feature: Add NotRoadTypes (NRT)peter1138
2019-04-24Fix: Automatic line breaking of the warningNiels Martin Hansen
2019-04-13Codechange: use std::sort() in GUIListglx
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
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: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry 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 specifier for DropDownListItem classes.peter1138
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 virtual destructors on drop down list items.peter1138
2019-03-10Codechange: Use Colours type instead of byte.peter1138
2019-03-03Fix 23960d0f2c: Company livery window shows incorrect groups when opened ↵peter1138
from group window in multiplayer.
2019-02-26Fix #7281: Unable to select last group in open livery window on group creation.peter1138
2019-02-02Fix: Make livery window resize properly if GUI scale changes whilst open.Peter Nelson
2019-02-01Fix 23960d0f2c: Scrollbar was broken for non-group liveries.Peter Nelson
Simplify how list position is determined by using existing functions. Also rename livery_height -> rows and SetLiveryHeight() -> SetRows(), as height implies pixels.
2019-01-31Feature: Group liveries, and livery window usability enhancements. (#7108)PeterN
* Change: Replace checkbox in livery selection window with Default option in drop down selection. This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired. * Feature: Add vehicle group liveries.
2019-01-27Change: For consistency, add company name to colour scheme window.Peter Nelson
2019-01-27Fix: Ignore company colour selection when showing different company's colour ↵Peter Nelson
scheme.
2019-01-11Codechange: Fix typo in variable name: pices -> pieces (#7033)nikolas
2018-10-31Doc: Lots and lots of doxymentation fixesCharles Pigott
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2017-07-11(svn r27889) -Change: Do not cancel headquarter construction and ↵frosch
engine-preview-query when shift-clicking (adf88)
2015-10-30(svn r27427) -Fix: Use the NewGRF railtype sorting order in the ↵frosch
infrastructure window.
2015-02-01(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ↵frosch
ScaleGUITrad().
2014-09-28(svn r26935) -Codechange: Fit company colour selection drop down list to UI ↵peter1138
scale.
2014-09-20(svn r26856) -Codechange: Ensure company face widgets can fit company face.peter1138