Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_CleanSweepAreaSelectionButtonComponent.c
Go to the documentation of this file.
1
class
SCR_CleanSweepAreaSelectionButtonComponent
:
ScriptedWidgetComponent
2
{
3
//------------------------------------------------------------------------------------------------
5
override
bool
OnClick
(
Widget
w,
int
x,
int
y,
int
button)
6
{
7
Widget
parent = w.GetParent();
8
if
(!parent)
9
return
false
;
10
11
CheckBoxWidget
swapSidesBox =
CheckBoxWidget
.Cast(parent.FindAnyWidget(
"SwapSidesBox"
));
12
XComboBoxWidget
selectionBox =
XComboBoxWidget
.Cast(parent.FindAnyWidget(
"SelectionBox"
));
13
if
(!selectionBox)
14
return
false
;
15
16
// Find local player controller
17
GenericEntity
playerController =
GetGame
().GetPlayerController();
18
if
(!playerController)
19
return
false
;
20
21
SCR_CleanSweepNetworkComponent
networkComponent =
SCR_CleanSweepNetworkComponent
.Cast(playerController.
FindComponent
(
SCR_CleanSweepNetworkComponent
));
22
if
(!networkComponent)
23
{
24
Print
(
"No clean sweep network component found. SCR_CleanSweepAreaSelectionButtonComponent.OnClick()"
);
25
return
false
;
26
}
27
28
networkComponent.ChooseArea(selectionBox.GetCurrentItem(), swapSidesBox.IsChecked());
29
30
return
false
;
31
}
32
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
SCR_CleanSweepNetworkComponent
void SCR_CleanSweepNetworkComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_CleanSweepNetworkComponent.c:97
OnClick
void OnClick()
On click callback.
Definition
SCR_MapToolMenuUI.c:143
CheckBoxWidget
Definition
CheckBoxWidget.c:13
GenericEntity
Definition
GenericEntity.c:16
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_CleanSweepAreaSelectionButtonComponent
Definition
SCR_CleanSweepAreaSelectionButtonComponent.c:2
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
Widget
Definition
Widget.c:13
XComboBoxWidget
Definition
XComboBoxWidget.c:13
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
scripts
Game
Components
CleanSweep
SCR_CleanSweepAreaSelectionButtonComponent.c
Generated by
1.17.0