AssetsAppDev
description: 用户可以上传和使用图片相册、3D模型,并和朋友共享。用户可以将图片和3D模型有选择的加入到自己的创作工具栏中,在3D世界中使用。应用程序开发者也可以将资源发布到自己的应用程序首页,推荐给应用程序的用户。
Assets app for Paraworld
| Title |
Assets app for Paraworld |
| Author(s) |
LiXizhi |
| Date |
2008/1/31 |
| File |
script/kids/3DMapSystemApp/Assets/app_main.lua |
Description
db registration insert script
INSERT INTO apps VALUES (NULL, 'Assets_GUID', 'Assets', '1.0.0', 'http://www.paraengine.com/apps/Assets_v1.zip', 'YourCompany', 'enUS', 'script/kids/3DMapSystemApp/Assets/IP.xml', '', 'script/kids/3DMapSystemApp/Assets/app_main.lua', 'Map3DSystem.App.Assets.MSGProc', 1);
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/app_main.lua");
Member Functions
Map3DSystem.App.Assets.OnConnection
requires
create class
commonlib.setfield("Map3DSystem.App.Assets", {});
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.Assets.OnConnection(app, connectMode)
parameters
| app |
the object representing the current application in the IDE. |
| connectMode |
|
Map3DSystem.App.Assets.OnDisconnection
Receives notification that the Add-in is being unloaded.
syntax
function Map3DSystem.App.Assets.OnDisconnection(app, disconnectMode)
parameters
Map3DSystem.App.Assets.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.Assets.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.Assets.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.Assets.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.Assets.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.Assets.OnRenderBox(mcmlData)
parameters
Map3DSystem.App.Assets.Navigate
called when the user wants to nagivate to the 3D world location relavent to this application
syntax
function Map3DSystem.App.Assets.Navigate()
Map3DSystem.App.Assets.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.Assets.GotoHomepage()
Map3DSystem.App.Assets.DoQuickAction
called when user clicks the quick action for this application.
syntax
function Map3DSystem.App.Assets.DoQuickAction()
Map3DSystem.App.Assets.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.Assets.MSGProc(window, msg)
parameters
asset definition for asset, folder, package
| Title |
asset definition for asset, folder, package |
| Author(s) |
LiXizhi |
| Date |
2008/1/31 |
| File |
script/kids/3DMapSystemApp/Assets/AssetData.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetData.lua");
-- only included in asset manager
Member Functions
Map3DSystem.App.Assets.asset:new
common control library
NPL.load("(gl)script/ide/common_control.lua");
---- requires its Map3DSystem.UI.Creation.GetObjParamsFromAsset
NPL.load("(gl)script/kids/3DMapSystemUI/InGame/Creation.lua");
requires its Map3DSystem.UI.Creator.GetObjParamsFromAsset
NPL.load("(gl)script/kids/3DMapSystemUI/Creator/Main.lua");
Map3DSystem.App.Assets.AssetStatus = {
-- only a local copy of the asset
Local = nil,
-- a remote reference of the asset. The asset is not found in local disk
Remote = 1,
-- local and remote copy are identical
Sync = 2,
-- there is a difference between local copy and remote copy. Either overwrite from remote or update to remote.
Diff = 3,
};
a mapping from predefined category prefix to category text.
Map3DSystem.App.Assets.CategoryMap = {
["Creations.BCS.doors"] = "创建.建筑部件.门",
["Creations.NormalModels.trees"] = "创建.模型.树",
-- TODO: add more here: this should be the same as in the main bar
}
--------------------------------------
an asset template
--------------------------------------
Map3DSystem.App.Assets.asset = {
-- model or texture relative-to-root file path, this is the only required field.
filename = nil,
-- text to be displayed. if nil, default to ParaIO.GetFileName(filename)
text = nil,
-- default to "<filepath>.png", if filepath is not an image file.
icon = nil,
Price = nil,
Reserved1 = nil,
Reserved2 = nil,
Reserved3 = nil,
Reserved4 = nil,
};
create a new asset. the asset's filename must not be nil.
syntax
function Map3DSystem.App.Assets.asset:new(o)
parameters
Map3DSystem.App.Assets.asset:ToItem
convert this asset to the item format. item format is the internal format used by the Creator integration point.
syntax
function Map3DSystem.App.Assets.asset:ToItem()
Map3DSystem.App.Assets.asset:getModelParams
it will return the objParams if it is a model or character asset, otherwise it will return nil.
syntax
function Map3DSystem.App.Assets.asset:getModelParams()
Map3DSystem.App.Assets.asset:getImageFile
it will return the image file name if it is a texture asset, otherwise it will return nil.
syntax
function Map3DSystem.App.Assets.asset:getImageFile()
Map3DSystem.App.Assets.folder:new
--------------------------------------
a folder template
--------------------------------------
Map3DSystem.App.Assets.folder = {
-- working directory of the folder. this is the only required field. it should ends with /
filename = nil,
-- a string or an array of strings. each one is a file extension.
fileExt = {"*.x", "*.xml", "*.png", "*.jpg",},
};
create a new asset. the asset's filename must not be nil.
syntax
function Map3DSystem.App.Assets.folder:new(o)
parameters
Map3DSystem.App.Assets.Package:new
create a new Package
syntax
function Map3DSystem.App.Assets.Package:new(o)
parameters
Map3DSystem.App.Assets.Package:ClearAll
clear all objects
syntax
function Map3DSystem.App.Assets.Package:ClearAll()
Map3DSystem.App.Assets.Package:AddAsset
add a new asset to the asset list. if the asset.filename already exist, it will update the existing one.
return the asset and its index in the package
syntax
function Map3DSystem.App.Assets.Package:AddAsset(asset)
parameters
Map3DSystem.App.Assets.Package:RemoveAsset
remove an asset from the package by a given asset filename
syntax
function Map3DSystem.App.Assets.Package:RemoveAsset(filename)
parameters
Map3DSystem.App.Assets.Package:GetAsset
get an asset from the package by a given asset filename
return the asset and its index in the package. return nil,nil if not found.
syntax
function Map3DSystem.App.Assets.Package:GetAsset(filename)
parameters
Map3DSystem.App.Assets.Package:AddFolder
add a new folder to the folder list. if the folder.filename already exist, it will update the existing one.
return the folder and its index in the package
syntax
function Map3DSystem.App.Assets.Package:AddFolder(folder)
parameters
Map3DSystem.App.Assets.Package:RemoveFolder
remove an folder from the package by a given folder filename
syntax
function Map3DSystem.App.Assets.Package:RemoveFolder(filename)
parameters
Map3DSystem.App.Assets.Package:GetFolder
get an folder from the package by a given folder filename
return the folder and its index in the package. return nil,nil if not found.
syntax
function Map3DSystem.App.Assets.Package:GetFolder(filename)
parameters
Advanced asset manager window
| Title |
Advanced asset manager window |
| Author(s) |
LiXizhi |
| Date |
2008/1/31 |
| File |
script/kids/3DMapSystemApp/Assets/AssetManager.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetManager.lua");
Map3DSystem.App.Assets.ShowAssetManager(_app)
Member Functions
Map3DSystem.App.Assets.AddPackage
common control library
NPL.load("(gl)script/ide/common_control.lua");
commonlib.setfield("Map3DSystem.App.Assets.AssetManager", {});
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetData.lua");
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetProvider.lua");
a list of packages to be displayed by the current asset manager window
Map3DSystem? .App.Assets.AssetManager.Packages = {};
the currently selected package
Map3DSystem? .App.Assets.AssetManager.CurPak = nil;
add package to the package list. It does not update UI.
syntax
function Map3DSystem.App.Assets.AddPackage(package)
parameters
Map3DSystem.App.Assets.ShowAssetManager
UI stuffs
display the package window.
syntax
function Map3DSystem.App.Assets.ShowAssetManager(_app)
parameters
Map3DSystem.App.Assets.AssetManager.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.Assets.AssetManager.Show(bShow, _parent, parentWindow)
parameters
| bShow |
boolean to show or hide. if nil, it will toggle current setting. |
| parent |
|
| parentWindow |
|
Map3DSystem.App.Assets.AssetManager.DrawAssetsNodeHandler
owner draw function to treeViewAssetsNodeList
syntax
function Map3DSystem.App.Assets.AssetManager.DrawAssetsNodeHandler(_parent, treeNode)
parameters
Map3DSystem.App.Assets.AssetManager.OnDestroy
destory the control
syntax
function Map3DSystem.App.Assets.AssetManager.OnDestroy()
Map3DSystem.App.Assets.AssetManager.UpdateComboBoxSelectPkg
update UI functions
update the select package combo box
syntax
function Map3DSystem.App.Assets.AssetManager.UpdateComboBoxSelectPkg()
Map3DSystem.App.Assets.AssetManager.RebuildAssetsTreeView
private: rebuild the package tree view according to the current package 's assets
syntax
function Map3DSystem.App.Assets.AssetManager.RebuildAssetsTreeView()
Map3DSystem.App.Assets.SelectPackage
methods
select a package as the current package and display its
AssetManager? .
when a package is (de)selected, it will (un)hook object creation events.
- param package : the package object to be selected. if nil, nothing will be selected.
syntax
function Map3DSystem.App.Assets.SelectPackage(package)
parameters
| package |
the package object to be selected. if nil, nothing will be selected. |
Map3DSystem.App.Assets.AssetManager.OnClickCreatePackage
tree view event handlers
user clicked to create a new package
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickCreatePackage()
Map3DSystem.App.Assets.AssetManager.OnSelectPackage
user clicked to display a given package
syntax
function Map3DSystem.App.Assets.AssetManager.OnSelectPackage(sCtrlName, item)
parameters
Map3DSystem.App.Assets.AssetManager.AddNewAsset
user clicks to add a new asset to the current package
syntax
function Map3DSystem.App.Assets.AssetManager.AddNewAsset()
Map3DSystem.App.Assets.AssetManager.AddNewFolder
user clicks to add a new folder.
syntax
function Map3DSystem.App.Assets.AssetManager.AddNewFolder()
Map3DSystem.App.Assets.AssetManager.OnClickAssetsNode
user clicked to edit or show an asset node.
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickAssetsNode(treeNode)
parameters
Map3DSystem.App.Assets.AssetManager.OnClickDeleteAssetNode
user clicks to delete an asset node
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickDeleteAssetNode(sCtrlName, nodePath)
parameters
Map3DSystem.App.Assets.AssetManager.OnClickRefreshAssetNode
user clicks to refresh an asset node
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickRefreshAssetNode(sCtrlName, nodePath)
parameters
Map3DSystem.App.Assets.AssetManager.OnClickDeleteFolderNode
user clicks to delete an asset node
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickDeleteFolderNode(sCtrlName, nodePath)
parameters
Map3DSystem.App.Assets.AssetManager.OnClickRefreshFolderNode
user clicks to refresh a folder or directory node
- param bDoNotUpdate : if true ctl:Update() is not called.
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickRefreshFolderNode(sCtrlName, nodePath, bDoNotUpdate)
parameters
| sCtrlName |
|
| nodePath |
|
| bDoNotUpdate |
if true ctl:Update() is not called. |
Map3DSystem.App.Assets.AssetManager.RefreshFolderNode
refresh a given folder or directory node.
- param bRefreshChild : whether to refresh child node. return true if refreshed
syntax
function Map3DSystem.App.Assets.AssetManager.RefreshFolderNode(node, bRefreshChild)
parameters
|
bRefreshChild | whether to refresh child node.
return true if refreshed |
Map3DSystem.App.Assets.AssetManager.OnClickFullExpandFolderNode
refresh all child nodes.
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickFullExpandFolderNode(sCtrlName, nodePath)
parameters
Map3DSystem.App.Assets.AssetManager.OnClickToggleFolderNode
toggle display. it will refresh node on nodes that does not have children.
so that folder hierachy is dynamically built with user interactions.
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickToggleFolderNode(sCtrlName, nodePath)
parameters
Map3DSystem.App.Assets.AssetManager.OnCheckFileNode
user checks a file in the folder to include/exclude from the assets
syntax
function Map3DSystem.App.Assets.AssetManager.OnCheckFileNode(sCtrlName, nodePath)
parameters
Map3DSystem.App.Assets.AssetManager.OnClickEditPackage
user clicks to edit the current package
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickEditPackage()
Map3DSystem.App.Assets.AssetManager.OnClickSavePackage
user clicks to save the current package
save the package to file and optional publish it to app server.
syntax
function Map3DSystem.App.Assets.AssetManager.OnClickSavePackage()
Providing asset data from file or remote server
| Title |
Providing asset data from file or remote server |
| Author(s) |
LiXizhi |
| Date |
2008/1/31 |
| File |
script/kids/3DMapSystemApp/Assets/AssetProvider.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetProvider.lua");
-- only included in asset manager
Member Functions
Map3DSystem.App.Assets.CreatePackage
common control library
NPL.load("(gl)script/ide/common_control.lua");
create a new package. One can later call
SelectPackage? to select it by UI.
- param package : partial class of Map3DSystem? .App.Assets.Package. if package is nil, a default one at the current player position will be created. otherwise, the caller can specify where to create the package and how big is the construction site.
- return return : the package object created.
syntax
function Map3DSystem.App.Assets.CreatePackage(package)
parameters
|
package | partial class of
Map3DSystem? .App.Assets.Package. if package is nil, a default one at the current player position will be created.
otherwise, the caller can specify where to create the package and how big is the construction site. |
Map3DSystem.App.Assets.LoadPackageFromFile
load package from file. it returned the package object. it may return nil if failed.
syntax
function Map3DSystem.App.Assets.LoadPackageFromFile(filename)
parameters
Map3DSystem.App.Assets.LoadAllLocalPackages
local all local packages in the asset application directory to
Map3DSystem? .App.Assets.Packages array
syntax
function Map3DSystem.App.Assets.LoadAllLocalPackages()
Map3DSystem.App.Assets.SaveAsLocalPackage
save a local package in the asset application directory
- param filename : if nil, the package.Category + ".asset" is used as the file name
- return return : the filename if succeed, otherwise return nil.
syntax
function Map3DSystem.App.Assets.SaveAsLocalPackage(package, filename)
parameters
| package |
|
| filename |
if nil, the package.Category + ".asset" is used as the file name |
asset view control: For previewing and editing asset properties. it is shown on the right side of asset manager window
| Title |
asset view control: For previewing and editing asset properties. it is shown on the right side of asset manager window |
| Author(s) |
LiXizhi |
| Date |
2008/1/31 |
| File |
script/kids/3DMapSystemApp/Assets/AssetViewCtl.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetViewCtl.lua");
Map3DSystem.App.Assets.AssetViewCtl.Show(_parent)
Map3DSystem.App.Assets.AssetViewCtl.Update(asset)
Member Functions
Map3DSystem.App.Assets.AssetViewCtl.Show
the current binding
local bindingContext;
display the preview control.
syntax
function Map3DSystem.App.Assets.AssetViewCtl.Show(_parent)
parameters
Map3DSystem.App.Assets.AssetViewCtl.Update
binding an asset object to the
AssetViewCtl?
syntax
function Map3DSystem.App.Assets.AssetViewCtl.Update(asset)
parameters
Map3DSystem.App.Assets.AssetViewCtl.OnClickAddToScene
event handlers
User clicks to add the current object to the scene
syntax
function Map3DSystem.App.Assets.AssetViewCtl.OnClickAddToScene()
Map3DSystem.App.Assets.AssetViewCtl.OnClickSaveThumbNail
User clicks to create a thumbnail image for the current asset
syntax
function Map3DSystem.App.Assets.AssetViewCtl.OnClickSaveThumbNail()
create and edit package dialog.
| Title |
create and edit package dialog. |
| Author(s) |
LiXizhi |
| Date |
2008/1/31 |
| File |
script/kids/3DMapSystemApp/Assets/DlgPackage.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/DlgPackage.lua");
Map3DSystem.App.Assets.ShowCreatePackageDlg()
Map3DSystem.App.Assets.ShowEditPackageDlg(package)
Member Functions
Map3DSystem.App.Assets.ShowCreatePackageDlg
current package binding context
local bindingContext;
show the create package dialog
syntax
function Map3DSystem.App.Assets.ShowCreatePackageDlg()
Map3DSystem.App.Assets.ShowEditPackageDlg
show the edit package dialog
syntax
function Map3DSystem.App.Assets.ShowEditPackageDlg(package)
parameters
Map3DSystem.App.Assets.CreateEditPackageDlg
create the dialog
syntax
function Map3DSystem.App.Assets.CreateEditPackageDlg(_parent)
parameters
code behind page for ModelBrowserPage? .html
| Title |
code behind page for ModelBrowserPage? .html |
| Author(s) |
LiXizhi |
| Date |
2008/4/25 |
| File |
script/kids/3DMapSystemApp/Assets/ModelBrowserPage.lua |
Description
pick an model and add it to scene.
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/ModelBrowserPage.lua");
Member Functions
ModelBrowserPage.OnInit
require to use
Map3DSystem? .App.Assets.asset
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetData.lua");
local
ModelBrowserPage? = {};
commonlib.setfield("Map3DSystem.App.Assets.ModelBrowserPage",
ModelBrowserPage? )
page event handlers
first time init page
syntax
function ModelBrowserPage.OnInit()
ModelBrowserPage.OnSelectFile
User clicks a file
syntax
function ModelBrowserPage.OnSelectFile(name, filepath)
parameters
ModelBrowserPage.OnDoubleClickFile
user doublle clicks a file, it will select it and add it to scene.
syntax
function ModelBrowserPage.OnDoubleClickFile(name, filepath)
parameters
ModelBrowserPage.OnSelectFolder
user selects a new folder
syntax
function ModelBrowserPage.OnSelectFolder(name, folderPath)
parameters
ModelBrowserPage.OnSelectFilter
user selects a new filter
syntax
function ModelBrowserPage.OnSelectFilter(name, filter)
parameters
ModelBrowserPage.OnClickAddToScene
add the current model to file.
syntax
function ModelBrowserPage.OnClickAddToScene()
ModelBrowserPage.OnClickAddToScene_internal
private function
- param silentMode : : if true no UI alert is displayed.
syntax
function ModelBrowserPage.OnClickAddToScene_internal(silentMode)
parameters
| silentMode |
if true no UI alert is displayed. |
ModelBrowserPage.OnClickRefreshPreview
refresh the current page.
syntax
function ModelBrowserPage.OnClickRefreshPreview()
ModelBrowserPage.OnClickRefreshPreview_Internal
private function
- param silentMode : : if true no UI alert is displayed.
syntax
function ModelBrowserPage.OnClickRefreshPreview_Internal(silentMode)
parameters
| silentMode |
if true no UI alert is displayed. |
Map3DSystem.App.Assets.ModelBrowserPage.OnClickTakeSnapShot
take snapshot
syntax
function Map3DSystem.App.Assets.ModelBrowserPage.OnClickTakeSnapShot()
code behind page for PackageMakerPage? .html
| Title |
code behind page for PackageMakerPage? .html |
| Author(s) |
LiXizhi |
| Date |
2008/5/6 |
| File |
script/kids/3DMapSystemApp/Assets/PackageMakerPage.lua |
Description
make a zip package
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/PackageMakerPage.lua");
Member Functions
PackageMakerPage.OnInit
page event handlers
first time init page
syntax
function PackageMakerPage.OnInit()
PackageMakerPage.OnCreatePackage
Create package
syntax
function PackageMakerPage.OnCreatePackage(name, values)
parameters
PackageMakerPage.OnCreatePackage_imp
return true if created successfully
syntax
function PackageMakerPage.OnCreatePackage_imp(filepath,packageName,packagePath,packageVersion)
parameters
| filepath |
|
| packageName |
|
| packagePath |
|
| packageVersion |
|
PackageMakerPage.OnSelectFile
User clicks a file
syntax
function PackageMakerPage.OnSelectFile(name, filepath)
parameters
PackageMakerPage.OnSelectFolder
user selects a new folder
syntax
function PackageMakerPage.OnSelectFolder(name, folderPath)
parameters
PackageMakerPage.OnSelectFilter
user selects a new filter
syntax
function PackageMakerPage.OnSelectFilter(name, filter)
parameters
PackageMakerPage.OnCreateFileNode
when a file node created. we can modify its display to give some hints, such as
1. whether the file is being used by the system or not.
1. whether the file is previously included by the system or not
syntax
function PackageMakerPage.OnCreateFileNode(name, treeNode, filepath)
parameters
PackageMakerPage.OnClickRefreshFileInUse
refresh the file currently in used.
syntax
function PackageMakerPage.OnClickRefreshFileInUse(name, values)
parameters
PackageMakerPage.GetPrintList
获取要打印的列表
syntax
function PackageMakerPage.GetPrintList()
PackageMakerPage.UpdateFloderMembersTreeView
显示选中文件夹中 被引擎使用的文件
syntax
function PackageMakerPage.UpdateFloderMembersTreeView()
PackageMakerPage.LoadTxtPathList
加载压缩包的文本配置文件
syntax
function PackageMakerPage.LoadTxtPathList()
PackageMakerPage.ImportFileTabitemOnclick
ImportFileTabitemOnclick?
syntax
function PackageMakerPage.ImportFileTabitemOnclick()
PackageMakerPage.import_LoadTxtPathList
导入文本文件
syntax
function PackageMakerPage.import_LoadTxtPathList()
PackageMakerPage.CutFilter
转换通配符"*.*"
syntax
function PackageMakerPage.CutFilter(path)
parameters
PackageMakerPage.GenerateGreaterCFByField
generate a greater compare function according to a node field name.
- param fieldName : the name of the field, such as "Text", "Name", etc
syntax
function PackageMakerPage.GenerateGreaterCFByField(fieldName)
parameters
| fieldName |
the name of the field, such as "Text", "Name", etc |
PackageMakerPage.BuildPackageByGroupPath
-------------------------------------------------------------------------
* _param_ __txtPathList__ :一个文本路径的集合 {"a/b/1.txt","a/b/2.txt",}
* _param_ __zipPath__ :生成压缩包的路径 c/d/test.zip
[[
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/PackageMakerPage.lua");
local txtPathList = {
"packages/redist/1-1.0.txt",
"packages/redist/2-1.0.txt",
"packages/redist/3-1.0.txt"
}
local zipPath = "packages/redist/test.zip";
local
PackageMakerPage? =
Map3DSystem? .App.Assets.PackageMakerPage;
BuildPackageByGroupPath? (txtPathList,zipPath)
]]
syntax
function PackageMakerPage.BuildPackageByGroupPath(txtPathList,zipPath)
parameters
| txtPathList |
一个文本路径的集合 {"a/b/1.txt","a/b/2.txt",} |
| zipPath |
|