ya2 · news · projects · code · about

functional tests: editor
[pmachines.git] / ya2 / utils / gui.py
CommitLineData
7ac52030 1from panda3d.core import load_prc_file_data, Texture
bf77b5d5
FC
2from ya2.utils.gfx import Point
3
4class GuiTools:
5
6 @staticmethod
7 def no_window():
8 load_prc_file_data('', 'window-type none')
9
10 @staticmethod
11 def get_mouse():
12 return Point(base.mouseWatcherNode.get_mouse())
7ac52030
FC
13
14 def load_font(path):
15 font = base.loader.load_font(path)
16 font.clear()
17 font.set_pixels_per_unit(60)
18 font.set_minfilter(Texture.FTLinearMipmapLinear)
19 font.set_outline((0, 0, 0, 1), .8, .2)
20 return font