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

HUD Widgets: Changing origin from top/left to other sides of the screen #193

Closed
BenjaminHarding opened this issue Mar 11, 2015 · 1 comment
Milestone

Comments

@BenjaminHarding
Copy link
Contributor

It would be useful to be able to change the horizontal and vertical origins that widgets are positioned. The default should be the top/left, but if the user wants it at the bottom/right, bottom/left, or whatever then that should be settable.

Would provide easy to use when making lots of HUD elements.

@BenjaminHarding BenjaminHarding added this to the v1.3.0 milestone Mar 11, 2015
BenjaminHarding added a commit that referenced this issue Mar 11, 2015
@BenjaminHarding
Copy link
Contributor Author

HUD Widgets can now change the origin they are positioned at by setting verticalOrigin and horizontalOrigin properties.

//Makes the widget render from the right instead of left
this.widget.horizontalOrigin = Kiwi.HUD.HUDWidget.RIGHT; //Or you can just say 'right'

//Makes the widget render from the bottom instead of top
this.widget.verticalOrigin= Kiwi.HUD.HUDWidget.BOTTOM; //Or you can just say 'bottom'

The default is still the top/left corner

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

1 participant