Closed IvGaLa closed 1 month ago
To resolve the inconsistency between the documentation and the parameter names in Config.js
, update the documentation to reflect the correct parameter names used in the code.
Update Documentation:
hideBanner
to banner
.hidePhaser
to banner.hidePhaser
.Code Reference:
Config.js
expects banner
and banner.hidePhaser
as parameter names:
this.hideBanner = (GetValue(config, 'banner', null) === false);
this.hidePhaser = GetValue(config, 'banner.hidePhaser', false);
Documentation Update:
banner
and banner.hidePhaser
./src/core/typedefs/BannerConfig.js /.github/ISSUE_TEMPLATE/bug_report.md /.github/ISSUE_TEMPLATE /changelog/3.23 /types/phaser.d.ts /changelog/3.7.1/CHANGELOG-v3.7.1.md /changelog/3.16.2/CHANGELOG-v3.16.2.md /config /changelog/3.1.1 /.github/CONTRIBUTING.md /.github /changelog/3.54 /changelog/3.15 /changelog/3.17/CHANGELOG-v3.17.md /src/gameobjects/shader/typedefs/ShaderConfig.js /changelog/3.23/CHANGELOG-v3.23.md /changelog/3.80/CHANGELOG-v3.80.md /changelog/3.16.2 /changelog/3.1.2/CHANGELOG-v3.1.2.md /changelog/3.18/CHANGELOG-v3.18.md /.github/ISSUE_TEMPLATE/feature_request.md /changelog/3.7.1 /config/webpack.config.js /config/webpack-nospector.config.js /src/core/Config.js
The config file is correct - it doesn't say it expects hideBanner
to exist in the config. It's just an internal property within that class.
If you look at the typedef for the object that you should give to the Game instance: https://newdocs.phaser.io/docs/3.80.0/Phaser.Types.Core.GameConfig then you can see the properties this object should contain. banner
links to https://newdocs.phaser.io/docs/3.80.0/Phaser.Types.Core.BannerConfig - or it can be a boolean (false) to disable the banner entirely.
Version
Description
Hello, according to the documentation to hide the information banner with the version it is necessary to use the "hideBanner" variable for the config (https://newdocs.phaser.io/docs/3.80.0/Phaser.Core.Config#hideBanner) but with that name it doesn't work.
As can be seen in the "Config.js" file (https://github.com/phaserjs/phaser/blob/v3.80.1/src/core/Config.js) "banner" is expected as the parameter name instead from "hideBanner".
Setting the variable in the config to "banner: false" does not display the banner with the Phaser name and version.
I leave an example in the following links: Not working: https://jsfiddle.net/IvGaLa/6gLbfzhj/8 It works: https://jsfiddle.net/IvGaLa/6gLbfzhj/9
Additionally, for the "hidePhaser" variable in the documentation it is also incorrect in the Config.js file, since it is expected as the name of the parameter "banner.hidePhaser".
Thanks greetings.
Example Test Code
Not working: https://jsfiddle.net/IvGaLa/6gLbfzhj/8
It works: https://jsfiddle.net/IvGaLa/6gLbfzhj/9
Additional Information
I consider that the Config.js file is incorrect in expecting those parameter names and different ones are indicated in the configuration.