mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 06:57:28 +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();
|
||
|
}
|