Type
DefineButton {
id: Uint16
trackAsMenu: Boolean
records: ButtonRecord[]
actions: ButtonCondAction[]
}
ℹ DefineButton and DefineButton2 do not end with padding.
Syntax
DefineButton :
buttonId recordList avm1BufferDefineButton2 :
buttonId button2Flags nextAction[value:0
] recordList PADDING
| {
buttonId
button2Flags
nextAction[value:size(this.nextAction) + size(this.recordList)
]
recordList
condActionList
}buttonId :
LE_UINT16avm1Buffer :
UINT8*buttonFlags :
UINT8recordList :
recordFlags[value:0
]
| record recordListrecord(Version=Button1) :
recordFlags[value != 0
] charcterId depth Matrix
record(Version=Button2) :
{
recordFlags[value != 0
]
charcterId
depth
Matrix
ColorTransformWithAlpha
FilterList[if:recordFlags.hasFilters
]
BlendMode[if:recordFlags.hasBlendMode
]
}recordFlags :
UINT8nextAction :
LE_UINT16condActionList :
nextAction[value:0
] condAction
| {
nextAction[value:size(this.nextAction) + size(this.condAction)
]
condAction
condActionList
}condAction :
condActionflags avm1Buffer
Interpretation of buttonFlags
:
Mask | Comment |
---|---|
1 << 0 | trackAsMenu |
0xfe | Reserved |
Interpretation of recordFlags
:
Mask | Comment |
---|---|
1 << 0 | stateUp |
1 << 1 | stateOver |
1 << 2 | stateDown |
1 << 3 | stateHitTest |
1 << 4 | hasFilters |
1 << 5 | hasBlendMode |
0xc0 | Reserved |
Interpretation of condActionFlags
:
Mask | Comment |
---|---|
1 << 0 | idleToOverUp |
1 << 1 | overUpToIdle |
1 << 2 | overUpToOverDown |
1 << 3 | overDownToOverUp |
1 << 4 | overDownToOutDown |
1 << 5 | outDownToOverDown |
1 << 6 | outDownToIdle |
1 << 7 | idleToOverDown |
1 << 8 | overDownToIdle |
0xfe00 | keyCode = (condActionFlags >> 9) & 0x7f (TODO) |