HomepageAppDev

description: 缁欏叾浠栧簲鐢ㄧ▼搴忔彁渚涘绉嶆牱寮忕殑鍙畾鍒剁殑棣栭〉銆傚紑鍙戣€呭彧闇€鍐欎竴琛屼唬鐮佸氨鍙互璁╄嚜宸辩殑APP棣栭〉鍏锋湁涓嬮潰鍔熻兘: (1) 澶у巺鏈嶅姟锛氱敤鎴峰彲浠ラ€氳繃棣栭〉鍒涘缓鎴栧姞鍏ュ叾浠栦汉鎴栧紑鍙戣€呯殑3D鍦ㄧ嚎涓栫晫 (2) 鍟嗗煄锛氱敤鎴峰彲浠ヤ拱鍒版搴旂敤绋嬪簭鐨勭墿鍝?(3) BBS璁哄潧锛氬彂甯冩敹闆嗙敤鎴锋剰瑙侊紝寮€鍙戣€呮秷鎭瓑 (4) 缇庢湳璧勬簮绠$悊锛氬埗瀹氬摢浜涚浉鍐屽浘鐗囷紝3D妯″瀷鍙互鏄剧ず鍦ㄥ垱寤哄伐鍏锋爮涓紝鍦?D涓栫晫涓娇鐢ㄣ€

Homepage app for Paraworld

Title Homepage app for Paraworld
Author(s) LiXizhi
Date 2008/1/31
File script/kids/3DMapSystemApp/Homepage/app_main.lua

Description

It provides other application with several cutomizable homepages. It saves application developers from creating a full fledged homepage. With one line of code, an application developer can built an application homepage with the following functionalities: - Lobby or Room host services for people to create/join user or developer hosted 3D worlds - market place services for users of the application to buy stuffs offered by the application from the inventory application. - A BBS discussion board (another app) to post and get user feedback and reviews. - An asset board (another app) to customize which of the application assets will show up in the mainbar's creation folder. Asset includes, 3D models, textures, user photos, etc. It is like photo, 3D model, 3D character albums associated with the app.

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

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Homepage/app_main.lua");

Member Functions

Map3DSystem.App.Homepage.OnConnection

requires

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


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

parameters

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

Map3DSystem.App.Homepage.OnDisconnection

Receives notification that the Add-in is being unloaded.

syntax

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

parameters

app  
disconnectMode  

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

parameters

mcmlData  

Map3DSystem.App.Homepage.Navigate

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

syntax

function Map3DSystem.App.Homepage.Navigate()

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

Map3DSystem.App.Homepage.DoQuickAction

called when user clicks the quick action for this application.

syntax

function Map3DSystem.App.Homepage.DoQuickAction()

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

parameters

window  
msg  
Topic revision: r1 - 2008-02-29 - LiXizhi
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback