截图命令框

这个命令框可以调截图的质量与选择是否隐藏界面、指针。其实我是在剧情编辑器那个UI移植过来的。

这个命令框自己调出来,我只提供截图命令框的语句。(建议添加在uimainnew.xml)

<gadget name="ScreenshotDialog" type="gadget" size1024="337 200 700 480" background="ui\editor\editor_background" bevel="" titlebar="$$20374$$Create a Screenshot" closebutton="" hidden="" windowzstyle="" moveable=""> <gadget name="ScreenshotTypeText" type="textBox" textfont="Arial nodrop" textfontsize="12" textcolor="0 0 0" size1024="337 228 418 248">$$20347$$Type:</gadget> <gadget name="ScreenshotTypeRadioButtons" type="radioset" background="ui\editor\editor_background" radiosetbuttonsize1024="100 25" size1024="420 223 520 303"> <button command="configDef(&quot;jpegScreenshots&quot;)">$$20536$$JPG</button> <button command="configUndef(&quot;jpegScreenshots&quot;)">$$20537$$TGA</button> </gadget> <gadget name="ScreenshotQualityText" type="textBox" textfont="Arial nodrop" textfontsize="12" textcolor="0 0 0" size1024="527 229 604 249">$$20375$$Quality:</gadget> <gadget name="ScreenshotQualityRadioButtons" type="radioset" background="ui\editor\editor_background" radiosetbuttonsize1024="100 25" radiosetdefaultbuttonindex="2" size1024="606 222 686 322"> <button command="configSetInt(&quot;jpegScreenshotQuality&quot;, 25)">$$18579$$Low</button> <button command="configSetInt(&quot;jpegScreenshotQuality&quot;, 50)">$$18846$$Medium</button> <button command="configSetInt(&quot;jpegScreenshotQuality&quot;, 100)">$$18578$$High</button> </gadget> <gadget name="ScreenshotIncludeText" type="textBox" textfont="Arial nodrop" textfontsize="12" textcolor="0 0 0" size1024="339 327 531 347">$$20376$$Hide:</gadget> <gadget name="ScreenshotIncludeInterface" type="checkButton" textfont="Arial nobold nodrop" textfontsize="12" textcolor="0 0 0" configindex="screenShotHideUI" size1024="412 352 587 372">$$20377$$Interface</gadget> <gadget name="ScreenshotIncludeCursor" type="checkButton" textfont="Arial nobold nodrop" textfontsize="12" textcolor="0 0 0" configindex="screenShotHideCursor" size1024="412 382 587 402">$$20378$$Cursor</gadget> <gadget name="ScreenshotSeparator" type="gadget" background="UI\editor\menu_separator" size1024="347 422 690 432"/> <gadget name="ScreenshotTakeButton" type="button" bevelbutton="" textfont="Arial nodrop" textfontsize="12" size1024="428 439 529 464"> $$20379$$Shoot <command>gadgetUnReal("ScreenshotDialog") screenshot() gadgetReal("ScreenshotDialog")</command> </gadget> <gadget name="ScreenshotCloseButton" type="button" bevelbutton="" textfont="Arial nodrop" textfontsize="12" size1024="555 439 656 464"> $$18457$$Close <command>gadgetUnReal("ScreenshotDialog")</command> </gadget> </gadget>

另外还可以这样做(要稍微修改一下语句,在uipregamenew.xml添加):

uipregamenew.xml的语句:
<gadget name="ScreenshotDialog" type="gadget" size1024="337 200 700 480" background="ui\editor\editor_background" bevel="" titlebar="$$20374$$Create a Screenshot" closebutton="" hidden="" windowzstyle="" moveable=""> <gadget name="ScreenshotTypeText" type="textBox" textfont="Arial nodrop" textfontsize="12" textcolor="0 0 0" size1024="337 228 418 248">$$20347$$Type:</gadget> <gadget name="ScreenshotTypeRadioButtons" type="radioset" background="ui\editor\editor_background" radiosetbuttonsize1024="100 25" size1024="420 223 520 303"> <button command="configDef(&quot;jpegScreenshots&quot;)">$$20536$$JPG</button> <button command="configUndef(&quot;jpegScreenshots&quot;)">$$20537$$TGA</button> </gadget> <gadget name="ScreenshotQualityText" type="textBox" textfont="Arial nodrop" textfontsize="12" textcolor="0 0 0" size1024="527 229 604 249">$$20375$$Quality:</gadget> <gadget name="ScreenshotQualityRadioButtons" type="radioset" background="ui\editor\editor_background" radiosetbuttonsize1024="100 25" radiosetdefaultbuttonindex="2" size1024="606 222 686 322"> <button command="configSetInt(&quot;jpegScreenshotQuality&quot;, 25)">$$18579$$Low</button> <button command="configSetInt(&quot;jpegScreenshotQuality&quot;, 50)">$$18846$$Medium</button> <button command="configSetInt(&quot;jpegScreenshotQuality&quot;, 100)">$$18578$$High</button> </gadget> <gadget name="ScreenshotIncludeText" type="textBox" textfont="Arial nodrop" textfontsize="12" textcolor="0 0 0" size1024="339 327 531 347">$$20376$$Hide:</gadget> <gadget name="ScreenshotIncludeInterface" type="checkButton" textfont="Arial nobold nodrop" textfontsize="12" textcolor="0 0 0" configindex="screenShotHideUI" size1024="412 352 587 372">$$20377$$Interface</gadget> <gadget name="ScreenshotIncludeCursor" type="checkButton" textfont="Arial nobold nodrop" textfontsize="12" textcolor="0 0 0" configindex="screenShotHideCursor" size1024="412 382 587 402">$$20378$$Cursor</gadget> <gadget name="ScreenshotSeparator" type="gadget" background="UI\editor\menu_separator" size1024="347 422 690 432"/> <gadget name="ScreenshotTakeButton" type="button" bevelbutton="" textfont="Arial nodrop" textfontsize="12" size1024="428 439 529 464"> $$20379$$Shoot <command>gadgetUnReal("ScreenshotDialog") gadgetUnReal("MainMenuOptions") gadgetUnReal("BackgroundMainButtons") gadgetUnReal("HelpAndToolsSubMenu") screenshot() gadgetReal("BackgroundMainButtons") gadgetReal("MainMenuOptions") gadgetReal("HelpAndToolsSubMenu")</command> </gadget> <gadget name="ScreenshotCloseButton" type="button" bevelbutton="" textfont="Arial nodrop" textfontsize="12" size1024="555 439 656 464"> $$18457$$Close <command>gadgetUnReal("ScreenshotDialog")</command> </gadget> </gadget>