MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / UIMiniMapZoom

Function UIMiniMapZoom

ogsr_engine/xrGame/ui/UIStatic_script.cpp:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "UIMap.h"
5
6void UIMiniMapZoom(CUIMiniMap* wnd, float scale)
7{
8 Fvector2 wnd_size;
9 float zoom_factor = float(wnd->GetParent()->GetWndRect().width()) / 100.0f;
10 wnd_size.x = wnd->BoundRect().width() * zoom_factor * scale /*m_fScale*/;
11 wnd_size.y = wnd->BoundRect().height() * zoom_factor * scale /*m_fScale*/;
12 wnd->SetWndSize(wnd_size);
13}
14
15void UIMiniMapInit(CUIMiniMap* wnd)
16{

Callers 1

UIMiniMapInitFunction · 0.85

Calls 4

GetWndRectMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45
SetWndSizeMethod · 0.45

Tested by

no test coverage detected