MCPcopy Create free account
hub / github.com/crossuo/crossuo / UpdateHeight

Method UpdateHeight

src/Gumps/GumpBaseScroll.cpp:112–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void CGumpBaseScroll::UpdateHeight()
113{
114 Height = StartResizeHeight + g_MouseManager.LeftDroppedOffset().Y;
115 if (Height < m_MinHeight)
116 {
117 Height = m_MinHeight;
118 }
119
120 int maxHeight;
121 GetDisplaySize(nullptr, &maxHeight);
122 maxHeight -= 50;
123 if (Height >= maxHeight)
124 {
125 Height = maxHeight;
126 }
127
128 int offsetY = 0;
129 auto spr = g_Game.ExecuteGump(0x082D);
130 if (spr != nullptr && m_Minimizer->Visible)
131 {
132 offsetY = spr->Height - 3;
133 }
134
135 m_Background->UpdateHeight(Height);
136 int heightDecBonus = ScissorOffsetHeight;
137 if (HaveBackgroundLines)
138 {
139 heightDecBonus += 16;
140 }
141
142 m_HTMLGump->UpdateHeight(
143 m_Background->WorkSpace.Size.Height - ScrollerOffsetY - heightDecBonus);
144 m_Resizer->SetY(offsetY + Height - 3);
145}
146
147void CGumpBaseScroll::GUMP_RESIZE_START_EVENT_C
148{

Callers

nothing calls this directly

Calls 4

GetDisplaySizeFunction · 0.85
LeftDroppedOffsetMethod · 0.80
ExecuteGumpMethod · 0.80
SetYMethod · 0.80

Tested by

no test coverage detected