MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / idSimpleWindow

Method idSimpleWindow

neo/ui/SimpleWindow.cpp:37–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#include "ui/SimpleWindow.h"
36
37idSimpleWindow::idSimpleWindow(idWindow *win) {
38 gui = win->GetGui();
39 dc = win->dc;
40 drawRect = win->drawRect;
41 clientRect = win->clientRect;
42 textRect = win->textRect;
43 origin = win->origin;
44 fontNum = win->fontNum;
45 name = win->name;
46 matScalex = win->matScalex;
47 matScaley = win->matScaley;
48 borderSize = win->borderSize;
49 textAlign = win->textAlign;
50 textAlignx = win->textAlignx;
51 textAligny = win->textAligny;
52 background = win->background;
53 flags = win->flags;
54 textShadow = win->textShadow;
55
56 visible = win->visible;
57 text = win->text;
58 rect = win->rect;
59 backColor = win->backColor;
60 matColor = win->matColor;
61 foreColor = win->foreColor;
62 borderColor = win->borderColor;
63 textScale = win->textScale;
64 rotate = win->rotate;
65 shear = win->shear;
66 backGroundName = win->backGroundName;
67 if (backGroundName.Length()) {
68 background = declManager->FindMaterial(backGroundName);
69 background->SetSort( SS_GUI );
70 background->SetImageClassifications( 1 ); // just for resource tracking
71 }
72 backGroundName.SetMaterialPtr(&background);
73
74//
75// added parent
76 mParent = win->GetParent();
77//
78
79 hideCursor = win->hideCursor;
80
81 //#modified-fva; BEGIN
82 cstAnchor = win->cstAnchor;
83 cstAnchorTo = win->cstAnchorTo;
84 cstAnchorFactor = win->cstAnchorFactor;
85 cstNoClipBackground = win->cstNoClipBackground;
86 //#modified-fva; END
87
88 idWindow *parent = win->GetParent();
89 if (parent) {
90 if (text.NeedsUpdate()) {
91 parent->AddUpdateVar(&text);
92 }
93 if (visible.NeedsUpdate()) {
94 parent->AddUpdateVar(&visible);

Callers

nothing calls this directly

Calls 9

GetGuiMethod · 0.80
SetSortMethod · 0.80
SetMaterialPtrMethod · 0.80
NeedsUpdateMethod · 0.80
AddUpdateVarMethod · 0.80
LengthMethod · 0.45
FindMaterialMethod · 0.45
GetParentMethod · 0.45

Tested by

no test coverage detected