ParaWorldIntroAppDev

description: 帕拉巫世界介绍: 包含30分钟的社区引导、社区教程、制作群、APP开发网 & SDK、帮助、CG等. 30分钟的社区引导包括:注册,建立3D形象,加入城市,学习3D的操作,创建和浏览关系网和应用程序

Contents:

ParaWorldIntro? app for Paraworld: it includes the 30 mins, game intro, credits, tutorial page, App development intro, help, and CG page.

Title ParaWorldIntro? app for Paraworld: it includes the 30 mins, game intro, credits, tutorial page, App development intro, help, and CG page.
Author(s) LiXizhi
Date 2008/1/28
File script/kids/3DMapSystemUI/ParaworldIntro/app_main.lua

Description

the 30 mins intro teaches you to register account, create an avatar, join a CITY, learn the basics 3D operations, build and explore profiles and applications. db registration insert script INSERT INTO apps VALUES (NULL, 'ParaWorldIntro_GUID', 'ParaWorldIntro', '1.0.0', 'http://www.paraengine.com/apps/ParaWorldIntro_v1.zip', 'YourCompany', 'enUS', 'script/kids/3DMapSystemUI/ParaworldIntro/IP.xml', '', 'script/kids/3DMapSystemUI/ParaworldIntro/app_main.lua', 'Map3DSystem.App.ParaWorldIntro.MSGProc', 1);

TIP Sample Code

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

Member Functions

Map3DSystem.App.ParaWorldIntro.OnConnection

requires

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


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.ParaWorldIntro.OnConnection(app, connectMode)

parameters

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

Map3DSystem.App.ParaWorldIntro.OnDisconnection

Receives notification that the Add-in is being unloaded.

syntax

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

parameters

app  
disconnectMode  

Map3DSystem.App.ParaWorldIntro.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.ParaWorldIntro.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.ParaWorldIntro.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.ParaWorldIntro.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.ParaWorldIntro.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.ParaWorldIntro.OnRenderBox(mcmlData)

parameters

mcmlData  

Map3DSystem.App.ParaWorldIntro.Navigate

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

syntax

function Map3DSystem.App.ParaWorldIntro.Navigate()

Map3DSystem.App.ParaWorldIntro.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.ParaWorldIntro.GotoHomepage()

Map3DSystem.App.ParaWorldIntro.DoQuickAction

called when user clicks the quick action for this application.

syntax

function Map3DSystem.App.ParaWorldIntro.DoQuickAction()

Map3DSystem.App.ParaWorldIntro.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.ParaWorldIntro.MSGProc(window, msg)

parameters

window  
msg  

Credits page

Title Credits page
Author(s) LiXizhi
Date 2008/1/28
File script/kids/3DMapSystemUI/ParaworldIntro/CreditsPage.lua

Description

TIP Sample Code

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

Member Functions

Map3DSystem.App.ParaworldIntro.CreditsPage.ShowWnd

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

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

which page to show using the NPL HTML renderer local panelData = {panelName = "Credits_Panel", HTMLFile = "Texture/3DMapSystem/HTML/Credits.html"};

display the main inventory window for the current user.

syntax

function Map3DSystem.App.ParaworldIntro.CreditsPage.ShowWnd(_app)

parameters

app  

Map3DSystem.App.ParaworldIntro.CreditsPage.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.ParaworldIntro.CreditsPage.Show(bShow, _parent, parentWindow)

parameters

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

Map3DSystem.App.ParaworldIntro.CreditsPage.OnDestory

destory the control

syntax

function Map3DSystem.App.ParaworldIntro.CreditsPage.OnDestory()

paraworld community introduction or getting started page: it contains everything the user needs to know

Title paraworld community introduction or getting started page: it contains everything the user needs to know
Author(s) LiXizhi
Date 2007/11/2
File script/kids/3DMapSystemUI/ParaworldIntro/PWIntroPage.lua

Description

TIP Sample Code

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

Member Functions

Map3DSystem.App.ParaworldIntro.PWIntroPage.ShowWnd

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

display the main inventory window for the current user.

syntax

function Map3DSystem.App.ParaworldIntro.PWIntroPage.ShowWnd(_app)

parameters

app  

Map3DSystem.App.ParaworldIntro.PWIntroPage.BasePage:new

-----------------------------------
 special pages
-----------------------------------
Map3DSystem.App.ParaworldIntro.PWIntroPage.BasePage = {
   -- must be unique
   name = nil, 
   --[[ it can be one of the following: 
      "UI": (call the OnShow/OnClose method to display NPL UI) | 
      "external URL": (which display UI to ask to open in external browser) | 
      "web browser": (use internal mozilla browser to view in place) | 
      "text": just display some text and title
      nil: (which is empty)
   ]]
   type = nil,
   url = nil, 
   title = nil, -- string
   text = nil,-- string
   icon = nil ,-- string path
   image = nil,-- string path
   -- function of format function(_parent) end where _parent is the parent container
   OnShow = nil, 
   -- function of format function(_parent) end where _parent is the parent container
   OnClose = nil, 
}
; constructor

syntax

function Map3DSystem.App.ParaworldIntro.PWIntroPage.BasePage:new (o)

parameters

o  

Map3DSystem.App.ParaworldIntro.PWIntroPage.Show


sub page instances
Map3DSystem? .App.ParaworldIntro.PWIntroPage.WelcomePage = Map3DSystem? .App.ParaworldIntro.PWIntroPage.BasePage:new{name = "WelcomePage", type = "UI"}; -- see OnShow? () Map3DSystem? .App.ParaworldIntro.PWIntroPage.RegisterPage = Map3DSystem? .App.ParaworldIntro.PWIntroPage.BasePage:new{name = "RegisterPage", type = "external URL", title = "注册新用户", text = "如果您已经注册了,请直接登录", url="http://www.minixyz.com/cn_01/register.aspx"}; Map3DSystem? .App.ParaworldIntro.PWIntroPage.LandPage = Map3DSystem? .App.ParaworldIntro.PWIntroPage.BasePage:new{name = "LandPage", type = "text", title="申请你的虚拟土地", text = "免费发放10万份虚拟土地。大家快来申请!",}; Map3DSystem? .App.ParaworldIntro.PWIntroPage.CreationPage = Map3DSystem? .App.ParaworldIntro.PWIntroPage.BasePage:new{name = "CreationPage", type = "web browser", url = "local://readme.txt",};

current displayed page Map3DSystem? .App.ParaworldIntro.PWIntroPage.CurrentPage = Map3DSystem? .App.ParaworldIntro.PWIntroPage.WelcomePage;


main window

syntax

function Map3DSystem.App.ParaworldIntro.PWIntroPage.Show(bShow,_parent,parentWindow)

parameters

bShow  
parent  
parentWindow  

Map3DSystem.App.ParaworldIntro.PWIntroPage.OnDestory


methods
destory the control

syntax

function Map3DSystem.App.ParaworldIntro.PWIntroPage.OnDestory()

Map3DSystem.App.ParaworldIntro.PWIntroPage.NavigateTo

go to a given url.

  • param url : such as "www.paraengine.com", "http://www.lixizhi.net", it can also contain relative path like "local://Texture/3DMapSystem/HTML/Credits.html"

syntax

function Map3DSystem.App.ParaworldIntro.PWIntroPage.NavigateTo(url)

parameters

| url | such as "www.paraengine.com", "http://www.lixizhi.net", it can also contain relative path like "local://Texture/3DMapSystem/HTML/Credits.html" |

Map3DSystem.App.ParaworldIntro.PWIntroPage.OnTimer


window events

syntax

function Map3DSystem.App.ParaworldIntro.PWIntroPage.OnTimer()

Map3DSystem.App.ParaworldIntro.PWIntroPage.WelcomePage.OnShow


special sub pages of the main intro page

syntax

function Map3DSystem.App.ParaworldIntro.PWIntroPage.WelcomePage.OnShow(_parent)

parameters

parent  

paraworld web page: contains user site & developer site portals.

Title paraworld web page: contains user site & developer site portals.
Author(s) LiXizhi
Date 2008/1/28
File script/kids/3DMapSystemUI/ParaworldIntro/PWWebPage.lua

Description

TIP Sample Code

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

Member Functions

Map3DSystem.App.ParaworldIntro.PWWebPage.ShowWnd

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

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

display the main inventory window for the current user.

syntax

function Map3DSystem.App.ParaworldIntro.PWWebPage.ShowWnd(_app)

parameters

app  

Map3DSystem.App.ParaworldIntro.PWWebPage.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.ParaworldIntro.PWWebPage.Show(bShow, _parent, parentWindow)

parameters

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

Map3DSystem.App.ParaworldIntro.PWWebPage.OnDestory

destory the control

syntax

function Map3DSystem.App.ParaworldIntro.PWWebPage.OnDestory()

Credits page

Title Credits page
Author(s) LiXizhi
Date 2008/1/28
File script/kids/3DMapSystemUI/ParaworldIntro/TutorialsPage.lua

Description

TIP Sample Code

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

Member Functions

Map3DSystem.App.ParaworldIntro.TutorialsPage.ShowWnd

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

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

display the main inventory window for the current user.

syntax

function Map3DSystem.App.ParaworldIntro.TutorialsPage.ShowWnd(_app)

parameters

app  

Map3DSystem.App.ParaworldIntro.TutorialsPage.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.ParaworldIntro.TutorialsPage.Show(bShow, _parent, parentWindow)

parameters

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

Map3DSystem.App.ParaworldIntro.TutorialsPage.OnDestory

destory the control

syntax

function Map3DSystem.App.ParaworldIntro.TutorialsPage.OnDestory()
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