DIRECTOR: LINGO: Add custom asString for window

This commit is contained in:
djsrv 2020-07-24 00:10:03 -04:00
parent b014a78df1
commit 73c25028b8
2 changed files with 5 additions and 0 deletions

View File

@ -319,6 +319,10 @@ void LM::m_respondsTo(int nargs) {
// Window
Common::String Stage::asString() {
return "window \"" + getName() + "\"";
}
bool Stage::hasProp(const Common::String &propName) {
Common::String fieldName = Common::String::format("%d%s", kTheWindow, propName.c_str());
return g_lingo->_theEntityFields.contains(fieldName);

View File

@ -144,6 +144,7 @@ class Stage : public Graphics::MacWindow, public Object<Stage> {
void loadMac(const Common::String movie);
// lingo/lingo-object.cpp
virtual Common::String asString();
virtual bool hasProp(const Common::String &propName);
virtual Datum getProp(const Common::String &propName);
virtual bool setProp(const Common::String &propName, const Datum &value);