diff --git a/cm_changelog.txt b/cm_changelog.txt index 4ea7ba27a0..d488afab43 100644 --- a/cm_changelog.txt +++ b/cm_changelog.txt @@ -74,14 +74,17 @@ This is usable for any OpenTTD servers == CHANGELOG == -*** next +*** 1.10.2 ( 2020) *** - Add new minimap mode showing industries, height and farms at the same time. - Rename "CB town border" zone to "CB cargo acceptance", switch it to a new colored highlight and fix for new CB mode. - Rename "New CB borders" zone to "CB town limit" and switch it to a new colored highlight. Remove old "CB borders" zone. - In CB modes added CB town limit to outer town zones highlight (red border). - Show engine id in build window in newgrf developer mode. +- Fixed automatic funding and advertisement wasting money. - Fixed crash on selecting tram station build tool. - Fixed zoning hotkeys. +- Fixed tooltip width on empty stations. +- Fixed checkboxes in toolbar menu items. *** 1.10.1 (15 Apr 2020) *** - Add a setting to autoopen vehicle window when cloning vehicles while sharing orders. diff --git a/src/commands_gui.cpp b/src/commands_gui.cpp index baed1216e1..45ccccdda7 100644 --- a/src/commands_gui.cpp +++ b/src/commands_gui.cpp @@ -2,12 +2,12 @@ #include "stdafx.h" #include -#include "widgets/dropdown_type.h" //fillrect #include "core/geometry_func.hpp" //maxdim #include "settings_type.h" #include "settings_func.h" //saveconfig #include "3rdparty/md5/md5.h" //pass crypt #include "network/network_func.h" //network chat +#include "strings_func.h" #include "textbuf_gui.h" //show query #include "network/network.h" //networking #include "network/core/tcp_http.h" //http connector @@ -15,6 +15,9 @@ #include "fileio_func.h" //personal dir #include "error.h" //error message #include "debug.h" +#include "window_func.h" +#include "window_gui.h" + #include "citymania/base64.h" diff --git a/src/rev.cpp b/src/rev.cpp index ef7aafb70c..9326bc509f 100644 --- a/src/rev.cpp +++ b/src/rev.cpp @@ -83,4 +83,4 @@ const byte _openttd_revision_tagged = 1; const uint32 _openttd_newgrf_version = 1 << 28 | 10 << 24 | 0 << 20 | 1 << 19 | 28004; -const char _citymania_version[] = "20200519-master-m7b15d2a938 19.05.20"; +const char _citymania_version[] = "20200519-master-m9fc36d5db0 19.05.20"; diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index f32414ac51..6215ceebe3 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -89,7 +89,6 @@ enum CallBackFunction { static CallBackFunction _last_started_action = CBF_NONE; ///< Last started user action. -#if 0 // CM /** * Drop down list entry for showing a checked/unchecked toggle item. */ @@ -117,7 +116,6 @@ public: DrawString(left + WD_FRAMERECT_LEFT + (rtl ? 0 : this->checkmark_width), right - WD_FRAMERECT_RIGHT - (rtl ? this->checkmark_width : 0), top, this->String(), sel ? TC_WHITE : TC_BLACK); } }; -#endif /** * Drop down list entry for showing a company entry, with companies 'blob'. diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h index 13d984fedd..c7d3251d68 100644 --- a/src/widgets/dropdown_type.h +++ b/src/widgets/dropdown_type.h @@ -14,11 +14,6 @@ #include "../gfx_func.h" #include "../core/smallvec_type.hpp" #include "table/strings.h" -#include "../stdafx.h" -#include "../window_gui.h" -#include "../string_func.h" -#include "../strings_func.h" -#include "../window_func.h" /** * Base list item class from which others are derived. If placed in a list it @@ -55,39 +50,6 @@ public: static bool NatSortFunc(std::unique_ptr const &first, std::unique_ptr const &second); }; -/** - * Drop down list entry for showing a checked/unchecked toggle item. Use - * DropDownListCheckedItem or DropDownListCharStringCheckedItem depending of - * type of string used (either StringID or const char*). - */ - -template -class DropDownListCheckedItemT : public T { - uint checkmark_width; -public: - bool checked; - DropDownListCheckedItemT(S string, int result, bool masked, bool checked) : T(string, result, masked), checked(checked) - { - this->checkmark_width = GetStringBoundingBox(STR_JUST_CHECKMARK).width + 3; - } - virtual ~DropDownListCheckedItemT() {} - virtual uint Width() const - { - return T::Width() + this->checkmark_width; - } - - virtual void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const - { - bool rtl = _current_text_dir == TD_RTL; - if (this->checked) { - DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, STR_JUST_CHECKMARK, sel ? TC_WHITE : TC_BLACK); - } - DrawString(left + WD_FRAMERECT_LEFT + (rtl ? 0 : this->checkmark_width), right - WD_FRAMERECT_RIGHT - (rtl ? this->checkmark_width : 0), top, this->String(), sel ? TC_WHITE : TC_BLACK); - } -}; - -#define DropDownListCheckedItem DropDownListCheckedItemT -#define DropDownListCharStringCheckedItem DropDownListCheckedItemT /** * String list item with parameters. */