DIRECTOR: implement checkBoxAccess property

This commit is contained in:
ysj1173886760 2021-07-28 17:41:52 +08:00
parent 36abd91264
commit 6315f744d8
4 changed files with 8 additions and 3 deletions

View File

@ -401,8 +401,10 @@ void Channel::updateGlobalAttr() {
((Graphics::MacText *)_widget)->setSelRange(g_director->getCurrentMovie()->_selStart, g_director->getCurrentMovie()->_selEnd);
// update button info, including checkBoxType
if ((_sprite->_cast->_type == kCastButton || isButtonSprite(_sprite->_spriteType)) && _widget)
if ((_sprite->_cast->_type == kCastButton || isButtonSprite(_sprite->_spriteType)) && _widget) {
((Graphics::MacButton *)_widget)->setCheckBoxType(g_director->getCurrentMovie()->_checkBoxType);
((Graphics::MacButton *)_widget)->setCheckBoxAccess(g_director->getCurrentMovie()->_checkBoxAccess);
}
}
void Channel::replaceSprite(Sprite *nextSprite) {

View File

@ -394,7 +394,8 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
d.u.i = g_director->_centerStage;
break;
case kTheCheckBoxAccess:
getTheEntitySTUB(kTheCheckBoxAccess);
d.type = INT;
d.u.i = g_director->getCurrentMovie()->_checkBoxAccess;
break;
case kTheCheckBoxType:
d.type = INT;
@ -901,7 +902,7 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
g_director->_centerStage = d.asInt();
break;
case kTheCheckBoxAccess:
setTheEntitySTUB(kTheCheckBoxAccess);
g_director->getCurrentMovie()->_checkBoxAccess = d.asInt();
break;
case kTheCheckBoxType:
g_director->getCurrentMovie()->_checkBoxType = d.asInt();

View File

@ -79,6 +79,7 @@ Movie::Movie(Window *window) {
_selStart = -1;
_checkBoxType = 0;
_checkBoxAccess = 0;
}
Movie::~Movie() {

View File

@ -158,6 +158,7 @@ public:
int _selEnd;
int _checkBoxType;
int _checkBoxAccess;
uint16 _currentHiliteChannelId;