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

feat: add food icon beside the Hunger Bar #30

Merged
merged 6 commits into from
Oct 21, 2021
Merged

feat: add food icon beside the Hunger Bar #30

merged 6 commits into from
Oct 21, 2021

Conversation

mohamedation
Copy link
Contributor

add food icon indicator on the left of the hunger bar
Screenshot from 2021-10-13 15-05-15

Copy link
Member

@jdrueckert jdrueckert left a comment

Choose a reason for hiding this comment

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

I feel like it helps associating the contents of this file with what you can see in-game if the elements are in the same "order", aka if the icon comes first and then the bar.

Further, I think we should make the horizontal placement of the bar relative to the icon. Thus, they'll always have the same offset even if you decide to move it further right or left by adjusting the icon's horizontal placement. I would recommend the following for the bar:

"position-left": {
    "target": "LEFT",
    "widget": "hungerIcon",
    "offset": 47
},

assets/ui/Hunger.ui Outdated Show resolved Hide resolved
assets/ui/Hunger.ui Outdated Show resolved Hide resolved
mohamedation and others added 4 commits October 16, 2021 13:02
Co-authored-by: jdrueckert <jd.rueckert@googlemail.com>
Co-authored-by: jdrueckert <jd.rueckert@googlemail.com>
@mohamedation
Copy link
Contributor Author

As always, thank you for your assistance

Copy link
Member

@jdrueckert jdrueckert left a comment

Choose a reason for hiding this comment

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

Did you test this in-game?
I don't expect it to work because for positioning the hungerIcon widget you're referencing the hungerIcon widget. You'll need to position the icon like you currently position the bar and positioning the bar referencing the icon.

@mohamedation
Copy link
Contributor Author

@jdrueckert sorry for that. looks like i wasn't focusing right. i had tested the horizontal relative position in game (completely blanked that it would be a good idea to do the same for the vertical position as well) but when i began to edit the files for the commit, i reversed the solution.

I have (hopefully now) corrected this, added also relative vertical position, and aligned everything again to the dot.
hunger-thirst-alignment

@jdrueckert jdrueckert merged commit a69ac46 into Terasology:develop Oct 21, 2021
@jdrueckert
Copy link
Member

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.

2 participants