Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature of random loading screen support #211

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

SadPencil
Copy link
Member

@SadPencil SadPencil commented Dec 18, 2020

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 SadPencil force-pushed the feature-random-loading-screen branch from 35c018b to aac69b5 Compare December 18, 2020 14:59
Copy link
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of rolling random every time in cycle better just determine a maximum number and roll random one time when breaking.

DXMainClient/DXGUI/Generic/LoadingScreen.cs Show resolved Hide resolved
DXMainClient/DXGUI/Generic/LoadingScreen.cs Outdated Show resolved Hide resolved
@SadPencil SadPencil force-pushed the feature-random-loading-screen branch from 14d1d14 to 28a495f Compare January 4, 2021 14:59
@SadPencil SadPencil requested a review from Metadorius January 4, 2021 15:01
Copy link
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are good but there are a bit more issues to fix.

DXMainClient/DXGUI/Generic/LoadingScreen.cs Outdated Show resolved Hide resolved
DXMainClient/DXGUI/Generic/LoadingScreen.cs Outdated Show resolved Hide resolved
@SadPencil SadPencil requested a review from Metadorius January 5, 2021 10:39
@SadPencil
Copy link
Member Author

Code updated. @Metadorius
By the way, the coding style mentioned here can be defined at .editconfig file. #214

Copy link
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nitpick, I'll test meanwhile and merge.

DXMainClient/DXGUI/Generic/LoadingScreen.cs Show resolved Hide resolved
@Metadorius
Copy link
Member

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

@Starkku
Copy link
Contributor

Starkku commented Feb 28, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants