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

Display filler flag for TBD Players #1827

Open
mbergen opened this issue Sep 6, 2022 · 3 comments
Open

Display filler flag for TBD Players #1827

mbergen opened this issue Sep 6, 2022 · 3 comments

Comments

@mbergen
Copy link
Collaborator

mbergen commented Sep 6, 2022

Can the display be modified to add a filler flag on the left of the TBD? So that if half the prize pool is filled out, the stuff is still aligned. Also, it just looks better to have it even when it's all empty imo.

Originally posted by @iMarbot in #1798 (comment)

@hjpalpha
Copy link
Collaborator

hjpalpha commented Sep 27, 2022

possible solution (lines 50-52 in /components/match2/commons/player_display.lua)

if props.showFlag ~= false then
    flagNode = String.isNotEmpty(player.flag) and PlayerDisplay.Flag(player.flag) or PlayerDisplay.Flag('filler')
end

it is important that the fillerflag also has the span with the flag class so that mobile display of flags inside bracket cells (for non team opponents) is consistent

the above code snipped should take care of that

things to keep in mind:
it will increase include size slightly
it will increase runtime slightly

@mbergen
Copy link
Collaborator Author

mbergen commented Sep 27, 2022

I wouldn't say the include size would increase, it should be the same as when all players have flags entered, right?

@hjpalpha
Copy link
Collaborator

I wouldn't say the include size would increase, it should be the same as when all players have flags entered, right?

in the case of players without flag it will increase slightly compared to now (on some old pages that might be the difference between reaching the limit or not, hence i mentioned it)

of course if all flags are set it will not change compared to now

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

No branches or pull requests

3 participants