MyDesktopAppDev
description: 娓告垙鍐呯殑缂虹渷鐢ㄦ埛妗岄潰, 鍏佽鐢ㄦ埛鑷畾涔夊湪娓告垙鍐呮闈? 娣诲姞Widgets绛
The default desktop app
Title |
The default desktop app |
Author(s) |
LiXizhi |
Date |
2008/5/15 |
File |
script/kids/3DMapSystemUI/MyDesktop/app_main.lua |
Description
Default in-game user desktop app, which has by default most common functions on its application exclusive desktop.
It is also customizable and can be extended via desktop widgets.
show desktop welcome page.
This is usually bind to F1 key
Map3DSystem.App.Commands.Call("Profile.MyDesktop.ShowWelcomePage")
db registration insert script
INSERT INTO apps VALUES (NULL, 'MyDesktop_GUID', 'MyDesktop', '1.0.0', 'http://www.paraengine.com/apps/MyDesktop_v1.zip', 'YourCompany', 'enUS', 'script/kids/3DMapSystemUI/MyDesktop/IP.xml', '', 'script/kids/3DMapSystemUI/MyDesktop/app_main.lua', 'Map3DSystem.App.MyDesktop.MSGProc', 1);
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/MyDesktop/app_main.lua");
Member Functions
Map3DSystem.App.MyDesktop.OnConnection
requires
create class
commonlib.setfield("Map3DSystem.App.MyDesktop", {});
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 ConnectMode.
syntax
function Map3DSystem.App.MyDesktop.OnConnection(app, connectMode)
parameters
app |
the object representing the current application in the IDE. |
connectMode |
|
Map3DSystem.App.MyDesktop.OnDisconnection
Receives notification that the Add-in is being unloaded.
syntax
function Map3DSystem.App.MyDesktop.OnDisconnection(app, disconnectMode)
parameters
Map3DSystem.App.MyDesktop.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 CommandStatusWanted
- return __ : returns according to statusWanted. it may return an integer by adding values in CommandStatus.
syntax
function Map3DSystem.App.MyDesktop.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 CommandStatus. |
Map3DSystem.App.MyDesktop.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.MyDesktop.OnRenderBox(mcmlData)
parameters
Map3DSystem.App.MyDesktop.Navigate
called when the user wants to nagivate to the 3D world location relavent to this application
syntax
function Map3DSystem.App.MyDesktop.Navigate()
Map3DSystem.App.MyDesktop.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.MyDesktop.GotoHomepage()
Map3DSystem.App.MyDesktop.DoQuickAction
called when user clicks the quick action for this application.
syntax
function Map3DSystem.App.MyDesktop.DoQuickAction()
Map3DSystem.App.MyDesktop.OnActivateDesktop
Add terrain, sky and ocean button to the toolbar.
syntax
function Map3DSystem.App.MyDesktop.OnActivateDesktop()
Map3DSystem.App.MyDesktop.OnDeactivateDesktop
syntax
function Map3DSystem.App.MyDesktop.OnDeactivateDesktop()
Map3DSystem.App.MyDesktop.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.MyDesktop.MSGProc(window, msg)
parameters