Samples/HUD/HUDElements.py
14 from pyfbsdk
import FBHUD, FBScene, FBApplication, FBSystem, FBHUDFlashElement, FBHUDTextElement, FBHUDTextureElement, FBHUDRectElement, FBTexture, FBHUDElementHAlignment
18 lHud =
FBHUD(
"MyHUD 1")
19 lHud.Visibility =
True
21 FBSystem().Scene.Cameras[0].ConnectSrc(lHud)
24 lHud.ConnectSrc(lRect);
29 lRect.ScaleUniformly =
False
34 lHud.ConnectSrc(lText);
44 lTextureFile = os.path.join(
FBSystem().ConfigPath,
'Scripts/Samples/HUD/hud_texture.tif')
45 lTextureFile = os.path.normpath(lTextureFile)
48 lText.Texture.append(lTexture1)
52 lFlashFile = os.path.join(
FBSystem().ConfigPath,
'Scripts/Samples/HUD/hud_flash_v10.swf')
53 lFlashFile = os.path.normpath(lFlashFile)
56 lHud.ConnectSrc(lFlash);
58 lFlash.FilePath = lFlashFile;
62 lFlash.Align = FBHUDElementHAlignment.kFBHUDRight;
64 lRecordLight = lHud.CreateElement(FBHUD.eRecordLight,
"The record light")