#include "Content\\ShellScripts\\stddefs.h" // This control created by brennanp 6.28.2000 ??Problems?? call x53796 // // Parameters to pass into text object //How to Initialize the MissionRegion object //object oMissionRegion = s_MissionRegion //oMissionRegion.location.x = //oMissionRegion.location.y = //oMissionRegion.nMRWidth = //oMissionRegion.nMRHeight = //oMissionRegion.szMRTitle = //oMissionRegion.szRollover = //oMissionRegion.szRightClick = //initialize(oMissionRegion) s_MissionRegion { GUI_CREATE { int holder int nID int nNumLance int nMRWidth int nMRHeight int nOver = 0 int nPressL = 0 int nPressR = 0 int ClickTracker = 0 //Checks to see if a rightclick has already occured so it can do code on the 2nd click int nMR_status string szMRTitle string szRollover string szRightClick bitmap bmpImage location.z = nZ_MissRegion object oTitle = s_Text oTitle.nFontID = IDS_F_CM_TITLE oTitle.cTextColor = cWhite oTitle.nJustify = 3 } GUI_INIT { region = 0,0 to nMRWidth,nMRHeight oTitle.location = location.x,location.y,location.z + nZ_TEXT if (nMR_status == 2) { oTitle.szText = localize$(IDS_GN_COMPLETED) } else { oTitle.szText = szMRTitle } oTitle.nLayoutWidth = nMRWidth oTitle.nLayoutHeight= nMRHeight initialize(oTitle) } REGION_ENTERED { oRollover.szText = szRollover mail (nMSG_INPUT_STRING,oRollover) nOver = 1 } REGION_EXITED { mail (nMSG_CLEARHELP,oRollover) nOver = 0 } GUI_ACTIVATE { activate(oTitle) } GUI_DEACTIVATE { deactivate(oTitle) } LBUTTON_UPDATE { if (mouse.left == BUTTON_CLICKED) { if (nMR_status != 2) { mail(nMSG_MRCLICKED,parent) } } if (mouse.left == BUTTON_PRESSED) { if (nMR_status != 2) { oTitle.cTextColor = 0xFF888888 nPressL = 1 } } if (mouse.left == BUTTON_RELEASED) { if (nMR_status != 2) { oTitle.cTextColor = cWhite nPressL = 0 } } } RBUTTON_UPDATE { if (mouse.right == BUTTON_CLICKED) { if (!ClickTracker) { oRollover.szText = szRightClick mail (nMSG_INPUT_STRING,oRollover) ClickTracker = 1 } else { oRollover.szText = szRollover mail (nMSG_INPUT_STRING,oRollover) ClickTracker = 0 } } if (mouse.right == BUTTON_PRESSED) { oTitle.cTextColor = 0xFFdddddd nPressR = 1 } if (mouse.right == BUTTON_RELEASED) { oTitle.cTextColor = cWhite nPressR = 0 } } GUI_DRAW { if (nPressL) { setpencolor(0x88000088) } else if (nPressR) { setpencolor(0x440000dd) } else if (parent.nMRSelected == nID) { setpencolor(0x440000ff) } else { setpencolor(0xcc343774) } if (nMR_status == 2) { setpencolor(0x88888888) } ldrawrect 0,0 to nMRWidth,nMRHeight if (nOver) { setpencolor(cWhite) ldrawframe 0,0 to nMRWidth,nMRHeight setpencolor(0xffbbbbbb) ldrawframe 1,1 to nMRWidth - 1,nMRHeight -1 setpencolor(0xff666666) ldrawframe 2,2 to nMRWidth - 2,nMRHeight -2 ldrawframe 3,3 to nMRWidth - 3,nMRHeight -3 } else { setpencolor(cWhite) ldrawline 0,0 to nMRWidth,0 ldrawline 0,0 to 0,nMRHeight setpencolor(0xFF72727d) ldrawline nMRWidth,0 to nMRWidth,nMRHeight ldrawline 1,nMRHeight to nMRWidth,nMRHeight setpencolor(0xFFbcbdc6) ldrawframe 1,1 to nMRWidth,nMRHeight - 1 } } }