MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / LoadingScreen

Method LoadingScreen

src/ui/LoadingScreen.cpp:24–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22const Math::float2 BAR_SIZE_G2 = {0.7f, 0.6f};
23
24UI::LoadingScreen::LoadingScreen(Engine::BaseEngine& e)
25 : ImageView(e)
26{
27 Textures::TextureAllocator& alloc = m_Engine.getEngineTextureAlloc();
28 m_RelativeSize = false;
29
30 m_pProgressBar = new BarView(e);
31 addChild(m_pProgressBar);
32
33 m_pInfo = new TextView(e);
34 addChild(m_pInfo);
35
36 Handle::TextureHandle hBarBack = alloc.loadTextureVDF("PROGRESS.TGA");
37 Handle::TextureHandle hBarFront = alloc.loadTextureVDF("PROGRESS_BAR.TGA");
38
39 m_pProgressBar->setBackgroundImage(hBarBack);
40 m_pProgressBar->setBarImage(hBarFront);
41
42 m_pProgressBar->setAlignment(EAlign::A_Center);
43 m_pProgressBar->setTranslation(Math::float2(0.5, 0.75));
44 m_pProgressBar->setSize(Math::float2(0.8f, 0.6f));
45
46 m_pInfo->setAlignment(EAlign::A_Center);
47 m_pInfo->setTranslation(Math::float2(0.5, 0.78));
48 m_pInfo->setFont(DEFAULT_FONT);
49
50 reset();
51}
52
53UI::LoadingScreen::~LoadingScreen()
54{

Callers

nothing calls this directly

Calls 7

setBackgroundImageMethod · 0.80
setBarImageMethod · 0.80
setAlignmentMethod · 0.80
setTranslationMethod · 0.80
setSizeMethod · 0.80
setFontMethod · 0.80
loadTextureVDFMethod · 0.45

Tested by

no test coverage detected