xna-cncnet-client icon indicating copy to clipboard operation
xna-cncnet-client copied to clipboard

Add feature of random loading screen support

Open SadPencil opened this issue 4 years ago • 3 comments

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.

SadPencil avatar Dec 18 '20 14:12 SadPencil

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 avatar Jan 05 '21 10:01 SadPencil

@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).

Metadorius avatar Jan 05 '21 11:01 Metadorius

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.

Starkku avatar Feb 28 '21 17:02 Starkku