mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 22:17:31 +00:00
d138b7b878
* Make case consistent * How modular can you go? Holy modular * Add comments * Initialize values
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();
|
|
}
|