DayZ 1.24
Loading...
Searching...
No Matches
SizeToChild.c File Reference

Go to the source code of this file.

Classes

class  ScriptedWidgetEventHandler
 map: item x vector(index, width, height) More...
 

Functions

void OnWidgetScriptInit (Widget w)
 
void Refresh ()
 

Variables

class SizeToChild extends ScriptedWidgetEventHandler m_ResizeHorizontal
 
reference bool m_ResizeVertical
 
Widget m_Root
 
Widget m_Parent
 

Function Documentation

◆ OnWidgetScriptInit()

void OnWidgetScriptInit ( Widget w)
protected

Definition at line 88 of file SizeToChild.c.

89 {
90 m_Root = w;
91
93 m_Root.ClearFlags(WidgetFlags.HEXACTSIZE);
95 m_Root.ClearFlags(WidgetFlags.VEXACTSIZE);
96
97 m_Parent = m_Root.GetParent();
98
99 Refresh();
100 }
Widget m_Root
Definition SizeToChild.c:85
Widget m_Parent
Definition SizeToChild.c:86
class SizeToChild extends ScriptedWidgetEventHandler m_ResizeHorizontal
void Refresh()
reference bool m_ResizeVertical
Definition SizeToChild.c:83
WidgetFlags
Definition EnWidgets.c:58

References m_Parent, m_ResizeHorizontal, m_ResizeVertical, m_Root, and Refresh().

◆ Refresh()

void Refresh ( )
protected

Definition at line 102 of file SizeToChild.c.

103 {
104 float x, y, o_x, o_y, new_x, new_y;
105 m_Parent.Update();
106 m_Parent.GetScreenSize(x, y);
107 m_Root.GetScreenSize(new_x, new_y);
108 m_Root.GetSize(o_x, o_y);
109
110 bool changed = false;
111
112 if (m_ResizeHorizontal && x != new_x)
113 {
114 new_x = x;
115 changed = true;
116 }
117 else
118 new_x = o_x;
119
120 if (m_ResizeVertical && y != new_y)
121 {
122 new_y = y;
123 changed = true;
124 }
125 else
126 new_y = o_y;
127
128 if (changed)
129 m_Root.SetSize(new_x, new_y);
130 }
Icon x
Icon y

References m_Parent, m_ResizeHorizontal, m_ResizeVertical, m_Root, x, and y.

Referenced by ClosableContainer::DropReceived(), ClosableContainer::DropReceived(), UIScriptedMenu::Init(), UIScriptedMenu::OnShow(), OnWidgetScriptInit(), ItemBase::Pack(), ItemBase::Pitch(), ClosableContainer::SetEntity(), and Update().

Variable Documentation

◆ m_Parent

Widget m_Parent
protected

Definition at line 86 of file SizeToChild.c.

Referenced by AddToConstructedParts(), AreaDamageComponent(), HandsContainer::AttachmentAdded(), ClosableContainer::AttachmentAddedEx(), AttachmentCategoriesSlotsContainer::AttachmentCategoriesSlotsContainer(), HandsContainer::AttachmentRemoved(), ClosableContainer::AttachmentRemoved(), EntityLightSource::AttachOnObject(), ScriptedWidgetEventHandler::BannerHandlerBase(), EntityLightSource::CheckIfParentIsInCargo(), ClosableHeader::ClosableHeader(), Container::Close(), ClosableContainer::Close(), ScriptedWidgetEventHandler::Close(), HandsContainer::CollapseButtonOnMouseButtonDown(), CargoContainerRow::Column0(), CargoContainerRow::Column1(), CargoContainerRow::Column2(), CargoContainerRow::Column3(), CargoContainerRow::Column4(), CargoContainerRow::Column5(), CargoContainerRow::Column6(), CargoContainerRow::Column7(), CargoContainerRow::Column8(), CargoContainerRow::Column9(), CargoContainerRow::ColumnOnDraggingOver0(), CargoContainerRow::ColumnOnDraggingOver1(), CargoContainerRow::ColumnOnDraggingOver2(), CargoContainerRow::ColumnOnDraggingOver3(), CargoContainerRow::ColumnOnDraggingOver4(), CargoContainerRow::ColumnOnDraggingOver5(), CargoContainerRow::ColumnOnDraggingOver6(), CargoContainerRow::ColumnOnDraggingOver7(), CargoContainerRow::ColumnOnDraggingOver8(), CargoContainerRow::ColumnOnDraggingOver9(), ClosableContainer::ContainerWithCargo(), HandsPreview::CreateNewIcon(), HandsPreview::DeleteIcon(), EntityLightSource::Destroy(), HandsContainer::DestroyAtt(), HandsContainer::DestroyCargo(), EntityLightSource::DetachFromParent(), OptionSelectorBase::Disable(), ScriptedWidgetEventHandler::Disable(), CargoContainerRow::DraggingOver(), Icon::DraggingOver(), Header::DraggingOverHeader(), ScriptedWidgetEventHandler::DropdownPrefab(), CargoContainerRow::DropReceived(), Icon::DropReceivedFromBackground(), Icon::DropReceivedFromMain(), OptionSelectorBase::Enable(), ScriptedWidgetEventHandler::Enable(), EvaluateDamageInternal(), ScriptedWidgetEventHandler::Focus(), EntityLightSource::GetAttachmentParent(), AreaDamageComponentRaycasted::GetFallbackHitZone(), GetParent(), ScriptedWidgetEventHandler::GetParent(), GetParentCenter(), GetParentMinSize(), AreaDamageComponentRaycasted::GetRaycastedHitZone(), ScriptedWidgetEventHandler::GetRoot(), EntityLightSource::HandleDancingShadows(), Header::Header(), InitBaseState(), InitVisuals(), OptionSelectorBase::IsFocusable(), ScriptedWidgetEventHandler::IsFocusable(), IsProxy(), ScriptedWidgetEventHandler::LayoutHolder(), VicinitySlotsContainer::MouseClick(), VicinityContainer::OnChildAdd(), VicinityContainer::OnChildRemove(), OptionSelectorBase::OnClick(), Icon::OnDraggingOverBackground(), ClosableHeader::OnDragHeader(), ClosableHeader::OnDropHeader(), Header::OnDropReceivedFromHeader(), OptionSelectorBase::OnFocus(), OptionSelectorBase::OnFocusLost(), SlotsIcon::OnIconDrag(), ScriptedWidgetEventHandler::OnMouseButtonDown(), HandsContainer::OnPerformCombination(), ItemOptics::OnWasAttached(), ItemOptics::OnWasDetached(), OnWidgetScriptInit(), Container::Open(), ClosableContainer::Open(), OptionSelectorBase::OptionSelector(), OptionSelectorBase::OptionSelectorEditbox(), OptionSelectorSliderSetup::OptionSelectorLevelMarker(), OptionSelectorSliderSetup::OptionSelectorSlider(), ItemOptics::ParentUsesWinchesterTypeMount(), PlayerPreview::PlayerPreview(), PostDamageActions(), PreDamageActions(), VicinitySlotsContainer::RecomputeNumberOfContainers(), Refresh(), Refresh(), HandsContainer::RefreshHands(), ScriptedWidgetEventHandler::RemoveElement(), RemoveFromConstructedParts(), AttachmentCategoriesContainer::SetEntity(), ClosableContainer::SetEntity(), ClosableContainer::SetEntity(), ZombieContainer::SetEntity(), SetParent(), HandsArea::SetParentWidget(), LeftArea::SetParentWidget(), RightArea::SetParentWidget(), Icon::SetParentWidget(), ScriptedWidgetEventHandler::SetParentWidget(), Icon::SetPosEx(), Icon::SetSize(), HandsContainer::ShowAtt(), VicinitySlotsContainer::ShowItemsInContainers(), Icon::ToRefresh(), PPEMatClassParameterCommandData::Update(), Update(), VicinityContainer::UpdateInterval(), EntityLightSource::UpdateMode(), UpdatePhysics(), LayoutHolder::UpdateSelectionIcons(), UpdateVisuals(), and VicinitySlotsContainer::VicinitySlotsContainer().

◆ m_ResizeHorizontal

◆ m_ResizeVertical

reference bool m_ResizeVertical

◆ m_Root

Widget m_Root
protected

Definition at line 85 of file SizeToChild.c.

Referenced by ScriptedWidgetEventHandler::AddElement(), ScriptedWidgetEventHandler::AddTab(), ScriptedWidgetEventHandler::BannerHandlerBase(), ScriptedWidgetEventHandler::CheckRefresherFlagVisibility(), ScriptedWidgetEventHandler::Close(), ServerBrowserTabConsolePages::Construct(), Construct(), ServerBrowserTab::Construct(), ScriptedWidgetEventHandler::CreateRootWidget(), CreditsElement::CreditsDepartmentElement(), CreditsDepartmentSection(), ScriptedWidgetEventHandler::CTEvent(), ScriptedWidgetEventHandler::CTKeyframe(), ScriptedWidgetEventHandler::Darken(), ScriptedWidgetEventHandler::Deselect(), ServerBrowserTab::DisableFilters(), ScriptedWidgetEventHandler::DropdownPrefab(), ScriptedWidgetEventHandler::EnableTabControl(), ScriptedWidgetEventHandler::FillInfo(), ScriptedWidgetEventHandler::Focus(), GameplayEffectWidgets_base::GameplayEffectWidgets(), ScriptedWidgetEventHandler::GenerateQuickBarBackgroundTiles(), GameplayEffectWidgets_base::HandleWidgetRoot(), ScriptedWidgetEventHandler::HideNewsfeed(), ScriptedWidgetEventHandler::HideStats(), ScriptedWidgetEventHandler::HideTooltip(), Init(), ScriptedWidgetEventHandler::Init(), ScriptedWidgetEventHandler::InitSelectors(), ScriptedWidgetEventHandler::IsFocusable(), ScriptedWidgetEventHandler::IsInfoPanelVisible(), ScriptedWidgetEventHandler::IsOpen(), ScriptedWidgetEventHandler::KeybindingElement(), ScriptedWidgetEventHandler::KeybindingElementNew(), array::KeybindingsContainer(), ScriptedWidgetEventHandler::KeybindingsGroup(), ScriptedWidgetEventHandler::Lighten(), ScriptedWidgetEventHandler::LoadData(), LoadDataAsync(), ScriptedWidgetEventHandler::LoadEntries(), ScriptedWidgetEventHandler::MainMenuDlcHandlerBase(), ScriptedWidgetEventHandler::MainMenuNewsfeed(), ScriptedWidgetEventHandler::MainMenuStats(), ScriptedWidgetEventHandler::ModsMenuDetailed(), ScriptedWidgetEventHandler::ModsMenuDetailedEntry(), ScriptedWidgetEventHandler::ModsMenuSimple(), ScriptedWidgetEventHandler::ModsMenuTooltip(), ScriptedWidgetEventHandler::OnChildAdd(), ScriptedWidgetEventHandler::OnChildRemove(), ScriptedWidgetEventHandler::OnClick(), ScriptedWidgetEventHandler::OnDoubleClick(), ScriptedWidgetEventHandler::OnDrag(), ScriptedWidgetEventHandler::OnDraggingOver(), ScriptedWidgetEventHandler::OnDrop(), ScriptedWidgetEventHandler::OnDropReceived(), ScriptedWidgetEventHandler::OnFocus(), ScriptedWidgetEventHandler::OnFocusLost(), ScriptedWidgetEventHandler::OnMouseButtonDown(), ScriptedWidgetEventHandler::OnMouseButtonUp(), ScriptedWidgetEventHandler::OnMouseEnter(), OptionSelectorBase::OnMouseEnter(), ScriptedWidgetEventHandler::OnMouseLeave(), OptionSelectorBase::OnMouseLeave(), ScriptedWidgetEventHandler::OnUpdate(), ScriptedWidgetEventHandler::OnWidgetScriptInit(), OnWidgetScriptInit(), ScriptedWidgetEventHandler::Open(), OptionSelectorBase::OptionSelector(), OptionSelectorBase::OptionSelectorEditbox(), OptionSelectorSliderSetup::OptionSelectorLevelMarker(), OptionSelectorSliderSetup::OptionSelectorSlider(), ScriptedWidgetEventHandler::OptionsMenuControls(), ScriptedWidgetEventHandler::OptionsMenuGame(), ScriptedWidgetEventHandler::OptionsMenuSounds(), ScriptedWidgetEventHandler::OptionsMenuVideo(), ScriptedWidgetEventHandler::PlayerListEntryScriptedWidget(), ScriptedWidgetEventHandler::PlayerListScriptedWidget(), ScriptedWidgetEventHandler::Preview(), Refresh(), ScriptedWidgetEventHandler::RefreshContent(), GameplayEffectWidgets_base::RegisterLayouts(), ScriptedWidgetEventHandler::RemoveElement(), ScriptedWidgetEventHandler::ResizeParentToChild(), ScriptedWidgetEventHandler::Select(), ScriptedWidgetEventHandler::Select(), ScriptedWidgetEventHandler::ServerBrowserEntry(), ScriptedWidgetEventHandler::SetActionWidget(), ScriptedWidgetEventHandler::SetControllerIcon(), ServerBrowserTab::SetEnableFilters(), ServerBrowserTab::SetEnableServers(), ScriptedWidgetEventHandler::SetExpand(), ScriptedWidgetEventHandler::SetFavorite(), ScriptedWidgetEventHandler::SetInteractActionIcon(), ScriptedWidgetEventHandler::SetItemDesc(), ScriptedWidgetEventHandler::SetItemHealth(), ScriptedWidgetEventHandler::SetItemQuantity(), ScriptedWidgetEventHandler::SetMultipleContinuousInteractAction(), ScriptedWidgetEventHandler::SetMultipleContinuousItemAction(), ScriptedWidgetEventHandler::SetMultipleInteractAction(), ScriptedWidgetEventHandler::SetMultipleItemAction(), ScriptedWidgetEventHandler::SetPlatformSpecifics(), ScriptedWidgetEventHandler::SetRadioFrequency(), ServerBrowserTab::SetSort(), ScriptedWidgetEventHandler::SetWeaponModeAndZeroing(), ScriptedWidgetEventHandler::SetWeaponQuantity(), ScriptedWidgetEventHandler::Show(), ServerBrowserTab::ShowHideConsoleWidgets(), ScriptedWidgetEventHandler::ShowInfoPanel(), ScriptedWidgetEventHandler::ShowStats(), ScriptedWidgetEventHandler::ShowTooltip(), ScriptedWidgetEventHandler::ShowXboxHidePCIcons(), GameplayEffectWidgets_base::StopAllEffects(), Tick(), ScriptedWidgetEventHandler::ToggleFavorite(), ScriptedWidgetEventHandler::TutorialKeybinds(), ScriptedWidgetEventHandler::Unselect(), ScriptedWidgetEventHandler::Update(), ScriptedWidgetEventHandler::UpdateColors(), ScriptedWidgetEventHandler::UpdateControlsElements(), ScriptedWidgetEventHandler::UpdateEntry(), ServerBrowserTab::UpdatePageButtons(), GameplayEffectWidgets_base::UpdateVisibility(), ScriptedWidgetEventHandler::VideoPlayer(), OptionSelectorBase::~OptionSelector(), ScriptedWidgetEventHandler::~OptionSelectorBase(), OptionSelectorBase::~OptionSelectorEditbox(), OptionSelectorBase::~OptionSelectorSliderSetup(), and ~ServerBrowserTab().