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

implement custom tag colours and textures #85

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

microlith57
Copy link
Member

closes #82

allows recolouring / texturing credits tags with the following syntax:

areaname_collabcreditstags=
  Unmodified
  {cu2_tag color="000000"}Custom Color
  {cu2_tag color="ff0000" borderColor="aaee00" fillColor="000055"}Custom Colors
  {cu2_tag color="000000" borderColor="000000" fillTexture="CollabUtils2/chapterCard/tag_golden"}Custom Texture

also adds cropped chapter card images for use as tag fill textures.

@microlith57 microlith57 marked this pull request as draft September 11, 2023 05:20
@microlith57 microlith57 marked this pull request as ready for review September 11, 2023 05:30
Comment on lines +766 to +768
for (int tex_x = 0; tex_x < width + 20; tex_x += tag.BorderTexture.Width)
tag.BorderTexture.Draw(new Vector2(x - 10 + tex_x, y - 6), Vector2.Zero, (tag.BorderColor ?? Color.White) * alphaTags, Vector2.One, 0f,
new Rectangle(0, 0, (int) width + 20, 44));
Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, the loop deals with repeating the texture if it is narrower than the tag, and the last parameter here makes the max width of the texture equal to the width of the tag... does that work if the tag is 1.5x the size of the texture?

@maddie480 maddie480 merged commit 8c3e1fa into EverestAPI:master Sep 28, 2023
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.

allow overriding colours (& textures?) for tags
2 participants