Add a bug-report item in file dropdown menu

This commit is contained in:
Hielke Morsink 2021-09-05 13:56:52 +02:00
parent b2dfeaf1b9
commit 8ae918118a
No known key found for this signature in database
GPG Key ID: FE0B343DF883E7F2
4 changed files with 27 additions and 4 deletions

View File

@ -3654,6 +3654,7 @@ STR_6453 :Copy version info
STR_6454 :Cant rename banner…
STR_6455 :Cant rename sign…
STR_6456 :Giant Screenshot
STR_6457 :Report a bug on GitHub
#############
# Scenarios #

View File

@ -6,7 +6,8 @@
- Feature: [#15164] Highlight elements selected by the Tile Inspector, tracks are currently not supported.
- Feature: [#15165] [Plugin] Add the ability to create entities using "map.createEntity".
- Feature: [#15194] [Plugin] Add guest properties, ride downtime and park casualty penalty.
- Feature: [#15294] New vehicle animation type: flying animal
- Feature: [#15195] Added a bug-report item in file dropdown menu.
- Feature: [#15294] New vehicle animation type: flying animal.
- Fix: [#13465] Creating a scenario based on a won save game results in a scenario thats instantly won.
- Fix: [#14316] Closing the Track Designs Manager window causes broken state.
- Fix: [#14667] “Extreme Hawaiian Island” has unpurchaseable land tiles (original bug).

View File

@ -26,6 +26,7 @@
#include <openrct2/Input.h>
#include <openrct2/OpenRCT2.h>
#include <openrct2/ParkImporter.h>
#include <openrct2/Version.h>
#include <openrct2/actions/BannerPlaceAction.h>
#include <openrct2/actions/BannerSetColourAction.h>
#include <openrct2/actions/ClearAction.h>
@ -54,6 +55,7 @@
#include <openrct2/paint/VirtualFloor.h>
#include <openrct2/peep/Staff.h>
#include <openrct2/scenario/Scenario.h>
#include <openrct2/ui/UiContext.h>
#include <openrct2/util/Util.h>
#include <openrct2/windows/Intent.h>
#include <openrct2/world/Footpath.h>
@ -119,10 +121,12 @@ enum FILE_MENU_DDIDX {
DDIDX_SCREENSHOT = 7,
DDIDX_GIANT_SCREENSHOT = 8,
// separator
DDIDX_QUIT_TO_MENU = 10,
DDIDX_EXIT_OPENRCT2 = 11,
DDIDX_FILE_BUG_ON_GITHUB = 10,
// separator
DDIDX_UPDATE_AVAILABLE = 13,
DDIDX_QUIT_TO_MENU = 12,
DDIDX_EXIT_OPENRCT2 = 13,
// separator
DDIDX_UPDATE_AVAILABLE = 15,
};
enum TOP_TOOLBAR_VIEW_MENU_DDIDX {
@ -435,6 +439,8 @@ static void window_top_toolbar_mousedown(rct_window* w, rct_widgetindex widgetIn
gDropdownItemsFormat[numItems++] = STR_SCREENSHOT;
gDropdownItemsFormat[numItems++] = STR_GIANT_SCREENSHOT;
gDropdownItemsFormat[numItems++] = STR_EMPTY;
gDropdownItemsFormat[numItems++] = STR_FILE_BUG_ON_GITHUB;
gDropdownItemsFormat[numItems++] = STR_EMPTY;
gDropdownItemsFormat[numItems++] = STR_QUIT_TRACK_DESIGNS_MANAGER;
gDropdownItemsFormat[numItems++] = STR_EXIT_OPENRCT2;
@ -451,6 +457,8 @@ static void window_top_toolbar_mousedown(rct_window* w, rct_widgetindex widgetIn
gDropdownItemsFormat[numItems++] = STR_SCREENSHOT;
gDropdownItemsFormat[numItems++] = STR_GIANT_SCREENSHOT;
gDropdownItemsFormat[numItems++] = STR_EMPTY;
gDropdownItemsFormat[numItems++] = STR_FILE_BUG_ON_GITHUB;
gDropdownItemsFormat[numItems++] = STR_EMPTY;
gDropdownItemsFormat[numItems++] = STR_QUIT_SCENARIO_EDITOR;
gDropdownItemsFormat[numItems++] = STR_EXIT_OPENRCT2;
}
@ -466,6 +474,8 @@ static void window_top_toolbar_mousedown(rct_window* w, rct_widgetindex widgetIn
gDropdownItemsFormat[numItems++] = STR_SCREENSHOT;
gDropdownItemsFormat[numItems++] = STR_GIANT_SCREENSHOT;
gDropdownItemsFormat[numItems++] = STR_EMPTY;
gDropdownItemsFormat[numItems++] = STR_FILE_BUG_ON_GITHUB;
gDropdownItemsFormat[numItems++] = STR_EMPTY;
gDropdownItemsFormat[numItems++] = STR_QUIT_TO_MENU;
gDropdownItemsFormat[numItems++] = STR_EXIT_OPENRCT2;
if (OpenRCT2::GetContext()->HasNewVersionInfo())
@ -577,6 +587,15 @@ static void window_top_toolbar_dropdown(rct_window* w, rct_widgetindex widgetInd
case DDIDX_GIANT_SCREENSHOT:
screenshot_giant();
break;
case DDIDX_FILE_BUG_ON_GITHUB:
{
std::string url = "https://github.com/OpenRCT2/OpenRCT2/issues/"
"new?assignees=&labels=bug&template=bug_report.yaml";
auto versionStr = String::URLEncode(gVersionInfoFull);
url.append("&openrct2_build=" + versionStr);
OpenRCT2::GetContext()->GetUiContext()->OpenURL(url);
}
break;
case DDIDX_QUIT_TO_MENU:
{
window_close_by_class(WC_MANAGE_TRACK_DESIGN);

View File

@ -3909,6 +3909,8 @@ enum
STR_SHORTCUT_GIANT_SCREENSHOT = 6456,
STR_FILE_BUG_ON_GITHUB = 6457,
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
};