PEDN> Main Web>DeveloperSite > OfficialApps>ScreenShotApp (2008-04-29, LiXizhi) Change language en zh-cn? EditAttach

Screenshot App

Taking screenshots and upload

Summary of Contents

快速屏幕截图、上传图片、浏览其他玩家上传的图片

Screenshots & User Guide

这个应用程序的源代码可以做为App开发的教程; 展示了MCML, NPL, 和APP架构。

taking an in-game snapshot
SnapshotFull.jpg

TIP 可以上传、设置和浏览截图。快捷键是F11

Snapshot Page

下面的UI和功能都是用MCML实现的。

Preview page UI Snapshot setting page UI Snapshot local file UI
Snapshot_PreviewTab.jpg SnapshotSettingTab.jpg SnapshotLocalStore.jpg

你可以参考下面的源代码,学习 ParaWorldApp? 的开发

MCML file script/kids/3DMapSystemUI/ScreenShot/SnapshotPage.html
NPL code behind file script/kids/3DMapSystemUI/ScreenShot/SnapshotPage.lua

<!-- "script/kids/3DMapSystemUI/ScreenShot/SnapshotPage.html" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
        <title>Snapshot Page by LiXizhi, 2008.4.29</title>
</head>
<body>
        <pe:mcml>
        <script type="text/npl" src="script/kids/3DMapSystemUI/ScreenShot/SnapshotPage.lua">
        MyCompany.Apps.ScreenShot.SnapshotPage.OnInit();
        </script>
        <pe:tabs name="SnapshotTabs">
        <pe:tab-item text="&#24555;&#36895;&#25130;&#22270;" selected="true">
        <form name="Snapshot"><div style="margin:5px">
        <div><font style="font-weight:bold">&#24744;&#24076;&#26395;&#20570;&#20160;&#20040;?</font></div>
        <input type="radio" checked="true" name="SnapshotAction" value="0"/>&#20445;&#23384;&#21040;&#26412;&#22320;<br />
        <input type="radio" name="SnapshotAction" value="1"/>&#19978;&#20256;&#21040;&#23448;&#32593;<br />
        <input type="radio" name="SnapshotAction" value="2"/>&#21457;&#32473;&#22909;&#21451;<br />
        <input type="radio" name="SnapshotAction" value="3"/>&#20570;&#20026;3D&#19990;&#30028;&#39044;&#35272;&#22270;<br />
        <input type="radio" name="SnapshotAction" value="4"/>&#20570;&#20026;&#30331;&#38470;&#39029;&#26700;&#38754;<br />
        <hr />
        <div><font style="font-weight:bold">&#24403;&#21069;&#25130;&#22270;&#39044;&#35272;:</font><font style="color:#808080;">&#24555;&#36895;&#25130;&#22270;&#38190;F11</font></div>
        <img name="CurrentSnapshot" style="width:230px;height:140px;"/><br />
        <div><font style="font-weight:bold">&#22270;&#29255;&#21517;&#31216;:</font><font style="color:#808080;">&#21487;&#20197;&#37325;&#21629;&#21517;&#25130;&#22270;</font></div>
        <input type="text" name="SnapshotName"/>
        <hr />
        <input type="submit" name="DoAction" class="defaultbutton" value="&#30830;&#23450;/&#25552;&#20132;" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnClickDoAction()"/>
        <input style="margin-left:10px" type="button" name="TakeSnapShot" value="&#37325;&#26032;&#25130;&#22270;" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnClickTakeSnapshot()"/>
        <input style="margin-left:10px" type="button" name="OpenDir" value="&#25171;&#24320;&#30446;&#24405;" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnClickOpenSnapshotDir()"/><br />
        <div><label name="result" style="color:#006600;font-weight:bold;margin-top:5px"></label></div>
        </div></form>
        </pe:tab-item>
        <pe:tab-item text="&#22270;&#20687;&#35774;&#32622;">
        <form name="ImageSetting"><div style="margin:5px">
        &#24744;&#24076;&#26395;&#30340;&#25130;&#22270;&#22823;&#23567;:
        <select name="ImageResolution" AllowUserEdit="false" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnSelectImageSize()">
        <option selected="true" value="">&#24403;&#21069;&#31383;&#21475;</option>
        <option value="960*540">960*540(16:9)</option>
        <option value="640*480">640*480(4:3)</option>
        <option value="600*400">600*400(3:2)</option>
        <option value="300*200">300*200(3:2)</option>
        </select><br/>
        <div style="float:left">&#38271;&#24230;: <input style="width:50px" type="text" name="Width"/></div><div style="float:left;margin-left:10px">&#39640;&#24230;: <input style="width:50px" type="text" name="Height"/></div><br/>
        <hr />
        <input type="checkbox" name="IncludeUI"/> &#25130;&#22270;&#20013;&#26159;&#21542;&#21253;&#21547;UI<br/>
        <input type="checkbox" name="IncludeHUD"/> &#26159;&#21542;&#21253;&#21547;HUD<br/>
        <input type="checkbox" name="IncludeWatermark"/> &#26159;&#21542;&#21253;&#21547;ParaEngine Logo<br/>
        <hr />
        <input type="submit" name="SaveSetting" class="defaultbutton" value="&#20445;&#23384;" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnClickSaveSetting()"/><label name="settingresult" style="color:#006600;font-weight:bold;margin-top:5px;margin-left:10px">&#23578;&#26410;&#20445;&#23384;</label>
        </div></form>
        </pe:tab-item>
        <pe:tab-item text="&#26412;&#22320;&#25130;&#22270;">
        <div style="margin:5px">
        <div><font style="font-weight:bold">&#25130;&#22270;&#39044;&#35272;: </font><font style="color:#808080;">&#36873;&#25321;&#25991;&#20214;, &#26597;&#30475;&#25130;&#22270;</font></div>
        <img name="LocalSnapshot" style="width:230px;height:140px;"/>
        <hr />
        <input type="button" name="SetCurrent" class="defaultbutton" value="&#35774;&#20026;&#24403;&#21069;&#25130;&#22270;" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnClickSetAsCurrent()"/>
        <input style="margin-left:10px" type="button" name="Delete" value="&#21024;&#38500;" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnClickDeleteFile()"/>
        <input style="margin-left:10px" type="button" name="OpenFolder" value="&#25171;&#24320;" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnClickOpenFolder()"/>
        <hr />
        <select name="CurFolder" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnSelectFolder()">
        <option selected="true" value="Screen Shots">&#32570;&#30465;&#30446;&#24405;</option>
        <option value="/">&#26681;&#30446;&#24405;(/)</option>
        </select><input type="text" name="filepath"/><br/> 
        <pe:filebrowser name="FileBrowser" filter="*.jpg;*.dds;*.bmp;" rootfolder="Screen Shots" onclick="MyCompany.Apps.ScreenShot.SnapshotPage.OnSelectFile()"/>
        </div>
        </pe:tab-item> 
        </pe:tabs>
        </pe:mcml>
</body>
</html>

Detailed Documentation

Installation Instructions

Note: You do not need to install anything on the client to use this contrib package.

  • Download the ZIP file from the app web (see below)
  • Restart application

Application Info

Author: TWiki:Main/LiXizhi
Copyright ©: 2008 ParaEngine Corporation, All Rights Reserved
License: GPL (GNU General Public License)
Dependencies: none, OfficialApps
Version: 1.0
Change History:  
2008-04-29: Initial version
Home: ScreenShotApp
Feedback: ScreenShotAppDev
Appraisal: ScreenShotAppAppraisal?

Related Topics: InsidePE

-- TWiki:Main/LiXizhi - 2008-04-29

AppForm
TopicClassification NormalApp?
AppCategory Official
TestedOnPE? ParaEngineVersion01x00?
InstalledOnPE? Yes
DemoUrl? http://
DevelopedInSVN? No, Yes
ModificationPolicy? PleaseFeelFreeToModify?
RelatedTopics?

Topic attachments
I Attachment Action Size Date Who Comment
jpgjpg SnapshotFull.jpg manage 36.5 K 2008-04-29 - 16:59 LiXizhi taking an in-game snapshot
jpgjpg SnapshotLocalStore.jpg manage 30.7 K 2008-04-29 - 17:00 LiXizhi Snapshot local file UI
jpgjpg SnapshotSettingTab.jpg manage 16.1 K 2008-04-29 - 16:59 LiXizhi snapshot setting page UI
jpgjpg Snapshot_PreviewTab.jpg manage 26.5 K 2008-04-29 - 16:59 LiXizhi Preview page UI
Topic revision: r1 - 2008-04-29 - 17:13:08 - LiXizhi
 

ParaEngine Developer Network

This site is powered by the TWiki collaboration platformCopyright © 2004-2008 ParaEngine Corporation
Ideas, requests, problems regarding ParaEngine platform Send feedback