peng3d.util.gui - GUI Utility Functions and Classes

peng3d.util.gui.mouse_aabb(mpos, size, pos)[source]

AABB Collision checker that can be used for most axis-aligned collisions.

Intended for use in widgets to check if the mouse is within the bounds of a particular widget.

peng3d.util.gui.points2htmlfontsize(points)[source]

Approximate font size converter, converts from Points to HTML <font> tag font sizes.

Note that this method is very inaccurate, since there are only seven possible output values that represent at least 25 input values. When in doubt, this function always rounds down, e.g. every input value less than eight is converted to HTML size 1.

class peng3d.util.gui.ResourceGroup(data, parent=None)[source]

Pyglet Group that represents a Resource as returned by the ResourceManager().

This Group should automatically merge different groups with different resources that are on the same texture atlas.