public void InitFrom(GameMsgFormInfo info){ msgType = info.msgType; // type of message to construct from this form gameObjectName = info.gameObjectName; log = info.log; // interact status message interactName = info.interactName; // dialog message command = info.command; x = info.x; y = info.y; w = info.w; h = info.h; text = info.text; title = info.title; time = info.time; modal = info.modal; xmlName = info.xmlName; className = info.className; dialogName = info.dialogName; anchor = info.anchor; arguments = info.arguments; numArguments = info.numArguments; waitForDialogClosed = info.waitForDialogClosed; waitForDialogName = info.waitForDialogName; //quickinfomsg timeout = info.timeout; editbox = info.editbox; editboxlabel = info.editboxlabel; editboxprompt = info.editboxprompt; sendMap = info.sendMap; //interact dialog items = info.items; //info.baseobj = gmf.baseobj; baseXML = info.baseXML; //popupmsg hasCancel = info.hasCancel; commandString = info.commandString; Params = info.Params; // used for interact status message // GUIScreenMsg ScreenName = info.ScreenName; }
public GameMsgFormInfo ToInfo(GameMsgForm gmf){ // saves values to an info for serialization (to XML) GameMsgFormInfo info = new GameMsgFormInfo(); info.msgType = gmf.msgType; // type of message to construct from this form info.gameObjectName = gmf.gameObjectName; info.log = gmf.log; // interact status message info.interactName = gmf.interactName; // dialog message info.command = gmf.command; info.x = gmf.x; info.y = gmf.y; info.w = gmf.w; info.h = gmf.h; info.text = gmf.text; info.title = gmf.title; info.time = gmf.time; info.modal = gmf.modal; info.xmlName = gmf.xmlName; info.className = gmf.className; info.dialogName = gmf.dialogName; info.waitForDialogClosed = gmf.waitForDialogClosed; info.waitForDialogName = gmf.waitForDialogName; info.anchor = gmf.anchor; info.arguments = gmf.arguments; info.numArguments = gmf.numArguments; //quickinfomsg info.timeout = gmf.timeout; info.editbox = gmf.editbox; info.editboxlabel = gmf.editboxlabel; info.editboxprompt = gmf.editboxprompt; info.sendMap = gmf.sendMap; //interact dialog info.items = gmf.items; //info.baseobj = gmf.baseobj; info.baseXML = gmf.baseXML; //popupmsg info.hasCancel = gmf.hasCancel; info.commandString = gmf.commandString; info.Params = gmf.Params; // used for interact status message // GUIScreenMsg info.ScreenName = gmf.ScreenName; return info; }