xna-cncnet-client
xna-cncnet-client copied to clipboard
Add feature of random loading screen support
This PR add a new feature, where the client starts, it choose one file as the loading screen randomly, of the following picture files:
-
loadingscreen.png
- ~~
loadingscreen0.png
~~ -
loadingscreen1.png
-
loadingscreen2.png
- ... and so on
~~The random code here obeys uniform distribution.~~
There is no breaking change in this PR.
Code updated. @Metadorius
By the way, the coding style mentioned here can be defined at .editconfig
file. https://github.com/CnCNet/xna-cncnet-client/issues/214
@SadPencil do you have a Discord? Since you are contributing actively lately would be good to use some form of messaging to stay in touch. If you do - hit me up (Kerbiter#3128).
The code's fine and the idea is solid, but I think ideally something like this should be implemented in Rampastring.XNAUI
, by allowing defining a list of textures for the control properties that define texture names (BackgroundTexture
et al) and it randomly picks one to use for the rest of the client session. As it stands this will only work for loading screen and only and only if you use the default texture name. If you set BackgroundTexture
for LoadingScreen
in INI, this feature will cease to function.