mirror of https://github.com/godotengine/godot
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:
parent
074d33fb6f
commit
82b8dca0cd
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue