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

issue 209_replace panel image to text #218

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

issue 209_replace panel image to text #218

wants to merge 3 commits into from

Conversation

yuanboz
Copy link
Collaborator

@yuanboz yuanboz commented Jun 25, 2020

Replace the tut1.png to the text laid on the panel background.

Couple of points:

  1. The coordinates of each letter or image are based on their center position. If we set an image's coordinate to be (400,300), this means the coordinate of the center of this image is (400,300).

  2. If we set the font of a text to be 20px, this will make this text occupy 20 values ​​on the y-axis. Which means we have a text on (400,300) with the font to be 20px, then if we add another text between (400,310) and (400, 290). These two texts will be overlapped.

@yuanboz yuanboz added the spike label Jun 25, 2020
@yuanboz yuanboz requested a review from fenwickjb June 25, 2020 04:34
@yuanboz yuanboz self-assigned this Jun 25, 2020
Copy link
Collaborator

@fenwickjb fenwickjb left a comment

Choose a reason for hiding this comment

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

Awesome! Good to know these things.
Can you update it to do a couple lines the way you are: each line is it's own text object...

But then try out a "multi-line" text object for remaining lines like shown here:
https://phaser.io/examples/v2/text/text-line-spacing

Again, not going to merge this branch since it's a spike... Not closing this PR yet either since want to see if can get the multi-line to work...

@yuanboz
Copy link
Collaborator Author

yuanboz commented Jun 30, 2020

I apply the mult-line text but it's weird that the space between two lines not change as the value change. The text still looks good but we can't modify the space between two lines. Working on this problem.

@JerichoSM
Copy link
Collaborator

JerichoSM commented Jun 30, 2020 via email

@yuanboz
Copy link
Collaborator Author

yuanboz commented Jun 30, 2020

Good work, sorry I've not been working on it much this week, I've got a ton going on in life right now but I've got a pretty clear week next week if we want to meet on Tuesday as a group?

On Tue, Jun 30, 2020, 3:28 PM Zack Zhou @.***> wrote: I apply the mult-line text but it's weird that the space between two lines not change as the value change. The text still looks good but we can't modify the space between two lines. Working on this problem. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#218 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJULE6SPCEABJOMRMRVE5TRZI4HBANCNFSM4OH2HVDQ .

That works for me.

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

Successfully merging this pull request may close these issues.

3 participants