|
| 1 | +#include "UnrealEnginePythonPrivatePCH.h" |
| 2 | + |
| 3 | +#include "UEPySVectorInputBox.h" |
| 4 | + |
| 5 | +#define sw_vector_input_box StaticCastSharedRef<SVectorInputBox>(self->s_compound_widget.s_widget.s_widget) |
| 6 | + |
| 7 | + |
| 8 | +static PyMethodDef ue_PySVectorInputBox_methods[] = { |
| 9 | + { NULL } /* Sentinel */ |
| 10 | +}; |
| 11 | + |
| 12 | +PyTypeObject ue_PySVectorInputBoxType = { |
| 13 | + PyVarObject_HEAD_INIT(NULL, 0) |
| 14 | + "unreal_engine.SVectorInputBox", /* tp_name */ |
| 15 | + sizeof(ue_PySVectorInputBox), /* tp_basicsize */ |
| 16 | + 0, /* tp_itemsize */ |
| 17 | + 0, /* tp_dealloc */ |
| 18 | + 0, /* tp_print */ |
| 19 | + 0, /* tp_getattr */ |
| 20 | + 0, /* tp_setattr */ |
| 21 | + 0, /* tp_reserved */ |
| 22 | + 0, /* tp_repr */ |
| 23 | + 0, /* tp_as_number */ |
| 24 | + 0, /* tp_as_sequence */ |
| 25 | + 0, /* tp_as_mapping */ |
| 26 | + 0, /* tp_hash */ |
| 27 | + 0, /* tp_call */ |
| 28 | + 0, /* tp_str */ |
| 29 | + 0, /* tp_getattro */ |
| 30 | + 0, /* tp_setattro */ |
| 31 | + 0, /* tp_as_buffer */ |
| 32 | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ |
| 33 | + "Unreal Engine SVectorInputBox", /* tp_doc */ |
| 34 | + 0, /* tp_traverse */ |
| 35 | + 0, /* tp_clear */ |
| 36 | + 0, /* tp_richcompare */ |
| 37 | + 0, /* tp_weaklistoffset */ |
| 38 | + 0, /* tp_iter */ |
| 39 | + 0, /* tp_iternext */ |
| 40 | + ue_PySVectorInputBox_methods, /* tp_methods */ |
| 41 | +}; |
| 42 | + |
| 43 | +static int ue_py_svector_input_box_init(ue_PySVectorInputBox *self, PyObject *args, PyObject *kwargs) { |
| 44 | + ue_py_slate_setup_farguments(SVectorInputBox); |
| 45 | + |
| 46 | + ue_py_slate_farguments_optional_bool("allow_responsive_layout", AllowResponsiveLayout); |
| 47 | + ue_py_slate_farguments_optional_bool("color_axis_labels", bColorAxisLabels); |
| 48 | + ue_py_slate_farguments_struct("font", Font, FSlateFontInfo); |
| 49 | + ue_py_slate_farguments_event("on_x_changed", OnXChanged, FOnFloatValueChanged, OnFloatChanged); |
| 50 | + ue_py_slate_farguments_event("on_y_changed", OnYChanged, FOnFloatValueChanged, OnFloatChanged); |
| 51 | + ue_py_slate_farguments_event("on_z_changed", OnZChanged, FOnFloatValueChanged, OnFloatChanged); |
| 52 | + ue_py_slate_farguments_event("on_x_committed", OnXCommitted, FOnFloatValueCommitted, OnFloatCommitted); |
| 53 | + ue_py_slate_farguments_event("on_y_committed", OnYCommitted, FOnFloatValueCommitted, OnFloatCommitted); |
| 54 | + ue_py_slate_farguments_event("on_z_committed", OnZCommitted, FOnFloatValueCommitted, OnFloatCommitted); |
| 55 | + ue_py_slate_farguments_tfloat("x", X); |
| 56 | + ue_py_slate_farguments_tfloat("y", Y); |
| 57 | + ue_py_slate_farguments_tfloat("z", Z); |
| 58 | + |
| 59 | + ue_py_snew(SVectorInputBox, s_compound_widget.s_widget); |
| 60 | + return 0; |
| 61 | +} |
| 62 | + |
| 63 | +void ue_python_init_svector_input_box(PyObject *ue_module) { |
| 64 | + |
| 65 | + ue_PySVectorInputBoxType.tp_init = (initproc)ue_py_svector_input_box_init; |
| 66 | + |
| 67 | + ue_PySVectorInputBoxType.tp_base = &ue_PySCompoundWidgetType; |
| 68 | + |
| 69 | + if (PyType_Ready(&ue_PySVectorInputBoxType) < 0) |
| 70 | + return; |
| 71 | + |
| 72 | + Py_INCREF(&ue_PySVectorInputBoxType); |
| 73 | + PyModule_AddObject(ue_module, "SVectorInputBox", (PyObject *)&ue_PySVectorInputBoxType); |
| 74 | +} |
0 commit comments