mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-14 20:28:21 +00:00
23 lines
615 B
C++
23 lines
615 B
C++
|
#include "StripUiPosition.h"
|
||
|
|
||
|
#include "AMFFormat.h"
|
||
|
|
||
|
StripUiPosition::StripUiPosition() {
|
||
|
xPosition = 0.0;
|
||
|
yPosition = 0.0;
|
||
|
}
|
||
|
|
||
|
StripUiPosition::StripUiPosition(AMFArrayValue* arguments, std::string uiKeyName) {
|
||
|
xPosition = 0.0;
|
||
|
yPosition = 0.0;
|
||
|
auto* uiArray = arguments->FindValue<AMFArrayValue>(uiKeyName);
|
||
|
if (!uiArray) return;
|
||
|
|
||
|
auto* xPositionValue = uiArray->FindValue<AMFDoubleValue>("x");
|
||
|
auto* yPositionValue = uiArray->FindValue<AMFDoubleValue>("y");
|
||
|
if (!xPositionValue || !yPositionValue) return;
|
||
|
|
||
|
yPosition = yPositionValue->GetDoubleValue();
|
||
|
xPosition = xPositionValue->GetDoubleValue();
|
||
|
}
|