mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Setting Order directly (while the event handler is registered) will result in all sorts of broken behavior. Made readonly.
This commit is contained in:
parent
03f7c39ea7
commit
f816537992
2 changed files with 14 additions and 1 deletions
|
@ -468,6 +468,18 @@ DEFINE_FIELD_X(InputEvent, DInputEvent, KeyChar);
|
||||||
DEFINE_FIELD_X(InputEvent, DInputEvent, MouseX);
|
DEFINE_FIELD_X(InputEvent, DInputEvent, MouseX);
|
||||||
DEFINE_FIELD_X(InputEvent, DInputEvent, MouseY);
|
DEFINE_FIELD_X(InputEvent, DInputEvent, MouseY);
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(DStaticEventHandler, SetOrder)
|
||||||
|
{
|
||||||
|
PARAM_SELF_PROLOGUE(DStaticEventHandler);
|
||||||
|
PARAM_INT(order);
|
||||||
|
|
||||||
|
if (E_CheckHandler(self))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
self->Order = order;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(DEventHandler, Create)
|
DEFINE_ACTION_FUNCTION(DEventHandler, Create)
|
||||||
{
|
{
|
||||||
PARAM_PROLOGUE;
|
PARAM_PROLOGUE;
|
||||||
|
|
|
@ -314,7 +314,8 @@ class StaticEventHandler : Object native
|
||||||
// this value will be queried on Register() to decide the relative order of this handler to every other.
|
// this value will be queried on Register() to decide the relative order of this handler to every other.
|
||||||
// this is most useful in UI systems.
|
// this is most useful in UI systems.
|
||||||
// default is 0.
|
// default is 0.
|
||||||
native int Order;
|
native readonly int Order;
|
||||||
|
native void SetOrder(int order);
|
||||||
// this value will be queried on user input to decide whether to send UiProcess to this handler.
|
// this value will be queried on user input to decide whether to send UiProcess to this handler.
|
||||||
native bool IsUiProcessor;
|
native bool IsUiProcessor;
|
||||||
// this value determines whether mouse input is required.
|
// this value determines whether mouse input is required.
|
||||||
|
|
Loading…
Reference in a new issue