Commit Graph
70 Commits
Author SHA1 Message Date
Duncan bb2c7dbaca Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions

* Apply clang-tidy to ui project function names

* Undo scripting clang-format

* Upper case OpenRCT2 and RCT2
2021-11-23 13:18:07 +00:00
Hielke Morsink 9dd9b27db4 Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Duncan d2aca03ff6 Fix #15271. Use formatter to pass description args to text input (#15272)
* Fix #15271. Use formatter to pass description args to text input

Originally passed the variables via global vars which were not updated to 32bit during recent refactors. This removes the global and makes the interface cleaner and corrects the type

* Fix size of arguments
2021-08-24 19:12:05 +01:00
Michael Steenbeek f5935931e3 Port remaining DrawTextWrapped calls with void args to Formatter 2021-08-21 09:42:05 +02:00
ζeh Matt 8fc7e06116 Move gLastStringPos into rct_drawpixelinfo (#14811) 2021-06-03 22:10:09 -03:00
ζeh Matt ebcdfd06e9 Fix #14707: Crash when window is closed during text input 2021-05-24 00:11:04 +02:00
duncanspumpkin 820668d0aa Use unsafe strlen for platforms without strlen_s 2021-03-20 07:27:23 +00:00
duncanspumpkin ee575d5b8c Use std::vector to prevent violations of std string 2021-03-20 07:22:00 +00:00
duncanspumpkin 07b2945c5b Fix #14353. Provide a buffer for text input 2021-03-19 18:25:14 +00:00
Duncanspumpkin 0957542503 Implement C++ solution to truncate UTF8 strings 2021-03-18 22:14:12 +01:00
Gymnasiast 645685de18 Fix #14315: Crash when renaming APVC in Korean 2021-03-15 21:27:13 +01:00
Gymnasiast 7fd049c22e Remove last remnants of gCurrentFontSpriteBase 2021-02-28 00:26:53 +01:00
Gymnasiast c40701d997 Make gfx_draw_string() take a TextPaint argument 2021-02-28 00:26:20 +01:00
Gymnasiast 503273793a Remove gCurrentFontSpriteBase from some functions 2021-02-28 00:26:20 +01:00
Gymnasiast 826f6c7442 Reduce usage of gCurrentFontSpriteBase 2021-02-28 00:25:30 +01:00
Gymnasiast 3e536e2711 Change gfx_draw_string_*_wrapped() to DrawTextWrapped() 2021-02-28 00:23:01 +01:00
Gymnasiast 2477933c51 Turn font sprite base into a strong enum 2021-02-28 00:23:00 +01:00
Michał Janiszewski 9aef29361f Default-initialise more fields (#14130)
Doesn't really fix any particular issue, but adds more defaults to
fields in classes where other defaults are already present
2021-02-20 19:40:32 +01:00
Ted John e5b412fb5f Fix #14017: Text input window errors 2021-02-08 17:45:08 +00:00
Ted John 17f4f3aaf8 Refactor text input window to class 2021-02-07 22:36:31 +01:00
ζeh Matt 9ff2138f3f Remove unused variable gCurrentFontFlags 2021-01-30 16:46:22 +01:00
skdltmxn c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Ted John 503a383301 Do not format characters in text input 2020-11-27 18:54:57 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
ffrogman 7ed1804e61 Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum (#13453)
* Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00
pizza2004 2015acd4c0 Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
aw20368 119bacdd44 Fix #13083: Dialog cropped for conflicting track design rename (#13124)
Change description drawing from gfx_draw_string_centred to gfx_draw_string_centred_wrapped.
2020-10-07 23:17:52 -03:00
Aaron van Geffen d27e14f45b Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
frutiemaxandTulio Leao af591c834b Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1) (#12938)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1)

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-16 00:02:22 -03:00
Tulio Leao 731a93dc39 Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
Aaron van Geffen 16ad1d18fb Refactor another set of widget definitions (#12503)
* Refactor TopToolbar

* Refactor TrackDesignManage

* Refactor TrackDesignPlace

* Refactor TrackList

* Refactor ViewClipping

* Refactor Viewport

* Refactor TitleEditor

* Refactor TitleCommandEditor

* Refactor Themes

* Refactor TextInput
2020-07-30 22:58:49 +02:00
frutiemax c474f2ddc0 Close #12096: Use only ScreenRect on gfx_fill_rect (#12280) 2020-07-15 22:34:57 -03:00
TomasZilinek 277080de74 Fix #11570 - create gfx_draw_string_centered() overload (#11760)
* Fix #11570 - create gfx_draw_string_centered() overload

I created the overload, updated all calls from the old function to the new and deleted the old one
2020-05-17 15:29:56 -03:00
Michael Steenbeek 620fb5e5c4 Migrate many set_format_arg calls to Formatter (#11744) 2020-05-13 21:29:39 -03:00
Michael Steenbeek 1b242d825c Fix Text Input window colours (#11736)
Text Input uses one colour, specifically the body colour of the calling window. This was previously handles by a modified window shim, but https://github.com/OpenRCT2/OpenRCT2/pull/11653 changed this and this window now uses the standard window shim. This is why it now needs to change the colour assignment.
2020-05-13 00:31:24 +02: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
Gymnasiast f8aeb70398 Apply review requests 2020-05-09 18:07:16 +02:00
Gymnasiast 9e4c664944 Replace defines with constexpr 2020-05-09 18:07:16 +02:00
Gymnasiast 96fe3d3b3c Make WINDOW_SKELETON take a title, height and width 2020-05-09 18:07:16 +02:00
tassaron2 559ede5d14 Add compile option to move close box to the left 2020-05-09 18:07:16 +02:00
Ted John 6db16ffcad Implement showTextInput plugin API (#11678) 2020-05-09 14:18:50 +01:00
Tulio Leao 935cfe90fc Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Aaron van Geffen f3765646c5 Increase height for button heights in text input window.
Also fixes the formatting for the widgets array.
2020-03-16 23:46:17 +01:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao d1cec43065 Use constexpr on openrct2-ui/* 2019-10-29 18:48:04 -03:00
Matt cc6321048f Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Aaron van Geffen 3be6137fde Rename event_07 to periodic_update. (#8684) 2019-02-07 17:46:52 +01:00
ζeh Matt 7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00