.
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/AvatarRegPage.lua");
Map3DSystem.App.CCS.AvatarRegPage:Create("CCS.AvatarRegPage", parent, "_fi", 0,0,0,0);
Member Functions
AvatarRegPage.DS_Avatar_Func
create class
local AvatarRegPage = Map3DSystem.mcml.PageCtrl:new({url="script/kids/3DMapSystemUI/CCS/AvatarRegPage.html"});
Map3DSystem.App.CCS.AvatarRegPage = AvatarRegPage;
avatar db table, the name property is [race]/[gender] or normal character model path
AvatarRegPage.avatars = {
{name = "Human/Male", desc="男青年", ccsinfo = "0#0#4#2#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#214#0#135#163#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_1.png"},
{name = "Human/Female", desc="女青年", ccsinfo = "0#0#0#1#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#216#0#113#155#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_1.png"},
{name = "Human/Male", desc="小帅哥", ccsinfo = "0#0#1#2#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#231#0#122#177#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_2.png"},
{name = "Human/Female", desc="邻家女孩", ccsinfo = "0#0#6#4#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#235#0#114#170#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_2.png"},
{name = "Human/Male", desc="运动男孩", ccsinfo = "0#0#2#2#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#217#0#119#169#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_3.png"},
{name = "Human/Female", desc="淑女", ccsinfo = "0#0#2#3#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#229#0#115#166#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_3.png"},
{name = "Human/Male", desc="叛逆男孩", ccsinfo = "0#0#2#0#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#252#0#148#178#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_4.png"},
{name = "Human/Female", desc="时尚女孩", ccsinfo = "0#0#3#1#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#227#0#118#168#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_4.png"},
--{name = "character/v1/01human/baru/baru.x", desc="小学生", ccsinfo = nil, bg = "character/v1/01human/baru/baru.x.png"},
--{name = "character/v1/01human/boy/boy.x", desc="小男孩", ccsinfo = nil, bg = "character/v1/01human/boy/boy.x.png"},
--
--{name = "character/v1/02animals/01land/pigmen/pig.x", desc="小猪", ccsinfo = nil, bg = "character/v1/02animals/01land/pigmen/pig.x.png"},
--{name = "character/v1/02animals/01land/dog/dog.x", desc="小狗", ccsinfo = nil, bg = "character/v1/02animals/01land/dog/dog.x.png"},
--
--{name = "character/v1/02animals/01land/snake/snake.x", desc="蛇", ccsinfo = nil, bg = "character/v1/02animals/01land/snake/snake.x.png"},
--{name = "character/v1/02animals/01land/guagua/guagua.x", desc="青蛙", ccsinfo = nil, bg = "character/v1/02animals/01land/guagua/guagua.x.png"},
--
--{name = "character/v1/02animals/01land/chengcheng/cheng.x", desc="蜘蛛", ccsinfo = nil, bg = "character/v1/02animals/01land/chengcheng/cheng.x.png"},
--{name = "character/v1/02animals/01land/chevalier/chevalier.x", desc="狗骑士", ccsinfo = nil, bg = "character/v1/02animals/01land/chevalier/chevalier.x.png"},
--{name = "angel/male", desc="天使族小姐", ccsinfo = nil, bg = "character/v1/01human/baru/baru.x.png"},
--{name = "angel/female", desc="天使族绅士", ccsinfo = nil, bg = "character/v1/01human/boy/boy.x.png"},
--{name = "momo/male", desc="嬷嬷族小姐", ccsinfo = nil, bg = "character/v1/01human/baru/baru.x.png"},
--{name = "momo/female", desc="嬷嬷族绅士", ccsinfo = nil, bg = "character/v1/01human/boy/boy.x.png"},
};
datasource function for pe:gridview
syntax
function AvatarRegPage.DS_Avatar_Func(index)
parameters
AvatarRegPage.TakeAvatarSnapshot
function to be called when user completed or skipped all app registration steps.
callback function to call after the registration page finish or skip
OnFinishedFunc? = nil;
take screen shot of the character pe:avatar.
syntax
function AvatarRegPage.TakeAvatarSnapshot()
AvatarRegPage.UpdateAvatar
User select a character in the gridview list, change the 3d display in pe:avatar window
syntax
function AvatarRegPage.UpdateAvatar(index)
parameters
AvatarRegPage.OnAccept
Accept the current preview avatar and save to CCSApp profile
syntax
function AvatarRegPage.OnAccept(btnName, values, bindingContext)
parameters
| btnName |
|
| values |
|
| bindingContext |
|
AvatarRegPage.OnSkip
Skip the avatar registration page
syntax
function AvatarRegPage.OnSkip(btnName, values, bindingContext)
parameters
| btnName |
|
| values |
|
| bindingContext |
|
AvatarRegPage:Leave
just exit to call back.
syntax
function AvatarRegPage:Leave()
character customization system UI plug-in for 3D Map System
| Title |
character customization system UI plug-in for 3D Map System |
| Author(s) |
WangTian? |
| Date |
2007/10/29 |
| File |
script/kids/3DMapSystemUI/CCS/CartoonFace.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/CartoonFace.lua");
local CartoonFace = Map3DSystem.UI.CCS.CartoonFace;
Member Functions
CartoonFace.Show
create, init and display the cartoon face UI control
- param parent : ParaUIObject? which is the parent container
syntax
function CartoonFace.Show(parent)
parameters
| parent |
ParaUIObject? which is the parent container |
CartoonFace.OnDestroy
destroy the control
syntax
function CartoonFace.OnDestroy()
CartoonFace.PageLeft
Page Left
syntax
function CartoonFace.PageLeft()
CartoonFace.PageRight
Page Right
syntax
function CartoonFace.PageRight()
CartoonFace.GetDirectory
get the face directory according to current face component section
syntax
function CartoonFace.GetDirectory()
CartoonFace.ResetFaceComponent
reset face component section
syntax
function CartoonFace.ResetFaceComponent()
CartoonFace.OnIconMatrixClick
click on cartoon face icon matrix
set the cartoon face component according to the click
syntax
function CartoonFace.OnIconMatrixClick(x, y)
parameters
character customization system UI face component for 3D Map System
| Title |
character customization system UI face component for 3D Map System |
| Author(s) |
WangTian? |
| Date |
2007/10/29 |
| File |
script/kids/3DMapSystemUI/CCS/CartoonFaceComponent.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/CartoonFaceComponent.lua");
Member Functions
CartoonFaceComponent.SetFaceSection
- param section : set the current section of the face component
syntax
function CartoonFaceComponent.SetFaceSection(Section)
parameters
CartoonFaceComponent.GetFaceComponentSection
get the current section of the face component
syntax
function CartoonFaceComponent.GetFaceComponentSection()
CartoonFaceComponent.SetFaceComponent
Function: set the face component parameters for the specific section
syntax
function CartoonFaceComponent.SetFaceComponent(SubType, value, donot_refresh)
parameters
| SubType |
|
| value |
|
| donot |
|
| refresh |
|
Character Customization System public functions
| Title |
Character Customization System public functions |
| Author(s) |
WangTian? |
| Date |
2007/10/29, refactored 2008.6.12 by LiXizhi |
| File |
script/kids/3DMapSystemUI/CCS/ccs.lua |
Description
Basic ccs functions
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/ccs.lua");
Member Functions
Map3DSystem.UI.CCS.GetCCSInfoString
get the CCS information string from the obj_param
- param obj :_param: object parameter(table) or ParaObject? object
- return __ : the ccs info string if CCS character or nil if no CCS information is found
syntax
function Map3DSystem.UI.CCS.GetCCSInfoString(obj_params)
parameters
| obj |
_param: object parameter(table) or ParaObject? object |
| params |
|
Map3DSystem.UI.CCS.ApplyCCSInfoString
apply the ccs information string to the obj_params object
- param obj :_param: object parameter(table) or ParaObject? object
- param sInfo : ccs information string NOTE: obj can be ParaScene? object or mini scene graph object
syntax
function Map3DSystem.UI.CCS.ApplyCCSInfoString(obj_params, sInfo)
parameters
| obj |
_param: object parameter(table) or ParaObject? object |
| params |
|
| sInfo |
|
character save page
| Title |
character save page |
| Author(s) |
WangTian? |
| Date |
2008/6/12 |
| File |
script/kids/3DMapSystemUI/CCS/CharSavePage.lua |
Description
script/kids/3DMapSystemApp/CCS/CharSavePage.html is the character save page for
the CCS application.
The character selection page will display a 3D avatar on the right and a list of operation that user can take
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/CharSavePage.lua");
Member Functions
CharSavePage.OnInit
create class
local CharSavePage? = {};
commonlib.setfield("Map3DSystem.App.CCS.CharSavePage", CharSavePage? );
on init show the current avatar in pe:avatar
syntax
function CharSavePage.OnInit()
CharSavePage.TakeAvatarSnapshot
take screen shot of the character pe:avatar.
syntax
function CharSavePage.TakeAvatarSnapshot()
CharSavePage.OnRefreshAvatar
load the current player to canvas
syntax
function CharSavePage.OnRefreshAvatar()
CharSavePage.OnClickSave
save the user avatar information
syntax
function CharSavePage.OnClickSave()
character selection page
| Title |
character selection page |
| Author(s) |
WangTian? |
| Date |
2008/6/12 |
| File |
script/kids/3DMapSystemUI/CCS/CharSelectionPage.lua |
Description
script/kids/3DMapSystemApp/CCS/CharSelectionPage.html is the character selection page for
the CCS application.
The character selection page will display a 3D avatar on the right and a list of avaiable characters that use can choose from
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/CharSelectionPage.lua");
Member Functions
CharSelectionPage.DS_Avatar_Func
create class
local CharSelectionPage = {};
commonlib.setfield("Map3DSystem.App.CCS.CharSelectionPage", CharSelectionPage);
avatar db table, the name property is [race]/[gender] or normal character model path
CharSelectionPage.avatars = {
{name = "Human/Male", desc="男青年", ccsinfo = "0#0#4#2#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#214#0#135#163#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_1.png"},
{name = "Human/Female", desc="女青年", ccsinfo = "0#0#0#1#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#216#0#113#155#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_1.png"},
{name = "Human/Male", desc="小帅哥", ccsinfo = "0#0#1#2#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#231#0#122#177#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_2.png"},
{name = "Human/Female", desc="邻家女孩", ccsinfo = "0#0#6#4#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#235#0#114#170#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_2.png"},
{name = "Human/Male", desc="运动男孩", ccsinfo = "0#0#2#2#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#217#0#119#169#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_3.png"},
{name = "Human/Female", desc="淑女", ccsinfo = "0#0#2#3#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#229#0#115#166#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_3.png"},
{name = "Human/Male", desc="叛逆男孩", ccsinfo = "0#0#2#0#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#252#0#148#178#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_male_4.png"},
{name = "Human/Female", desc="时尚女孩", ccsinfo = "0#0#3#1#0#@0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#0#F#0#0#0#0#@0#0#0#227#0#118#168#0#0#0#0#0#0#0#", bg = "character/v3/Human/snapshots/avatar_human_female_4.png"},
};
datasource function for pe:gridview
syntax
function CharSelectionPage.DS_Avatar_Func(index)
parameters
CharSelectionPage.TakeAvatarSnapshot
take screen shot of the character pe:avatar.
syntax
function CharSelectionPage.TakeAvatarSnapshot()
CharSelectionPage.UpdateChar
User select a character in the gridview list, change the 3d display in pe:avatar window
syntax
function CharSelectionPage.UpdateChar(index)
parameters
CharSelectionPage.OnAccept
Accept the current preview avatar and save to CCSApp profile
syntax
function CharSelectionPage.OnAccept(btnName, values, bindingContext)
parameters
| btnName |
|
| values |
|
| bindingContext |
|
CharSelectionPage:Leave
just exit to call back.
syntax
function CharSelectionPage:Leave()
character customization database for 3D Map System
| Title |
character customization database for 3D Map System |
| Author(s) |
WangTian? |
| Date |
2007/10/29, refactored 2008.6.12 lxz |
| File |
script/kids/3DMapSystemUI/CCS/DB.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/DB.lua");
local DB = Map3DSystem.UI.CCS.DB
Member Functions
DB.InitBodyParamIDSet
common control library
NPL.load("(gl)script/sqlite/sqlite3.lua");
local DB = {}
commonlib.setfield("Map3DSystem.UI.CCS.DB", DB)
BodyParamIDSet? = {};
DB.dbfile = "Database/characters.db";
ModelDir? = "character/v3/Child/";
DB.Gender= "Male";
ItemObjectPath? = "character/v3/Item/ObjectComponents/";
ItemTexturePath? = "character/v3/Item/TextureComponents/";
ItemIdLists? = {};
ItemIdSlotLists? = {};
FaceStyleLists? = {};
FaceIconLists? = {};
FaceStyleIterators? = {};
CurrentCharacterInfo? = {};
the following are calculated
ModelName? = "Child";
ModelPath? = "character/v3/Child/Male/ChildMale.x";
character slots
DB.CS_HEAD =0;
DB.CS_NECK = 1;
DB.CS_SHOULDER = 2;
DB.CS_BOOTS = 3;
DB.CS_BELT = 4;
DB.CS_SHIRT = 5;
DB.CS_PANTS = 6;
DB.CS_CHEST = 7;
DB.CS_BRACERS = 8;
DB.CS_GLOVES = 9;
DB.CS_HAND_RIGHT = 10;
DB.CS_HAND_LEFT = 11;
DB.CS_CAPE = 12;
DB.CS_TABARD = 13;
item types
DB.IT_HEAD = 1;
DB.IT_NECK=2;--脖子
DB.IT_SHOULDER=3;-- 肩
DB.IT_SHIRT=4;-- 上衣
DB.IT_CHEST=5;-- 胸
DB.IT_BELT=6;
DB.IT_PANTS=7;-- 裤子
DB.IT_BOOTS=8; -- 鞋子
DB.IT_BRACERS=9;
DB.IT_GLOVES=10;-- 手套
DB.IT_RINGS=11;
DB.IT_OFFHAND=12;
DB.IT_DAGGER=13;
DB.IT_SHIELD=14;
DB.IT_BOW=15;
DB.IT_CAPE=16; -- 披风
DB.IT_2HANDED=17;-- 双手
DB.IT_QUIVER=18;
DB.IT_TABARD=19;
DB.IT_ROBE=20;
DB.IT_1HANDED=21;-- 单手
DB.IT_CLAW=22;
DB.IT_ACCESSORY=23;
DB.IT_THROWN=24;
DB.IT_GUN=25;
cartoon face component
DB.CFS_FACE = 0;
DB.CFS_WRINKLE = 1;
DB.CFS_EYE = 2;
DB.CFS_EYEBROW = 3;
DB.CFS_MOUTH = 4;
DB.CFS_NOSE = 5;
DB.CFS_MARKS = 6;
cartoon face sub type
DB.CFS_SUB_Style = 0;
DB.CFS_SUB_Color = 1;
DB.CFS_SUB_Scale = 2;
DB.CFS_SUB_Rotation = 3;
DB.CFS_SUB_X = 4;
DB.CFS_SUB_Y = 5;
read facial table information
syntax
function DB.InitBodyParamIDSet()
DB.ResetBaseModel
reset the base model
syntax
function DB.ResetBaseModel(ModelDir, Gender)
parameters
DB.GetPlayerChar
e.g. local player, playerChar = GetPlayerChar? ();
syntax
function DB.GetPlayerChar()
DB.GetItemIdListByType
return a table containing a list of IDs for a given item type;the last one is always 0
- param Type : item types such as DB.IT_CAPE
syntax
function DB.GetItemIdListByType(type)
parameters
DB.GetItemIdListBySlotType
return a table containing a list of IDs for a given item type;the last one is always 0
- param Type : item types such as DB.CS_HAND_RIGHT
syntax
function DB.GetItemIdListBySlotType(type)
parameters
DB.GetFaceComponentStyleList
return a table containing a list of style IDs for the given face component
- param nComponentID : such as DB.CFS_FACE
syntax
function DB.GetFaceComponentStyleList(nComponentID)
parameters
| nComponentID |
such as DB.CFS_FACE |
DB.GetFaceComponentIconList
return a table containing a list of Icon path for the given face component
- param nComponentID : such as DB.CFS_FACE
syntax
function DB.GetFaceComponentIconList(nComponentID)
parameters
| nComponentID |
such as DB.CFS_FACE |
DB.SetFaceComponent
set the face component parameters
e.g. SetFaceComponent? (DB.CFS_EYE, DB.CFS_SUB_Scale, 0.1);
- param nComponentID : such as DB.CFS_FACE
- param SubType : such as DB.CFS_SUB_Scale, if this is nil, it will call ResetFaceComponent? () instead 0: style: int [0,00] 1: color: 32bits ARGB 2: scale: float in [-1,1] 3: rotation: float in (-3.14,3.14] 4: x: (-128,128] 5: y: (-128,128]
- param value : it is abolute for face type and color, and delta value for all other types. if SubType? is style and value is nil, it will automatically select the next style
- param refreshModel : if nil, it will automatically refresh the character model, otherwise it will not refresh the model.
syntax
function DB.SetFaceComponent(nComponentID, SubType, value)
parameters
| nComponentID |
such as DB.CFS_FACE |
| SubType |
|
| value | it is abolute for face type and color, and delta value for all other types.
if SubType? is style and value is nil, it will automatically select the next style |
DB.GetCartoonfaceInfoString
get the cartoon face info string from the obj_param
- param obj :_param: object parameter(table) or ParaObject? object
- return __ : the cartoon face string if CCS character with cartoon face or nil if no cartoon face information is found
syntax
function DB.GetCartoonfaceInfoString(obj_params)
parameters
| obj |
_param: object parameter(table) or ParaObject? object |
| params |
|
DB.OnChangeCartoonFace
change the cartoon face info of the current seleceted character
syntax
function DB.OnChangeCartoonFace(obj_params, nComponentID, SubType, value)
parameters
| obj |
|
| params |
|
| nComponentID |
|
| SubType |
|
| value |
|
DB.ResetFaceComponent
reset the given face component to default value
syntax
function DB.ResetFaceComponent(nComponentID)
parameters
DB.AutoGenerateItems
NOTE: this function will generate the database items according to standard specification
avoid calling this function without authorization
Contact Andy for more information
syntax
function DB.AutoGenerateItems()
DB.GetInventoryDB2
get the inventory information according to tabgrid
syntax
function DB.GetInventoryDB2()
Character Customization System default appearance
| Title |
Character Customization System default appearance |
| Author(s) |
WangTian? |
| Date |
2008/3/12 |
| File |
script/kids/3DMapSystemUI/CCS/DefaultAppearance.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/DefaultAppearance.lua");
Member Functions
Map3DSystem.UI.CCS.DefaultAppearance.MountDefaultAppearance
mount a nude CCS character with default appearance
- param obj : ParaObject? object
syntax
function Map3DSystem.UI.CCS.DefaultAppearance.MountDefaultAppearance(obj)
parameters
Character Customization System inventory UI for 3D Map System
| Title |
Character Customization System inventory UI for 3D Map System |
| Author(s) |
WangTian? |
| Date |
2007/10/29 |
| File |
script/kids/3DMapSystemUI/CCS/Inventory.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/Inventory.lua");
Member Functions
Inventory.Show
create, init and display the head inventory UI control
- param parent : ParaUIObject? which is the parent container
syntax
function Inventory.Show(parent)
parameters
| parent |
ParaUIObject? which is the parent container |
Inventory.OnDestroy
destroy the control
syntax
function Inventory.OnDestroy()
Inventory.PageLeft
Page Left
syntax
function Inventory.PageLeft()
Inventory.PageRight
Page Right
syntax
function Inventory.PageRight()
Inventory.RefreshMatrix3D
Page Left
syntax
function Inventory.RefreshMatrix3D()
Inventory.GetCharacterSlotInfoString
get the character slot information string from the obj_param
- param obj :_param: object parameter(table) or ParaObject? object
- return __ : the character slot info string if CCS character or nil if no character slot information is found
syntax
function Inventory.GetCharacterSlotInfoString(obj_params)
parameters
| obj |
_param: object parameter(table) or ParaObject? object |
| params |
|
Inventory.OnChangeCharacterSlot
change the CCS character slot info of the current seleceted character
syntax
function Inventory.OnChangeCharacterSlot(obj_params, nComponent, index)
parameters
| obj |
|
| params |
|
| nComponent |
|
| index |
|
Inventory.OnClickIconMatrix
icon matrix onclick function: mount the item to character slot
syntax
function Inventory.OnClickIconMatrix(x, y)
parameters
Inventory.OnClickUnmountCurrentCharacterSlot
unmount the item according to current character slot on the current seleceted character
syntax
function Inventory.OnClickUnmountCurrentCharacterSlot()
character customization system UI inventory slot for 3D Map System
| Title |
character customization system UI inventory slot for 3D Map System |
| Author(s) |
WangTian? |
| Date |
2007/10/29, refactored 2008.6.12 lxz |
| File |
script/kids/3DMapSystemUI/CCS/InventorySlot.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/InventorySlot.lua");
local InventorySlot = Map3DSystem.UI.CCS.InventorySlot
Member Functions
InventorySlot.SetInventorySlot
- param section : this is solely for debugging purposes. to make this class universal to all inventory slots
InventorySlot? .Component = nil;
- param section : set the current item slot of the inventory
syntax
function InventorySlot.SetInventorySlot(Section)
parameters
InventorySlot.GetInventorySlot
get the current item slot of the inventory
syntax
function InventorySlot.GetInventorySlot()
InventorySlot.MountInventorySlot
Function: set the inventory slot parameters for the specific item slot
syntax
function InventorySlot.MountInventorySlot(SubType, value, donot_refresh)
parameters
| SubType |
|
| value |
|
| donot |
|
| refresh |
|
Character Customization System main enterance for 3D Map System
| Title |
Character Customization System main enterance for 3D Map System |
| Author(s) |
WangTian? |
| Date |
2007/10/29 |
| File |
script/kids/3DMapSystemUI/CCS/Main.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemUI/CCS/Main.lua");
Member Functions
CCS.ShowAuraCCSInterface
the new aura user interface enhance the user experience in the column window on the side of the screen
categories in enlisted on the side and show as many candidates as possible
draw the CCS interface with the new aura design
syntax
function CCS.ShowAuraCCSInterface(bShow, parent, wnd)
parameters
CCS.OnClickCartoonFaceComponent
change the cartoon face component category
- param index : the index into the CartoonFace? category table
syntax
function CCS.OnClickCartoonFaceComponent(index)
parameters
| index |
the index into the CartoonFace? category table |
CCS.InitMessageSystem
init message system: call this function at main bar initialization to init the message system for CCS
syntax
function CCS.InitMessageSystem()
CCS.SendMeMessage
send a message to CCS:CCSMain window handler
e.g. SendMeMessage? ({type = Map3DSystem? .msg.MAINBAR_Show})
syntax
function CCS.SendMeMessage(msg)
parameters
CCS.MSGProc
CCS: CCSMain window handler
syntax
function CCS.MSGProc()
CCS.ShowCartoonFace
Function: show cartoon face control
- param bShow : boolean to show or hide. if nil, it will toggle current setting.
syntax
function CCS.ShowCartoonFace(bShow)
parameters