Commit Graph
53 Commits
Author SHA1 Message Date
Aaron van Geffen 681b8d7938 Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
TomasZilinek 9efe43fa59 Fix #11562 - gfx_draw_string_left_wrapped overload (#12015)
I created the overload, replaced remaining calls with the new function and removed the old function.
2020-06-21 06:25:31 -03:00
TomasZilinek 2264c5f7f1 Part of #11571 - Use gfx_draw_string_left with ScreenCoordsXY (#12008) 2020-06-20 11:56:36 -03:00
Gymnasiast f640446d58 Migrate 40 calls to set_format_arg() 2020-06-03 14:49:04 +02:00
Sohil Adwani d2565af867 Part of #11562: gfx_draw_string_left_wrapped() overload (#11784) 2020-05-19 21:57:11 -03:00
2cf95adc4b Fix #11565: gfx_draw_string_left_clipped to use ScreenCoordsXY (#11765)
* Issue #11565, created overload for gfx_draw_string_left_clipped

Co-authored-by: Tushar <tushar.97@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-17 19:30:58 -03:00
TomasZilinek 9fde6a74c3 Close #11561: Use ScreenCoordsXY in gfx_draw_string()
* Fix #11572 create gfx_draw_string() overload

created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)

...
2020-05-10 09:49:15 -03:00
Gymnasiast 6fd83fd006 Make WW and WH static 2020-05-09 18:07:16 +02:00
Breno Rodrigues Guimarães 2479256bc1 Adjust Formatter function names according to coding style (#11378) 2020-04-20 18:55:15 -03:00
Breno Rodrigues Guimarães d4a2a98e20 Replacing set_format_arg_on macro in favor of a more C++zy solution (#11350) 2020-04-20 07:10:33 +02:00
Tulio Leao 935cfe90fc Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Michael Steenbeek 18ebe73dfa Replace object_entry_get_type() with method (#10937) 2020-03-15 12:07:04 +01:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Ted John be9cb19df5 Replace cURL with WinHttp implementation on Windows
This reduces the number of third party dependencies for Windows builds. WinHttp is quite a nice straight forward API so doesn't involve too much extra code.
2020-02-08 17:47:03 +00:00
Tulio Leao fe3d6f6faf Use ScreenCoordsXY for scroll_mouse* functions 2019-11-14 08:40:40 -03:00
Tulio Leao d1cec43065 Use constexpr on openrct2-ui/* 2019-10-29 18:48:04 -03:00
Michał Janiszewski 8637eb6c57 Rename some bits to allow unity builds of libopenrct2 (#9944)
* Rename some bits to allow unity builds of libopenrct2

Some names are clashing when doing a unity build, renaming them solves
the problem.
2019-08-29 23:03:56 +02:00
Ted John 634b254447 Print the URL of the object that it is downloading 2019-08-13 22:38:21 +01:00
Ted John 8f917a2590 Show the object download source when downloading object files 2019-08-13 18:32:32 +01:00
Matt cc6321048f Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Ted John a5365b38b3 Fix #9502: Unhandled exception when object download fails (#9696) 2019-08-01 14:51:52 +02:00
Michał Janiszewski dff1ebaf21 Apply better guards for download queueing (#8864)
Follow-up to #8821.
Use mutex to synchronize access rather than make the bool atomic to
avoid TOCTOU issues.
2019-03-26 22:46:08 +00:00
Michał Janiszewski 9554918e30 Fix strncat size argument for GCC9 (#8855)
Previously, the (LTO) linker complained:
```
In function ‘copy_object_names_to_clipboard’,
    inlined from ‘window_object_load_error_mouseup’ at ../src/openrct2-ui/windows/ObjectLoadError.cpp:450:43:
../src/openrct2-ui/windows/ObjectLoadError.cpp:358:16: error: ‘strncat’ specified bound 1 equals source length [-Werror=stringop-overflow=]
  358 |         strncat(buffer, PLATFORM_NEWLINE, line_sep_len);
      |                ^
```
2019-03-13 09:04:28 +00:00
Ted John c479ada2ca Fix #8795: Downloading objects interacts with UI on background thread (#8821)
Queue downloads so that they are invoked on UI thread.
2019-03-03 22:08:13 +01:00
Ted John cf1a4c9d66 Fix #8754: Crash when downloading objects due to race condition
Use stack allocated buffer for string format arguments instead of the
global argument buffer as this is performed on a background thread.
2019-02-26 09:06:02 +01:00
Ted John 535b075310 Reduce button text further and add tooltips 2019-02-07 22:00:30 +00:00
Ted John b74a21bf54 Fix no network builds 2019-02-07 21:59:15 +00:00
Ted John 0d138c96cf Fix signed / unsigned comparison 2019-02-07 21:59:15 +00:00
Ted John 3aa55ff875 Refactor and improve download of objects 2019-02-07 21:59:15 +00:00
Ted John 5fb3c10c3a Make download objects async with progress 2019-02-07 21:59:15 +00:00
Ted John 27f70e3656 Get basic object downloading working 2019-02-07 21:58:34 +00:00
Michael Steenbeek 5cd4057c76 Remove remnants of STEX support 2018-08-29 23:29:45 +02:00
Gymnasiast 0ba233efa4 Fix formatting 2018-07-31 22:27:00 +02:00
Michael Steenbeek 2a64ec7aff Use sourceGame parameter in JSON files instead of originalId 2018-07-30 21:39:27 +02:00
clang-format e558660860 clang-format UI windows 2018-07-23 16:00:14 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Michał Janiszewski a2ef4bd699 Exclude pre-formatted blocks from clang-format (#7520)
[ci skip]
2018-05-16 20:41:29 +02:00
Aaron van Geffen 11207f9c41 Re-introduce zebra striping. 2018-04-16 22:11:53 +02:00
Aaron van Geffen 97d1c296a4 Increase row height for object load error window. 2018-04-16 22:11:53 +02:00
Gymnasiast b1ab852fb7 Add object_entry_get_type() 2018-02-09 13:47:15 +01:00
Ted John cebe13984f Remove most of remaining memory functions from libopenrct2ui 2018-01-21 11:17:41 +00:00
Ted John cbbb35bf79 Refactor memory handling in ObjectLoadError.cpp 2018-01-21 11:17:40 +00:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
Aaron van Geffen c9b48beea0 Replace WWT_CLOSEBOX with WWT_BUTTON where not used as a close button. 2018-01-08 00:02:25 +01:00
Aaron van Geffen 9a2d3b226c Rename WWT_13 to WWT_TABLE_HEADER.
This is used for left-aligned header buttons for data tables.
2018-01-07 23:54:51 +01:00
Ted John 83d1b6eb8f Refactor widget.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek 755add6c9a Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Hielke Morsink 884bc0c9a4 Trim object names when copying the missing objects list
Before adding a name to the clipboard buffer, it checks for spaces at
the end of the name, to prevent copying those.

It also moves some logic from the "mouseup" function, and moved memory
deallocation within the same function where it got allocated.
2017-12-05 09:22:07 +01:00