#include "Content\\ShellScripts\\stddefs.h" #include "Content\\ShellScripts\\common_shell.script" #include "Content\\ShellScripts\\ScriptStrings.h" #include "Content\\ShellScripts\\ShellFunctionHeaders.hpp" #include "Content\\ShellScripts\\listboxes.script" #include "Content\\ShellScripts\\mc_listboxes.script" #include "Content\\ShellScripts\\buttons.script" #include "Content\\ShellScripts\\c_Pane.script" #include "Content\\ShellScripts\\c_Text.script" #include "Content\\ShellScripts\\c_Toggles.script" #include "Content\\ShellScripts\\Slider.script" #include "Content\\ShellScripts\\c_OM_Slider.script" #include "Content\\ShellScripts\\c_InfoRegion.script" #include "Content\\ShellScripts\\c_rollover.script" main { GUI_CREATE { location.z = 5 int XIndent = 37 int YIndent = 77 int TextX = 35 int TextY = 50 int TextYOff = 50 int TextW = 200 int TextH = 30 object oRollover = s_HelpRegion oRollover.nFontID = IDS_F_ROLLOVER_INFO oRollover.cTextColor= 0xFFff7200 oRollover.location = 31,516,255 oRollover.nWidth = 538 oRollover.nHeight = 56 initialize(oRollover) object oResTitle = s_Text oResTitle.location = XIndent + TextX,YIndent + TextY + (0 * TextYOff),nZ_TEXT oResTitle.nFontID = IDS_F_OM_LABEL oResTitle.nResID = IDS_OM_V_RES_TITLE oResTitle.cTextColor = cWhite oResTitle.nJustify = 0 oResTitle.nLayoutWidth = TextW oResTitle.nLayoutHeight = TextH initialize(oResTitle) object oGammaTitle = s_Text oGammaTitle.location = XIndent + TextX,YIndent + TextY + (2 * TextYOff),nZ_TEXT oGammaTitle.nFontID = IDS_F_OM_LABEL oGammaTitle.nResID = IDS_OM_V_GAMMA_TITLE oGammaTitle.cTextColor = cWhite oGammaTitle.nJustify = 0 oGammaTitle.nLayoutWidth = TextW oGammaTitle.nLayoutHeight = TextH initialize(oGammaTitle) object oVideoChange = s_Text oVideoChange.location = getresx() / 2,YIndent + TextY + (0 * TextYOff),nZ_TEXT oVideoChange.nFontID = IDS_F_OM_LABEL oVideoChange.nResID = IDS_HELP_OM_VIDEO oVideoChange.cTextColor = cWhite oVideoChange.nJustify = 0 oVideoChange.nLayoutWidth = 330 oVideoChange.nLayoutHeight = 350 initialize(oVideoChange) //Info Regions int IR_X = 5 int IR_Y = 5 int IR_Z = 35 int IR_W = 350 int IR_H = 28 object oResDesc = s_InfoRegion oResDesc.location = oResTitle.location.x - IR_X,oResTitle.location.y - IR_Y,IR_Z oResDesc.nWidth = IR_W oResDesc.nHeight = IR_H oResDesc.nHelpID = IDS_HELP_OM_V_SCREEN initialize(oResDesc) object oGammaDesc = s_InfoRegion oGammaDesc.location = oGammaTitle.location.x - IR_X,oGammaTitle.location.y - IR_Y,IR_Z oGammaDesc.nWidth = IR_W oGammaDesc.nHeight = IR_H oGammaDesc.nHelpID = IDS_HELP_OM_V_GAMMA initialize(oGammaDesc) int DropX = TextX + TextW + 30 int DropY = TextY + 2 int SlidX = TextX + TextW + 20 int SlidY = TextY + 2 //Drop Down int nRes = 3 int nDetail //= 0 object oDRes = s_droplistbox oDRes.itemWidth = 150 //MUST BE INITIALIZED 272 - 16 oDRes.itemHeight = 16 //MUST BE INITIALIZED 24 oDRes.list_size = 5 //MUST BE INITIALIZED oDRes.max_displayed = 6 //MUST BE INITIALIZED oDRes.arrowHeight = 15 oDRes.nRollover = 1 oDRes.nHelpID = IDS_HELP_OM_V_SCREEN oDRes.location = oResTitle.location.x + 25, oResTitle.location.y + 20, oResTitle.location.z int res_size callback($$Shell_CallbackHandler$$, ShellGetSupportedResolutions, oDRes.list_item[], res_size) oDRes.list_size = res_size // oDRes.list_item[0] = localize$(IDS_OM_RES_2) // oDRes.list_item[1] = localize$(IDS_OM_RES_3) // oDRes.list_item[2] = localize$(IDS_OM_RES_4) // oDRes.list_item[3] = localize$(IDS_OM_RES_5) // oDRes.list_item[4] = localize$(IDS_OM_RES_5) // oDRes.list_item[5] = localize$(IDS_OM_RES_6) //Buttons object oBDefault = s_multistatepane oBDefault.file = WPATH "button_reg_200x27m_4state.tga" oBDefault.text = localize$(IDS_OM_C_RESET) oBDefault.total_states = 4 oBDefault.nRollover = 1 oBDefault.nHelpID = IDS_HELP_OM_V_DEFAULT oBDefault.location = XIndent + 513,YIndent + 351, nZ_BUTTON initialize (oBDefault) //Sliders int nGamma = 50 int nBright = 50 int nContrast = 50 object oSGamma = s_OMSlider oSGamma.location = oGammaTitle.location.x + 40, oGammaTitle.location.y + 25,nZ_SLIDER oSGamma.nHelpId = IDS_OM_V_GAMMA_TITLE int first_time = true int dGamma int dRes initialize(this) } GUI_INIT { callback($$Shell_CallbackHandler$$,ShellOptionsGetSliderValue,MWO_GAMMA,nGamma) oSGamma.nSelected = nGamma initialize(oSGamma) callback($$Shell_CallbackHandler$$,ShellGetOptionValue,MWO_SCREENRESOLUTION,nRes) oDRes.nSelected = nRes initialize(oDRes) if (first_time) { dGamma = nGamma dRes = nRes } } GUI_MAILBOX { switch(sender) { case oBDefault: { callback($$Shell_CallbackHandler$$,ShellOptionsSetSliderValue,MWO_GAMMA,dGamma) callback($$Shell_CallbackHandler$$,ShellSetOptionValue,MWO_SCREENRESOLUTION,dRes) initialize(this) return } case oSGamma: { nGamma = oSGamma.nSelected callback($$Shell_CallbackHandler$$,ShellOptionsSetSliderValue,MWO_GAMMA,nGamma) } break case oDRes: { nRes = oDRes.nSelected callback($$Shell_CallbackHandler$$,ShellSetOptionValue,MWO_SCREENRESOLUTION,nRes) } break } } }