SettingsAppDev

description: 更改计算机的图形、声音、键盘等的设置

Contents:

Settings the preferences for Paraworld users, such as window resolution, graphics, sound, key board preferences.

Title Settings the preferences for Paraworld users, such as window resolution, graphics, sound, key board preferences.
Author(s) LiXizhi
Date 2008/1/28
File script/kids/3DMapSystemUI/Settings/app_main.lua

Description

show app setting page

an app can open its settings page using following command. If no app_key is specified, the current application desktop is used.

For example

   Map3DSystem.App.Commands.Call("File.Settings", {category="app", app_key = "profiles_GUID"});
   -- An application set its settings page in its UI connection event. 
   app:SetSettingPage("AvatarRegPage.html", "Avatar Settings Title");

show app File.Help

any app can open its help page using following command. If no app_key is specified, the current application desktop is used.

For example

   -- show the Help page for the currently active desktop
   Map3DSystem.App.Commands.Call("File.Help")
   -- show the Help page for a given app
   Map3DSystem.App.Commands.Call("File.Help", {app_key = "profiles_GUID"});
   -- An application set its help page in its UI connection event. 
   app:SetHelpPage("WelcomePage.html", "Avatar Help");

show app welcome page

An application can open a welcome page at its OnActivateDesktop? event handler. This is easily done by calling below
   -- display welcome page according to user preference
   Map3DSystem.App.Commands.Call("File.WelcomePage", {url="script/kids/3DMapSystemUI/MyDesktop/WelcomePage.html"})
   -- force display welcome page
   Map3DSystem.App.Commands.Call("File.WelcomePage", {url="script/kids/3DMapSystemUI/MyDesktop/WelcomePage.html", bShow=true})
   -- force hide welcome page
   Map3DSystem.App.Commands.Call("File.WelcomePage", {bShow=false})
It will automatically remember whether the user wants to show it again when desktop is switched to the app. One can force display even the user does not want to show it by adding the bShow property to the command parameter.

SendEmail?

   Map3DSystem.App.Commands.Call("File.SendEmail", {mailto="support@paraengine.com", subject="", body=""})

SubmitBug?

Show the submit bug dialog window.
   Map3DSystem.App.Commands.Call("File.SubmitBug")

db registration insert script INSERT INTO apps VALUES (NULL, 'Settings_GUID', 'Settings', '1.0.0', 'http://www.paraengine.com/apps/Settings_v1.zip', 'YourCompany', 'enUS', 'script/kids/3DMapSystemUI/Settings/IP.xml', '', 'script/kids/3DMapSystemUI/Settings/app_main.lua', 'Map3DSystem.App.Settings.MSGProc', 1);

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemUI/Settings/app_main.lua");

Member Functions

Map3DSystem.App.Settings.OnConnection

requires

create class commonlib.setfield("Map3DSystem.App.Settings", {});


event handlers

OnConnection? method is the obvious point to place your UI (menus, mainbars, tool buttons) through which the user will communicate to the app. This method is also the place to put your validation code if you are licensing the add-in. You would normally do this before putting up the UI. If the user is not a valid user, you would not want to put the UI into the IDE.

  • param app : the object representing the current application in the IDE.
  • param connectMode : type of Map3DSystem? .App.ConnectMode.

syntax

function Map3DSystem.App.Settings.OnConnection(app, connectMode)

parameters

app the object representing the current application in the IDE.
connectMode  

Map3DSystem.App.Settings.OnDisconnection

Receives notification that the Add-in is being unloaded.

syntax

function Map3DSystem.App.Settings.OnDisconnection(app, disconnectMode)

parameters

app  
disconnectMode  

Map3DSystem.App.Settings.OnQueryStatus

This is called when the command's availability is updated When the user clicks a command (menu or mainbar button), the QueryStatus? event is fired. The QueryStatus? event returns the current status of the specified named command, whether it is enabled, disabled, or hidden in the CommandStatus? parameter, which is passed to the msg by reference (or returned in the event handler).

  • param commandName : The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".
  • param statusWanted : what status of the command is queried. it is of type Map3DSystem? .App.CommandStatusWanted
  • return __ : returns according to statusWanted. it may return an integer by adding values in Map3DSystem? .App.CommandStatus.

syntax

function Map3DSystem.App.Settings.OnQueryStatus(app, commandName, statusWanted)

parameters

app  
commandName The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".
statusWanted  
return returns according to statusWanted. it may return an integer by adding values in Map3DSystem? .App.CommandStatus.

Map3DSystem.App.Settings.OnExec

This is called when the command is invoked.The Exec is fired after the QueryStatus? event is fired, assuming that the return to the statusOption parameter of QueryStatus? is supported and enabled. This is the event where you place the actual code for handling the response to the user click on the command.

  • param commandName : The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".

syntax

function Map3DSystem.App.Settings.OnExec(app, commandName, params)

parameters

app  
commandName The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".
params  

Map3DSystem.App.Settings.OnRenderBox

Change and render the 3D world with mcml data that is usually retrieved from the current user's profile page for this application.

syntax

function Map3DSystem.App.Settings.OnRenderBox(mcmlData)

parameters

mcmlData  

Map3DSystem.App.Settings.Navigate

called when the user wants to nagivate to the 3D world location relavent to this application

syntax

function Map3DSystem.App.Settings.Navigate()

Map3DSystem.App.Settings.GotoHomepage

called when user clicks to check out the homepage of this application. Homepage usually includes: developer info, support, developer worlds information, app global news, app updates, all community user rating, active users, trade, currency transfer, etc.

syntax

function Map3DSystem.App.Settings.GotoHomepage()

Map3DSystem.App.Settings.DoQuickAction

called when user clicks the quick action for this application.

syntax

function Map3DSystem.App.Settings.DoQuickAction()

Map3DSystem.App.Settings.MSGProc


client world database function helpers.


all related messages

APPS can be invoked in many ways: Through app Manager mainbar or menu command or buttons Command Line 3D World installed apps

syntax

function Map3DSystem.App.Settings.MSGProc(window, msg)

parameters

window  
msg  

code behind of CommonSettingPage?

Title code behind of CommonSettingPage?
Author(s) LiXizhi
Date 2008.8.23
File script/kids/3DMapSystemUI/Settings/CommonSettingPage.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemUI/Settings/CommonSettingPage.lua");

Member Functions

CommonSettingPage.OnInit

create class local CommonSettingPage? = {}; commonlib.setfield("Map3DSystem.App.Settings.CommonSettingPage", CommonSettingPage? );

init

syntax

function CommonSettingPage.OnInit()

CommonSettingPage.OnSaveGraphics

save settings.

syntax

function CommonSettingPage.OnSaveGraphics(name, values)

parameters

name  
values  

CommonSettingPage.OnSaveSounds

save settings.

syntax

function CommonSettingPage.OnSaveSounds(name, values)

parameters

name  
values  

CommonSettingPage.OnSaveControl

save settings.

syntax

function CommonSettingPage.OnSaveControl(name, values)

parameters

name  
values  

Paraworld setting dialog

Title Paraworld setting dialog
Author(s) LiXizhi
Date 2008/1/28
File script/kids/3DMapSystemUI/Settings/CommonSettingPanel_obsoleted.lua

Description

display common, advanced and per application settings. Per application settings is just an MCML page url which is specified by each app in the their connection function. To create an setting page for your application, just create an MCML file and assign it by calling app:SetSettingPage(filepath) at app start time. Note, the page must have one form node with one hidden or visible submit button in order for the outer apply button to work. However setting page with multiple submit needs to use their own submit button.

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemUI/Settings/Settings.lua");
Map3DSystem.App.Settings.Settings.ShowWnd(app);
Map3DSystem.App.Settings.Settings.Show(bShow, _parent, parentWindow)

-- other app can open an browser using this command with this app. 
Map3DSystem.App.Commands.Call("File.WebBrowser", url);

Member Functions

Map3DSystem.App.Settings.Settings.ShowWnd

common control library NPL.load("(gl)script/ide/integereditor_control.lua");

commonlib.setfield("Map3DSystem.App.Settings.Settings", {});

local MusicVolumeMin? = 0 local MusicVolumeMax? = 100

display the main inventory window for the current user.

  • param params : nil or a table of {category="app", app_key = "profiles_GUID"}

syntax

function Map3DSystem.App.Settings.Settings.ShowWnd(_app, params)

parameters

app  
params nil or a table of {category="app", app_key = "profiles_GUID"}

Map3DSystem.App.Settings.Settings.Show

  • param bShow : boolean to show or hide. if nil, it will toggle current setting.
  • param __ :_parent: parent window inside which the content is displayed. it can be nil.

syntax

function Map3DSystem.App.Settings.Settings.Show(bShow, _parent, parentWindow)

parameters

bShow boolean to show or hide. if nil, it will toggle current setting.
parent  
parentWindow  

Map3DSystem.App.Settings.Settings.OnDestroy

destory the control

syntax

function Map3DSystem.App.Settings.Settings.OnDestroy()

Map3DSystem.App.Settings.Settings.OnClose

close the window

syntax

function Map3DSystem.App.Settings.Settings.OnClose()

Map3DSystem.App.Settings.Settings.ShowCategoryPanel

show the right panel context for the current setting category. Call this function to switch to another setting UI.

  • param showUI :_callback: a function (bShow, _parent) end
  • param OnApply :_callback: this function is called when user clicked apply button. It may be nil.

syntax

function Map3DSystem.App.Settings.Settings.ShowCategoryPanel(showUI_callback, OnApply_callback)

parameters

showUI _callback: a function (bShow, _parent) end
callback  
OnApply  
callback  

Map3DSystem.App.Settings.Settings.OnShowCategoryNode

 a mapping from attribute to display name (needs localization)
local AttributeNameTranslations = {
   ["ClassID"] = "类ID",
   ["ClassName"] = "类名称",
   ["PrintMe"] = "打印帮助",
   -- camera
   ["NearPlane"] = "近平面(Near Plane)(米)",
   ["FarPlane"] = "远平面(Far Plane)(米)",
   ["FieldOfView"] = "视角(Field Of View)(弧度)",
   ["InvertPitch"] = "是否反转鼠标",
   ["SmoothFramesNum"] = "摄影机运动平滑帧数",
   ["Eye position"] = "眼睛位置(eye pos)",
   ["Lookat position"] = "观看位置(look pos)",
   ["AlwaysRun"] = "是否一直运动",
   ["Reset"] = "重置",
   ["FreeCameraMode"] = "自由摄影机模式",
   ["FollowMode"] = "跟随摄影机模式",
   ["MovementDrag"] = "是否启动移动拖拽",
   ["TotalDragTime"] = "拖拽总时间",
   ["KeyboardMovVelocity"] = "键盘操作的移动速度",
   ["KeyboardRotVelocity"] = "键盘操作的旋转速度",
   -- terrain
   ["IsModified"] = "是否更改了",
   ["RenderTerrain"] = "是否显示地貌",
   -- ocean
   ["DrawOcean"] = "是否显示海洋",
   ["WaterLevel"] = "海平面高度",
   ["OceanColor"] = "海水颜色",
   ["UnderWater"] = "是否在水下",
   ["WindSpeed"] = "风速",
   ["WindDirection"] = "风的方向(弧度)",
   
   ["EnableTerrainReflection"] = "启动地表反射",
   ["EnableMeshReflection"] = "启动物品反射",
   ["EnablePlayerReflection"] = "启动主角反射",
   ["EnableCharacterReflection"] = "启动人物反射",
   
   -- CSceneObject
   ["name"] = "名字",
   ["global"] = "是否为全局对象",
   ["facing"] = "朝向",
   ["position"] = "位置",
   ["render_tech"] = "渲染器(Shader)ID",
   ["progress"] = "建筑完成度",
   ["reset"] = "重置",
   ["FullScreenGlow"] = "是否启动全屏泛光",
   ["GlowIntensity"] = "泛光强度",
   ["GlowFactor"] = "泛光比例",
   ["Glowness"] = "泛光度",
   ["BackgroundColor"] = "背景色",
   ["OnClickDistance"] = "鼠标点击范围",
   ["AutoPlayerRipple"] = "是否显示人物水面涟漪",
   ["ShowHeadOnDisplay"] = "是否显示人物头顶文字",
   ["MaxHeadOnDisplayDistance"] = "最大头顶文字显示距离",
   ["EnableSunLight"] = "是否启动太阳光照",
   ["EnableLight"] = "是否启动光源",
   ["ShowLights"] = "是否显示灯光",
   ["MaxLightsNum"] = "同时显示的最大灯光数",
   ["SetShadow"] = "是否启动阴影渲染",
   ["MaxNumShadowCaster"] = "最大投影物体数",
   ["MaxNumShadowReceiver"] = "最大接受投影物体数",
   ["EnableFog"] = "是否启动雾",
   ["FogColor"] = "雾的颜色",
   ["FogStart"] = "起始雾化范围(米)",
   ["FogEnd"] = "结束雾化范围(米)",
   ["FogDensity"] = "雾的密度",
   ["MinPopUpDistance"] = "最小物体出现距离(米)",
   ["ShowSky"] = "是否显示天空",
   ["PasueScene"] = "冻结场景",
   ["EnableScene"] = "是否开启3D场景",
   ["ShowBoundingBox"] = "是否显示包围盒",
   ["GenerateReport"] = "是否显示报告",
   ["Save ReflectionMap"] = "保存反射贴图",
   ["Save ShadowMap"] = "保存影子贴图",
   ["Save GlowMap"] = "保存泛光贴图",
   -- sky
   ["SkyColor"] = "天空颜色",
   ["SkyMeshFile"] = "天空模型文件",
   ["SkyFogAngleFrom"] = "天空雾化起始角(弧度)",
   ["SkyFogAngleTo"] = "天空雾化结束角(弧度)",
   -- terrain tile
   ["IsEmpty"] = "是否为空",
   ["Size"] = "大小(米)",
   ["OnloadScript"] = "载入脚本",
   ["height map"] = "高度图",
   ["ConfigFile"] = "配置文件",
   ["Base Texture"] = "基层贴图",
   ["CommonTexture"] = "通用贴图",
   -- ParaEngine Setting
   ["script editor"] = "缺省脚本编辑器",
   ["Ctor Color"] = "创建物体时的颜色",
   ["Ctor Height"] = "创建物体时的高度",
   ["Ctor Speed"] = "创建物体的速度",
   ["Is Debugging"] = "是否为调试模式",
   ["Effect Level"] = "特效级别",
   
   ["Selection Color"] = "物体选择时的颜色",
   ["Is Editing"] = "是否为编辑模式",
   ["Locale"] = "当前语言",
   
   ["IsMouseInverse"] = "是否反转鼠标",
   ["WindowText"] = "窗口标题",
   ["IsFullScreenMode"] = "全屏显示",
   ["ScreenResolution"] = "分辨率",
   ["MultiSampleType"] = "反锯齿类型",
   ["MultiSampleQuality"] = "反锯齿质量",
   ["UpdateScreenMode"] = "更新3D设备",
   
   
   -- RPG Character
   ["persistent"] = "是否可以保存",
   ["Save"] = "保存",
   ["OnLoadScript"] = "载入脚本",
   ["IsLoaded"] = "是否已经载入",
   ["On_EnterSentientArea"] = "进入感知区的脚本(enter)",
   ["On_LeaveSentientArea"] = "离开感知区的脚本(leave)",
   ["On_Click"] = "点击时的脚本(client)",
   ["On_Event"] = "事件脚本",
   ["On_Perception"] = "感知的脚本(perception)",
   ["On_FrameMove"] = "每帧的脚本(frame move)",
   ["On_Net_Send"] = "网络发送的脚本",
   ["On_Net_Receive"] = "网络接受的脚本",
   ["Sentient"] = "是否有感知力",
   ["AlwaysSentient"] = "是否一直有感知力",
   ["Sentient Radius"] = "被感知半径(Sentient)",
   ["PerceptiveRadius"] = "感知半径(Perceptive)",
   ["GroupID"] = "感知组ID",
   ["SentientField"] = "感知域(Sentient Field)",
   ["Physics Radius"] = "物力半径",
   ["Size Scale"] = "放缩大小",
   ["Density"] = "密度",
   ["Speed Scale"] = "速度放缩",
   ["Animation ID"] = "动画ID",
   ["Dump BVH anims"] = "导出BVH动画",
   ["Character ID"] = "角色ID",
   ["Character type"] = "角色类型",
   ["state0"] = "状态0",
   ["state1"] = "状态1",
   ["state2"] = "状态2",
   ["state3"] = "状态3",
   ["life point"] = "生命值",
   ["Age"] = "年龄",
   ["Height"] = "高度",
   ["Weight"] = "宽度",
   ["Occupation"] = "职业",
   ["RaceSex"] = "种族 & 性别",
   ["Strength"] = "力量",
   ["Dexterity"] = "敏捷",
   ["Intelligence"] = "智力",
   ["Base Defense"] = "基本防御",
   ["Defense"] = "防御",
   ["Defense flat"] = "物理防御",
   ["Defense Mental"] = "魔法防御",
   ["Base Attack"] = "基本攻击",
   ["Attack Melee"] = "物理攻击",
   ["Attack Mental"] = "魔法攻击",
   ["Attack Ranged"] = "远程攻击",
   ["MaxLifeLoad"] = "最大生命值",
   ["Hero Points"] = "英雄点数",
}

Switch to display setting for a given page.

  • param category : "Common" or "app" or any ParaEngine Class name(such as "CSceneObject" or "CSkyMesh").
  • param app :_key: app_key if category is "app"

syntax

function Map3DSystem.App.Settings.Settings.OnShowCategoryNode(category, app_key)

parameters

category "Common" or "app" or any ParaEngine Class name(such as "CSceneObject" or "CSkyMesh").
app  
key  

Map3DSystem.App.Settings.Settings.OnClickCategoryNode

user clicks a category node, we shall show the UI for the category.

syntax

function Map3DSystem.App.Settings.Settings.OnClickCategoryNode(treeNode)

parameters

treeNode  

Map3DSystem.App.Settings.Settings.Panel_App_SettingPage


Per application setting page

show the mcml page for the current settings.

syntax

function Map3DSystem.App.Settings.Settings.Panel_App_SettingPage(bShow, _parent)

parameters

bShow  
parent  

Map3DSystem.App.Settings.Settings.OnApplyAppSettingPage

automatically find the form Node and call submit

syntax

function Map3DSystem.App.Settings.Settings.OnApplyAppSettingPage()

Map3DSystem.App.Settings.Settings.Panel_Advanced_DatabindingAttributes

--------------------------------------------------------
 advanced attribute categories: like 3D scene, camera, terrain, ocean, PE settings, etc. 
--------------------------------------------------------
 current attribute binding information
Map3DSystem.App.Settings.Settings.CurAdvancedAtt = {
   att = nil,
   bReadOnly = nil,
   fieldNames = nil,
   fieldTextReplaceables = nil,
}

the show UI callback for all advanced setting categories.

syntax

function Map3DSystem.App.Settings.Settings.Panel_Advanced_DatabindingAttributes(bShow, _parent)

parameters

bShow  
parent  

Map3DSystem.App.Settings.Settings.DataBindingFunc_CommonGeneral


Common setting categories: general graphics, sound, key&mouse etc,

syntax

function Map3DSystem.App.Settings.Settings.DataBindingFunc_CommonGeneral(dataMember, bIsWriting, value)

parameters

dataMember  
bIsWriting  
value  

Map3DSystem.App.Settings.Settings.UpdateBinding_CommonGeneral

update data binding for common general settings.

syntax

function Map3DSystem.App.Settings.Settings.UpdateBinding_CommonGeneral()

Map3DSystem.App.Settings.Settings.OnApplyCommonGeneral

call to apply changes in the commmon general setting category

syntax

function Map3DSystem.App.Settings.Settings.OnApplyCommonGeneral()

Paraworld setting dialog

Title Paraworld setting dialog
Author(s) LiXizhi
Date 2008/1/28
File script/kids/3DMapSystemUI/Settings/Settings.lua

Description

display common, advanced and per application settings. Per application settings is just an MCML page url which is specified by each app in the their connection function. To create an setting page for your application, just create an MCML file and assign it by calling app:SetSettingPage(filepath) at app start time. Note, the page must have one form node with one hidden or visible submit button in order for the outer apply button to work. However setting page with multiple submit needs to use their own submit button.

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemUI/Settings/Settings.lua");
Map3DSystem.App.Settings.Settings.ShowWnd(app);
Map3DSystem.App.Settings.Settings.Show(bShow, _parent, parentWindow)

-- other app can open an browser using this command with this app. 
Map3DSystem.App.Commands.Call("File.WebBrowser", url);

Member Functions

Map3DSystem.App.Settings.Settings.ShowWnd

common control library NPL.load("(gl)script/ide/integereditor_control.lua");

commonlib.setfield("Map3DSystem.App.Settings.Settings", {});

local MusicVolumeMin? = 0 local MusicVolumeMax? = 100

display the main inventory window for the current user.

  • param params : nil or a table of {category="app", app_key = "profiles_GUID"}

syntax

function Map3DSystem.App.Settings.Settings.ShowWnd(_app, params)

parameters

app  
params nil or a table of {category="app", app_key = "profiles_GUID"}

Map3DSystem.App.Settings.Settings.Show

  • param bShow : boolean to show or hide. if nil, it will toggle current setting.
  • param __ :_parent: parent window inside which the content is displayed. it can be nil.

syntax

function Map3DSystem.App.Settings.Settings.Show(bShow, _parent, parentWindow)

parameters

bShow boolean to show or hide. if nil, it will toggle current setting.
parent  
parentWindow  

Map3DSystem.App.Settings.Settings.OnDestroy

destory the control

syntax

function Map3DSystem.App.Settings.Settings.OnDestroy()

Map3DSystem.App.Settings.Settings.OnClose

close the window

syntax

function Map3DSystem.App.Settings.Settings.OnClose()

Map3DSystem.App.Settings.Settings.ShowCategoryPanel

show the right panel context for the current setting category. Call this function to switch to another setting UI.

  • param showUI :_callback: a function (bShow, _parent) end
  • param OnApply :_callback: this function is called when user clicked apply button. It may be nil.

syntax

function Map3DSystem.App.Settings.Settings.ShowCategoryPanel(showUI_callback, OnApply_callback)

parameters

showUI _callback: a function (bShow, _parent) end
callback  
OnApply  
callback  

Map3DSystem.App.Settings.Settings.OnShowCategoryNode

 a mapping from attribute to display name (needs localization)
local AttributeNameTranslations = {
   ["ClassID"] = "类ID",
   ["ClassName"] = "类名称",
   ["PrintMe"] = "打印帮助",
   -- camera
   ["NearPlane"] = "近平面(Near Plane)(米)",
   ["FarPlane"] = "远平面(Far Plane)(米)",
   ["FieldOfView"] = "视角(Field Of View)(弧度)",
   ["InvertPitch"] = "是否反转鼠标",
   ["SmoothFramesNum"] = "摄影机运动平滑帧数",
   ["Eye position"] = "眼睛位置(eye pos)",
   ["Lookat position"] = "观看位置(look pos)",
   ["AlwaysRun"] = "是否一直运动",
   ["Reset"] = "重置",
   ["FreeCameraMode"] = "自由摄影机模式",
   ["FollowMode"] = "跟随摄影机模式",
   ["MovementDrag"] = "是否启动移动拖拽",
   ["TotalDragTime"] = "拖拽总时间",
   ["KeyboardMovVelocity"] = "键盘操作的移动速度",
   ["KeyboardRotVelocity"] = "键盘操作的旋转速度",
   -- terrain
   ["IsModified"] = "是否更改了",
   ["RenderTerrain"] = "是否显示地貌",
   -- ocean
   ["DrawOcean"] = "是否显示海洋",
   ["WaterLevel"] = "海平面高度",
   ["OceanColor"] = "海水颜色",
   ["UnderWater"] = "是否在水下",
   ["WindSpeed"] = "风速",
   ["WindDirection"] = "风的方向(弧度)",
   
   ["EnableTerrainReflection"] = "启动地表反射",
   ["EnableMeshReflection"] = "启动物品反射",
   ["EnablePlayerReflection"] = "启动主角反射",
   ["EnableCharacterReflection"] = "启动人物反射",
   
   -- CSceneObject
   ["name"] = "名字",
   ["global"] = "是否为全局对象",
   ["facing"] = "朝向",
   ["position"] = "位置",
   ["render_tech"] = "渲染器(Shader)ID",
   ["progress"] = "建筑完成度",
   ["reset"] = "重置",
   ["FullScreenGlow"] = "是否启动全屏泛光",
   ["GlowIntensity"] = "泛光强度",
   ["GlowFactor"] = "泛光比例",
   ["Glowness"] = "泛光度",
   ["BackgroundColor"] = "背景色",
   ["OnClickDistance"] = "鼠标点击范围",
   ["AutoPlayerRipple"] = "是否显示人物水面涟漪",
   ["ShowHeadOnDisplay"] = "是否显示人物头顶文字",
   ["MaxHeadOnDisplayDistance"] = "最大头顶文字显示距离",
   ["EnableSunLight"] = "是否启动太阳光照",
   ["EnableLight"] = "是否启动光源",
   ["ShowLights"] = "是否显示灯光",
   ["MaxLightsNum"] = "同时显示的最大灯光数",
   ["SetShadow"] = "是否启动阴影渲染",
   ["MaxNumShadowCaster"] = "最大投影物体数",
   ["MaxNumShadowReceiver"] = "最大接受投影物体数",
   ["EnableFog"] = "是否启动雾",
   ["FogColor"] = "雾的颜色",
   ["FogStart"] = "起始雾化范围(米)",
   ["FogEnd"] = "结束雾化范围(米)",
   ["FogDensity"] = "雾的密度",
   ["MinPopUpDistance"] = "最小物体出现距离(米)",
   ["ShowSky"] = "是否显示天空",
   ["PasueScene"] = "冻结场景",
   ["EnableScene"] = "是否开启3D场景",
   ["ShowBoundingBox"] = "是否显示包围盒",
   ["GenerateReport"] = "是否显示报告",
   ["Save ReflectionMap"] = "保存反射贴图",
   ["Save ShadowMap"] = "保存影子贴图",
   ["Save GlowMap"] = "保存泛光贴图",
   -- sky
   ["SkyColor"] = "天空颜色",
   ["SkyMeshFile"] = "天空模型文件",
   ["SkyFogAngleFrom"] = "天空雾化起始角(弧度)",
   ["SkyFogAngleTo"] = "天空雾化结束角(弧度)",
   -- terrain tile
   ["IsEmpty"] = "是否为空",
   ["Size"] = "大小(米)",
   ["OnloadScript"] = "载入脚本",
   ["height map"] = "高度图",
   ["ConfigFile"] = "配置文件",
   ["Base Texture"] = "基层贴图",
   ["CommonTexture"] = "通用贴图",
   -- ParaEngine Setting
   ["script editor"] = "缺省脚本编辑器",
   ["Ctor Color"] = "创建物体时的颜色",
   ["Ctor Height"] = "创建物体时的高度",
   ["Ctor Speed"] = "创建物体的速度",
   ["Is Debugging"] = "是否为调试模式",
   ["Effect Level"] = "特效级别",
   
   ["Selection Color"] = "物体选择时的颜色",
   ["Is Editing"] = "是否为编辑模式",
   ["Locale"] = "当前语言",
   
   ["IsMouseInverse"] = "是否反转鼠标",
   ["WindowText"] = "窗口标题",
   ["IsFullScreenMode"] = "全屏显示",
   ["ScreenResolution"] = "分辨率",
   ["MultiSampleType"] = "反锯齿类型",
   ["MultiSampleQuality"] = "反锯齿质量",
   ["UpdateScreenMode"] = "更新3D设备",
   
   
   -- RPG Character
   ["persistent"] = "是否可以保存",
   ["Save"] = "保存",
   ["OnLoadScript"] = "载入脚本",
   ["IsLoaded"] = "是否已经载入",
   ["On_EnterSentientArea"] = "进入感知区的脚本(enter)",
   ["On_LeaveSentientArea"] = "离开感知区的脚本(leave)",
   ["On_Click"] = "点击时的脚本(client)",
   ["On_Event"] = "事件脚本",
   ["On_Perception"] = "感知的脚本(perception)",
   ["On_FrameMove"] = "每帧的脚本(frame move)",
   ["On_Net_Send"] = "网络发送的脚本",
   ["On_Net_Receive"] = "网络接受的脚本",
   ["Sentient"] = "是否有感知力",
   ["AlwaysSentient"] = "是否一直有感知力",
   ["Sentient Radius"] = "被感知半径(Sentient)",
   ["PerceptiveRadius"] = "感知半径(Perceptive)",
   ["GroupID"] = "感知组ID",
   ["SentientField"] = "感知域(Sentient Field)",
   ["Physics Radius"] = "物力半径",
   ["Size Scale"] = "放缩大小",
   ["Density"] = "密度",
   ["Speed Scale"] = "速度放缩",
   ["Animation ID"] = "动画ID",
   ["Dump BVH anims"] = "导出BVH动画",
   ["Character ID"] = "角色ID",
   ["Character type"] = "角色类型",
   ["state0"] = "状态0",
   ["state1"] = "状态1",
   ["state2"] = "状态2",
   ["state3"] = "状态3",
   ["life point"] = "生命值",
   ["Age"] = "年龄",
   ["Height"] = "高度",
   ["Weight"] = "宽度",
   ["Occupation"] = "职业",
   ["RaceSex"] = "种族 & 性别",
   ["Strength"] = "力量",
   ["Dexterity"] = "敏捷",
   ["Intelligence"] = "智力",
   ["Base Defense"] = "基本防御",
   ["Defense"] = "防御",
   ["Defense flat"] = "物理防御",
   ["Defense Mental"] = "魔法防御",
   ["Base Attack"] = "基本攻击",
   ["Attack Melee"] = "物理攻击",
   ["Attack Mental"] = "魔法攻击",
   ["Attack Ranged"] = "远程攻击",
   ["MaxLifeLoad"] = "最大生命值",
   ["Hero Points"] = "英雄点数",
}

Switch to display setting for a given page.

  • param category : "Common" or "app" or any ParaEngine Class name(such as "CSceneObject" or "CSkyMesh").
  • param app :_key: app_key if category is "app"

syntax

function Map3DSystem.App.Settings.Settings.OnShowCategoryNode(category, app_key)

parameters

category "Common" or "app" or any ParaEngine Class name(such as "CSceneObject" or "CSkyMesh").
app  
key  

Map3DSystem.App.Settings.Settings.OnClickCategoryNode

user clicks a category node, we shall show the UI for the category.

syntax

function Map3DSystem.App.Settings.Settings.OnClickCategoryNode(treeNode)

parameters

treeNode  

Map3DSystem.App.Settings.Settings.Panel_App_SettingPage


Per application setting page

show the mcml page for the current settings.

syntax

function Map3DSystem.App.Settings.Settings.Panel_App_SettingPage(bShow, _parent)

parameters

bShow  
parent  

Map3DSystem.App.Settings.Settings.OnApplyAppSettingPage

automatically find the form Node and call submit

syntax

function Map3DSystem.App.Settings.Settings.OnApplyAppSettingPage()

Map3DSystem.App.Settings.Settings.Panel_Advanced_DatabindingAttributes

--------------------------------------------------------
 advanced attribute categories: like 3D scene, camera, terrain, ocean, PE settings, etc. 
--------------------------------------------------------
 current attribute binding information
Map3DSystem.App.Settings.Settings.CurAdvancedAtt = {
   att = nil,
   bReadOnly = nil,
   fieldNames = nil,
   fieldTextReplaceables = nil,
}

the show UI callback for all advanced setting categories.

syntax

function Map3DSystem.App.Settings.Settings.Panel_Advanced_DatabindingAttributes(bShow, _parent)

parameters

bShow  
parent  

Map3DSystem.App.Settings.Settings.MSGProc


Common setting categories: general graphics, sound, key&mouse etc,

syntax

function Map3DSystem.App.Settings.Settings.MSGProc(window, msg)

parameters

window  
msg  

code behind of SubmitBugPage? .html

Title code behind of SubmitBugPage? .html
Author(s) LiXizhi
Date 2008.8.29
File script/kids/3DMapSystemUI/Settings/SubmitBugPage.lua

Description

submit bug via email

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemUI/Settings/SubmitBugPage.lua");
script/kids/3DMapSystemUI/Settings/SubmitBugPage.html?mailto=support@paraengine.com&subject=bug&body=hi

Member Functions

SubmitBugPage.OnInit

create class local SubmitBugPage? = {}; commonlib.setfield("Map3DSystem.App.Settings.SubmitBugPage", SubmitBugPage? );

init

syntax

function SubmitBugPage.OnInit()

code behind of welcome page

Title code behind of welcome page
Author(s) LiXizhi
Date 2008.6.16
File script/kids/3DMapSystemUI/Settings/WelcomePage.lua

Description

a common welcome page that all application can use to display an application welcome page that only shows to the user for the first time. the user can click whether the application will show up the next time the application is switched to.

Page redirect

Any application also display this mcml page with a redirect url that when the user clicks OK button, the current page will be redirected to it.
script/kids/3DMapSystemUI/Settings/WelcomePage.html?url=ContentPage&redirect=RedirectPage&autoredirect=true
if the autoredirect is true, it will automatically redirect to a page when the user has previously canceled content url page

if redirect page is not specified it will close the window call calling the "File.WelcomePage" command.

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemUI/Settings/WelcomePage.lua");
script/kids/3DMapSystemUI/Settings/WelcomePage.html?appkey=Creator_GUID&url=the mcml page url containing the welcome page for a given application.

Member Functions

WelcomePage.OnInit

create class local WelcomePage? = {}; commonlib.setfield("Map3DSystem.App.Settings.WelcomePage", WelcomePage? );

init

syntax

function WelcomePage.OnInit()

WelcomePage.SaveSettings

save welcome page settings.

  • param filepath : world path

syntax

function WelcomePage.SaveSettings(bDonotShowNextTime)

parameters

bDonotShowNextTime  
Topic revision: r1 - 2008-02-29 - 15:26:12 - 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