Skip to content

OnScreenDebug: Parent to a2dTopLeft as opposed to aspect2d #977

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

Closed
wants to merge 2 commits into from
Closed

OnScreenDebug: Parent to a2dTopLeft as opposed to aspect2d #977

wants to merge 2 commits into from

Conversation

drewc5131
Copy link
Contributor

The OSD hasn't been touched in well over a decade, so it could definitely be adjusted to better suit the current state of the engine.

Currently, the OSD is just parented to aspect2d with a position of -1.0, 0.9, whereas parenting it directly to a2dTopLeft would make much more sense and would look better on all screens.

The Y position is set to -0.1 as the original value was 0.9, so it was intended to be about 1 unit down from the top.
@drewc5131 drewc5131 changed the title [OnScreenDebug] - Parent to a2dTopLeft as opposed to aspect2d OnScreenDebug: Parent to a2dTopLeft as opposed to aspect2d Jul 28, 2020
@rdb
Copy link
Member

rdb commented Aug 10, 2020

What is OnScreenDebug and how do I enable it in order to test this change?

@drewc5131
Copy link
Contributor Author

on-screen-debug-enabled 1
its a bulitin so from anywhere you can call onScreenDebug.add("Key Here", "Value Here")

An example use case is in GravityWalker
https://github.com/panda3d/panda3d/blob/master/direct/src/controls/GravityWalker.py#L384
This is called every frame. Adding something that already exists will simply change the value and wont just add multiple. Its something that can be very useful for debugging and i'm surprised its not more known

Copy link
Member

@rdb rdb left a comment

Choose a reason for hiding this comment

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

OK, why not.

@rdb rdb added direct For problems in `direct` as opposed to the engine core enhancement and removed directgui labels Sep 1, 2020
@rdb rdb closed this in 16f489a Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
direct For problems in `direct` as opposed to the engine core enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy