1
0
Fork 0

Fix "Go Online" button shows up on dev builds

Previously, the "Go Online" button shows up on dev builds, in which when
clicked, will notify the user that official export templates aren't
available for dev builds. As per Calinou's suggestion, this commit
fix the issue by not showing the button on dev builds (that was built
without setting up GODOT_VERSION_STATUS environment variable).

This commit also remove unused lines on the header file as per
AThousandShips's review.
This commit is contained in:
Etherealxx 2025-02-26 11:11:31 +07:00
parent 074d33fb6f
commit 82b8dca0cd
2 changed files with 4 additions and 4 deletions

View File

@ -57,9 +57,6 @@ enum DownloadsAvailability {
static DownloadsAvailability _get_downloads_availability() { static DownloadsAvailability _get_downloads_availability() {
const int network_mode = EDITOR_GET("network/connection/network_mode"); const int network_mode = EDITOR_GET("network/connection/network_mode");
if (network_mode == EditorSettings::NETWORK_OFFLINE) {
return DOWNLOADS_NOT_AVAILABLE_IN_OFFLINE_MODE;
}
// Downloadable export templates are only available for stable and official alpha/beta/RC builds // Downloadable export templates are only available for stable and official alpha/beta/RC builds
// (which always have a number following their status, e.g. "alpha1"). // (which always have a number following their status, e.g. "alpha1").
@ -72,6 +69,10 @@ static DownloadsAvailability _get_downloads_availability() {
return DOWNLOADS_NOT_AVAILABLE_FOR_DEV_BUILDS; return DOWNLOADS_NOT_AVAILABLE_FOR_DEV_BUILDS;
} }
if (network_mode == EditorSettings::NETWORK_OFFLINE) {
return DOWNLOADS_NOT_AVAILABLE_IN_OFFLINE_MODE;
}
return DOWNLOADS_AVAILABLE; return DOWNLOADS_AVAILABLE;
} }

View File

@ -37,7 +37,6 @@ class EditorExportPreset;
class ExportTemplateVersion; class ExportTemplateVersion;
class FileDialog; class FileDialog;
class HTTPRequest; class HTTPRequest;
class LinkButton;
class MenuButton; class MenuButton;
class OptionButton; class OptionButton;
class ProgressBar; class ProgressBar;