-
Notifications
You must be signed in to change notification settings - Fork 0
/
DefineButton2.cpp
38 lines (33 loc) · 949 Bytes
/
DefineButton2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "DefineButton2.h"
DefineButton2::DefineButton2(void)
{
}
DefineButton2::~DefineButton2(void)
{
}
void DefineButton2::ReadData(SWFReader *swf, int l){
this->length = mButton.Read(swf);
printf( " #Button length : (Org=%d, Read=%d)\n", l, this->length );
}
void DefineButton2::WriteData(SWFWriter *swf, int l){
this->length = mButton.Write(swf);
printf( " #Button length : (Org=%d, Written=%d)\n", l, this->length );
}
ulong DefineButton2::GetLength(void){
return this->length;
}
void DefineButton2::SetLength(ulong len){
this->length = len;
}
UInt16 DefineButton2::GetCharacterID(){
return mButton.ButtonId;
}
void DefineButton2::SetCharacterID(UInt16 IdNew){
mButton.ButtonId = IdNew;
}
void DefineButton2::IncreaseCharacterID(UInt16 nAmount){
SetCharacterID( GetCharacterID()+nAmount );
for(int i=0; i<mButton.mi_NumCharacters; i++){
mButton.Characters[i].CharacterID += nAmount;
}
}