1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 |
local KEYBOARD_BUCKET_MANAGER
--[[ Slider Randomization Helper...all sliders share the sliderObject from the top control, so this just helps cut down on duplicate functions ]] --
end
--[[ Character Create Slider and Appearance Slider Managers ]] --
-- Manages a collection of sliders with a pool
return manager
end
local control = ZO_ObjectPool_CreateNamedControl ( "CharacterCreateSlider" , "ZO_CharacterCreateSlider_Keyboard" , pool , parent )
end
local control = ZO_ObjectPool_CreateNamedControl ( "CharacterCreateAppearanceSlider" , "ZO_CharacterCreateSlider_Keyboard" , pool , parent )
end
local control = ZO_ObjectPool_CreateNamedControl ( "CharacterCreateColorPicker" , "ZO_CharacterCreateColorSlider_Keyboard" , pool , parent )
end
local control = ZO_ObjectPool_CreateNamedControl ( "CharacterCreateDropdown" , "ZO_CharacterCreateDropDownSlider_Keyboard" , pool , parent )
end
end
end
end
end
self . pools =
{
}
end
local pool = self . pools [ objectType ]
if pool then
end
end
end
end
--[[ Creator Control Initialization ]] --
for i = 1 , # orderingTable do
return i
end
end
return 1
end
--[[ Character Create Keyboard ]] --
end
end
EVENT_MANAGER : RegisterForEvent ( "ZO_CharacterCreate" , EVENT_CHARACTER_CREATE_ZOOM_CHANGED , HandleZoomChanged )
end
end
do
local reasonsThatDisableCreateButton =
{
[ CHARACTER_CREATE_EDIT_ERROR_INVALID_NAME ] = true ,
[ CHARACTER_CREATE_EDIT_ERROR_DUPLICATE_NAME ] = true ,
[ CHARACTER_CREATE_EDIT_ERROR_NAME_TOO_SHORT ] = true ,
[ CHARACTER_CREATE_EDIT_ERROR_NAME_TOO_LONG ] = true ,
}
-- Show the fact that the character could not be created.
if reasonsThatDisableCreateButton [ reason ] then
end
end
end
do
local function CreateTriangle ( control , setterFn , updaterFn , triangleStringId , topStringId , leftStringId , rightStringId )
local triangle = ZO_CharacterCreateTriangle_Keyboard : New ( control , setterFn , updaterFn , triangleStringId , topStringId , leftStringId , rightStringId )
return triangle
end
self . control . fadeTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "CharacterCreateMainControlsFade" , self . control )
-- create the radio button groups
-- create the triangle controls
local physiqueTriangleControl = CreateControlFromVirtual ( "$(parent)PhysiqueSelection" , self . control , "ZO_CharacterCreateTriangleTemplate_Keyboard" )
self . physiqueTriangle = CreateTriangle ( physiqueTriangleControl , SetPhysique , GetPhysique , SI_CREATE_CHARACTER_BODY_TRIANGLE_LABEL , SI_CREATE_CHARACTER_TRIANGLE_MUSCULAR , SI_CREATE_CHARACTER_TRIANGLE_FAT , SI_CREATE_CHARACTER_TRIANGLE_THIN )
local faceTriangleControl = CreateControlFromVirtual ( "$(parent)FaceSelection" , self . control , "ZO_CharacterCreateTriangleTemplate_Keyboard" )
self . faceTriangle = CreateTriangle ( faceTriangleControl , SetFace , GetFace , SI_CREATE_CHARACTER_FACE_TRIANGLE_LABEL , SI_CREATE_CHARACTER_TRIANGLE_FACE_MUSCULAR , SI_CREATE_CHARACTER_TRIANGLE_FACE_FAT , SI_CREATE_CHARACTER_TRIANGLE_FACE_THIN )
-- setup the create button and link it to the name control
self . nameControl . linkedButton = self . createButton
self . nameControl . linkedInstructions = self . nameInstructionsObject
end
end
end
end
local layoutTable =
{
ZO_CharacterCreateRaceAllianceSelector1 ,
ZO_CharacterCreateRaceAllianceSelector2 ,
ZO_CharacterCreateRaceAllianceSelector3 ,
}
local selector = layoutTable [ alliance . position ]
end
end
local layoutTable =
{
ZO_CharacterCreateRaceColumn11 ,
ZO_CharacterCreateRaceColumn21 ,
ZO_CharacterCreateRaceColumn31 ,
ZO_CharacterCreateRaceColumn12 ,
ZO_CharacterCreateRaceColumn22 ,
ZO_CharacterCreateRaceColumn32 ,
ZO_CharacterCreateRaceColumn13 ,
ZO_CharacterCreateRaceColumn23 ,
ZO_CharacterCreateRaceColumn33 ,
ZO_CharacterCreateRaceSingleButton ,
}
local raceButton = layoutTable [ race . position ]
end
end
ZO_CharacterCreateGenderSelectionMaleButton . gender = GENDER_MALE
ZO_CharacterCreateGenderSelectionFemaleButton . gender = GENDER_FEMALE
end
end
end
return entry . templateData . template == defaultTemplate
end
if templatesAllowed then
if templateData . isSelectable then
entry . templateData = templateData
end
end
end
else
end
end
{
canQueue = true ,
title =
{
} ,
{
} ,
end ,
buttons =
{
{
keybind = "DIALOG_PRIMARY" ,
end ,
} ,
{
keybind = "DIALOG_SECONDARY" ,
end ,
} ,
{
keybind = "DIALOG_NEGATIVE" ,
end ,
} ,
}
} )
end
if not templateData then
return false
end
return false
end
-- Disable appearance related controls if the appearance is overridden in the template.
local validRaces = { }
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateRaceSelectorsForTemplate ( ... ) end , self . characterData : GetRaceInfo ( ) , templateData , self . raceRadioGroup , validRaces )
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateClassSelectorsForTemplate ( ... ) end , self . characterData : GetClassInfo ( ) , templateData , self . classRadioGroup )
local validAlliances = { }
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateAllianceSelectorsForTemplate ( ... ) end , self . characterData : GetAllianceInfo ( ) , templateData , self . allianceRadioGroup , validAlliances )
-- Pick a race
if templateData . race ~= 0 then
else
end
-- Pick an alliance
if templateData . alliance ~= 0 then
else
-- (never random unless a race without a fixed alliance is picked)
local alliance = self . characterData : GetRaceForRaceDef ( CharacterCreateGetRace ( characterMode ) ) . alliance
if alliance ~= 0 then
else
end
end
-- Pick a class
if templateData . class ~= 0 then
else
-- UpdateSelectorsForTemplate() should be called prior to this function or unselectable classes might be set (which would result in no class being set).
end
-- Pick a gender
if templateData . gender ~= 0 then
else
end
-- Make the controls match what you picked...
if not templateData . overrideAppearance then
else
end
return true
end
local parent = ZO_CharacterCreateClassSelectionButtonArea
local stride = 3
local padX = 0
local padY = 0
local controlWidth = 120
local controlHeight = 80
local initialX = 0
local initialY = 0
local selectorName = "SelectClass" .. classData . class
if not selector then
end
selector . defId = classData . class
ZO_Anchor_BoxLayout ( anchor , selector , i - 1 , stride , padX , padY , controlWidth , controlHeight , initialX , initialY , GROW_DIRECTION_DOWN_RIGHT )
end
end
do
-- This table defines how sliders should be ordered within their sub-categories.
-- It's not needed for sub-categories where all the controls are added manually,
-- but when sliders are added in loops (like characterSlider and appearanceSlider)
-- this is used to assist building the ordering table which will be passed over
-- to actually add the sliders.
local CONTROL_ORDERING =
{
[ SLIDER_SUBCAT_BODY_FEATURES ] =
{
APPEARANCE_NAME_SKIN_TINT ,
APPEARANCE_NAME_BODY_MARKING ,
SLIDER_NAME_CHARACTER_HEIGHT ,
} ,
[ SLIDER_SUBCAT_BODY_UPPER ] =
{
SLIDER_NAME_TORSO_SIZE ,
SLIDER_NAME_CHEST_SIZE ,
SLIDER_NAME_GUT_SIZE ,
SLIDER_NAME_WAIST_SIZE ,
SLIDER_NAME_ARM_SIZE ,
SLIDER_NAME_HAND_SIZE ,
} ,
[ SLIDER_SUBCAT_BODY_LOWER ] =
{
SLIDER_NAME_TAIL_SIZE ,
SLIDER_NAME_HIP_SIZE ,
SLIDER_NAME_BUTTOCKS_SIZE ,
SLIDER_NAME_LEG_SIZE ,
SLIDER_NAME_FOOT_SIZE ,
} ,
[ SLIDER_SUBCAT_VOICE ] =
{
APPEARANCE_NAME_VOICE ,
} ,
[ SLIDER_SUBCAT_FACE_HAIR ] =
{
APPEARANCE_NAME_HAIR_STYLE ,
APPEARANCE_NAME_HAIR_TINT ,
} ,
[ SLIDER_SUBCAT_FACE_FEATURES ] =
{
APPEARANCE_NAME_AGE ,
APPEARANCE_NAME_ACCESSORY ,
APPEARANCE_NAME_HEAD_MARKING ,
} ,
[ SLIDER_SUBCAT_FACE_FACE ] =
{
SLIDER_NAME_FOREHEAD_SLOPE ,
SLIDER_NAME_CHEEK_BONE_SIZE ,
SLIDER_NAME_CHEEK_BONE_HEIGHT ,
SLIDER_NAME_JAW_SIZE ,
SLIDER_NAME_CHIN_SIZE ,
SLIDER_NAME_CHIN_HEIGHT ,
SLIDER_NAME_NECK_SIZE ,
SLIDER_NAME_TOOTH_SIZE ,
} ,
[ SLIDER_SUBCAT_FACE_EYES ] =
{
APPEARANCE_NAME_EYE_TINT ,
SLIDER_NAME_EYE_SIZE ,
SLIDER_NAME_EYE_ANGLE ,
SLIDER_NAME_EYE_SEPARATION ,
SLIDER_NAME_EYE_HEIGHT ,
SLIDER_NAME_EYE_SQUINT ,
} ,
[ SLIDER_SUBCAT_FACE_BROW ] =
{
APPEARANCE_NAME_EYEBROW ,
SLIDER_NAME_EYEBROW_HEIGHT ,
SLIDER_NAME_EYEBROW_ANGLE ,
SLIDER_NAME_EYEBROW_SKEW ,
SLIDER_NAME_EYEBROW_DEPTH ,
} ,
[ SLIDER_SUBCAT_FACE_NOSE ] =
{
SLIDER_NAME_NOSE_SHAPE ,
SLIDER_NAME_NOSE_HEIGHT ,
SLIDER_NAME_NOSE_WIDTH ,
SLIDER_NAME_NOSE_LENGTH ,
} ,
[ SLIDER_SUBCAT_FACE_MOUTH ] =
{
SLIDER_NAME_MOUTH_HEIGHT ,
SLIDER_NAME_MOUTH_WIDTH ,
SLIDER_NAME_MOUTH_CURVE ,
SLIDER_NAME_LIP_FULLNESS ,
} ,
[ SLIDER_SUBCAT_FACE_EARS ] =
{
SLIDER_NAME_EAR_SIZE ,
SLIDER_NAME_EAR_ROTATION ,
SLIDER_NAME_EAR_HEIGHT ,
SLIDER_NAME_EAR_TIP_FLARE ,
} ,
}
local subCat1 = data1 . subCat
local subCat2 = data2 . subCat
if subCat1 ~= subCat2 then
return subCat1 < subCat2
end
return FindOrdering ( CONTROL_ORDERING [ subCat1 ] , name1 ) < FindOrdering ( CONTROL_ORDERING [ subCat2 ] , name2 )
end
local SLIDER_CATEGORY_TO_CREATE_BUCKET =
{
[ SLIDER_CATEGORY_AGE ] = CREATE_BUCKET_BODY ,
[ SLIDER_CATEGORY_BODY ] = CREATE_BUCKET_BODY ,
[ SLIDER_CATEGORY_FACE ] = CREATE_BUCKET_FACE ,
}
local APPEARANCE_NAME_TO_CREATE_BUCKET =
{
[ APPEARANCE_NAME_HAIR_STYLE ] = CREATE_BUCKET_FACE ,
[ APPEARANCE_NAME_HAIR_TINT ] = CREATE_BUCKET_FACE ,
[ APPEARANCE_NAME_SKIN_TINT ] = CREATE_BUCKET_BODY ,
[ APPEARANCE_NAME_ACCESSORY ] = CREATE_BUCKET_FACE ,
[ APPEARANCE_NAME_HEAD_MARKING ] = CREATE_BUCKET_FACE ,
[ APPEARANCE_NAME_BODY_MARKING ] = CREATE_BUCKET_BODY ,
[ APPEARANCE_NAME_EYE_TINT ] = CREATE_BUCKET_FACE ,
[ APPEARANCE_NAME_AGE ] = CREATE_BUCKET_FACE ,
[ APPEARANCE_NAME_EYEBROW ] = CREATE_BUCKET_FACE ,
[ APPEARANCE_NAME_VOICE ] = CREATE_BUCKET_FACE ,
}
local SUBCATEGORY_FOR_SLIDER =
{
[ SLIDER_NAME_FOREHEAD_SLOPE ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_CHEEK_BONE_SIZE ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_CHEEK_BONE_HEIGHT ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_CHIN_HEIGHT ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_CHIN_SIZE ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_JAW_SIZE ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_NECK_SIZE ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_TOOTH_SIZE ] = SLIDER_SUBCAT_FACE_FACE ,
[ SLIDER_NAME_NOSE_SHAPE ] = SLIDER_SUBCAT_FACE_NOSE ,
[ SLIDER_NAME_NOSE_LENGTH ] = SLIDER_SUBCAT_FACE_NOSE ,
[ SLIDER_NAME_NOSE_HEIGHT ] = SLIDER_SUBCAT_FACE_NOSE ,
[ SLIDER_NAME_NOSE_WIDTH ] = SLIDER_SUBCAT_FACE_NOSE ,
[ SLIDER_NAME_EYE_HEIGHT ] = SLIDER_SUBCAT_FACE_EYES ,
[ SLIDER_NAME_EYE_SIZE ] = SLIDER_SUBCAT_FACE_EYES ,
[ SLIDER_NAME_EYE_SEPARATION ] = SLIDER_SUBCAT_FACE_EYES ,
[ SLIDER_NAME_EYE_ANGLE ] = SLIDER_SUBCAT_FACE_EYES ,
[ SLIDER_NAME_EYE_SQUINT ] = SLIDER_SUBCAT_FACE_EYES ,
[ SLIDER_NAME_MOUTH_HEIGHT ] = SLIDER_SUBCAT_FACE_MOUTH ,
[ SLIDER_NAME_MOUTH_WIDTH ] = SLIDER_SUBCAT_FACE_MOUTH ,
[ SLIDER_NAME_LIP_FULLNESS ] = SLIDER_SUBCAT_FACE_MOUTH ,
[ SLIDER_NAME_MOUTH_CURVE ] = SLIDER_SUBCAT_FACE_MOUTH ,
[ SLIDER_NAME_EAR_HEIGHT ] = SLIDER_SUBCAT_FACE_EARS ,
[ SLIDER_NAME_EAR_SIZE ] = SLIDER_SUBCAT_FACE_EARS ,
[ SLIDER_NAME_EAR_TIP_FLARE ] = SLIDER_SUBCAT_FACE_EARS ,
[ SLIDER_NAME_EAR_ROTATION ] = SLIDER_SUBCAT_FACE_EARS ,
[ SLIDER_NAME_EYEBROW_HEIGHT ] = SLIDER_SUBCAT_FACE_BROW ,
[ SLIDER_NAME_EYEBROW_ANGLE ] = SLIDER_SUBCAT_FACE_BROW ,
[ SLIDER_NAME_EYEBROW_SKEW ] = SLIDER_SUBCAT_FACE_BROW ,
[ SLIDER_NAME_EYEBROW_DEPTH ] = SLIDER_SUBCAT_FACE_BROW ,
[ SLIDER_NAME_LEG_SIZE ] = SLIDER_SUBCAT_BODY_LOWER ,
[ SLIDER_NAME_HIP_SIZE ] = SLIDER_SUBCAT_BODY_LOWER ,
[ SLIDER_NAME_FOOT_SIZE ] = SLIDER_SUBCAT_BODY_LOWER ,
[ SLIDER_NAME_BUTTOCKS_SIZE ] = SLIDER_SUBCAT_BODY_LOWER ,
[ SLIDER_NAME_TAIL_SIZE ] = SLIDER_SUBCAT_BODY_LOWER ,
[ SLIDER_NAME_TORSO_SIZE ] = SLIDER_SUBCAT_BODY_UPPER ,
[ SLIDER_NAME_HAND_SIZE ] = SLIDER_SUBCAT_BODY_UPPER ,
[ SLIDER_NAME_GUT_SIZE ] = SLIDER_SUBCAT_BODY_UPPER ,
[ SLIDER_NAME_ARM_SIZE ] = SLIDER_SUBCAT_BODY_UPPER ,
[ SLIDER_NAME_CHEST_SIZE ] = SLIDER_SUBCAT_BODY_UPPER ,
[ SLIDER_NAME_WAIST_SIZE ] = SLIDER_SUBCAT_BODY_UPPER ,
[ SLIDER_NAME_CHARACTER_HEIGHT ] = SLIDER_SUBCAT_BODY_TYPE ,
}
local SUBCATEGORY_FOR_APPEARANCE =
{
[ APPEARANCE_NAME_HAIR_STYLE ] = SLIDER_SUBCAT_FACE_HAIR ,
[ APPEARANCE_NAME_HAIR_TINT ] = SLIDER_SUBCAT_FACE_HAIR ,
[ APPEARANCE_NAME_ACCESSORY ] = SLIDER_SUBCAT_FACE_FEATURES ,
[ APPEARANCE_NAME_HEAD_MARKING ] = SLIDER_SUBCAT_FACE_FEATURES ,
[ APPEARANCE_NAME_AGE ] = SLIDER_SUBCAT_FACE_FEATURES ,
[ APPEARANCE_NAME_BODY_MARKING ] = SLIDER_SUBCAT_BODY_FEATURES ,
[ APPEARANCE_NAME_SKIN_TINT ] = SLIDER_SUBCAT_BODY_FEATURES ,
[ APPEARANCE_NAME_EYE_TINT ] = SLIDER_SUBCAT_FACE_EYES ,
[ APPEARANCE_NAME_EYEBROW ] = SLIDER_SUBCAT_FACE_BROW ,
[ APPEARANCE_NAME_VOICE ] = SLIDER_SUBCAT_VOICE ,
}
end
-- If this was being suppressed changes MUST be applied now or there will be no slider data to build
KEYBOARD_BUCKET_MANAGER : AddControl ( ZO_CharacterCreateGenderSelection , CREATE_BUCKET_RACE , function ( ) self : UpdateGenderControl ( ) end )
KEYBOARD_BUCKET_MANAGER : AddControl ( ZO_CharacterCreateRace , CREATE_BUCKET_RACE , function ( ) self : UpdateRaceControl ( ) end )
KEYBOARD_BUCKET_MANAGER : AddControl ( ZO_CharacterCreateClassSelection , CREATE_BUCKET_CLASS , function ( ) self : UpdateClassControl ( ) end )
KEYBOARD_BUCKET_MANAGER : AddControl ( ZO_CharacterCreatePhysiqueSelection , CREATE_BUCKET_BODY , UpdateSlider , RandomizeSlider , SLIDER_SUBCAT_BODY_TYPE )
KEYBOARD_BUCKET_MANAGER : AddControl ( ZO_CharacterCreateFaceSelection , CREATE_BUCKET_FACE , UpdateSlider , RandomizeSlider , SLIDER_SUBCAT_FACE_TYPE )
-- TODO: this fixes a bug where the triangles don't reflect the correct data...there will be more fixes to pregameCharacterManager to address the real issue
-- (where the triangle data needs to live on its own rather than being tied to the unit)
local sliderData = { }
local bucket = SLIDER_CATEGORY_TO_CREATE_BUCKET [ category ]
sliderData [ # sliderData + 1 ] = { bucket = bucket , subCat = subCat , name = name , control = slider . control , }
end
end
if numValues > 0 then
local bucket = APPEARANCE_NAME_TO_CREATE_BUCKET [ appearanceName ]
local subCat = SUBCATEGORY_FOR_APPEARANCE [ appearanceName ]
sliderData [ # sliderData + 1 ] = { bucket = bucket , subCat = subCat , name = appearanceName , control = appearanceSlider . control , }
end
end
KEYBOARD_BUCKET_MANAGER : AddControl ( orderingData . control , orderingData . bucket , UpdateSlider , RandomizeSlider , orderingData . subCat )
end
end
end
local nameEdit = self . nameControl
end
-- Sanity check
return
end
local controlsInitialized = false
if characterMode == CHARACTER_MODE_CREATION then
-- assume that we have already initialized the controls because we have set the default template
controlsInitialized = true
if defaultTemplate == 0 then
-- default template was undefined so see if we generated a new random character
end
end
if not controlsInitialized then
end
self . characterStartLocation = nil
self . characterCreateOption = CHARACTER_CREATE_DEFAULT_LOCATION
end
ZO_CharacterCreateRaceName : SetText ( zo_strformat ( SI_RACE_NAME , GetRaceName ( currentGender , CharacterCreateGetRace ( characterMode ) ) ) )
ZO_CharacterCreateClassSelectionName : SetText ( zo_strformat ( SI_CLASS_NAME , GetClassName ( currentGender , CharacterCreateGetClass ( characterMode ) ) ) )
end
return button . defId == currentRace
end
return button . defId == currentAlliance
end
if race then
end
end
return button . gender == currentGender
end
end
return button . defId == currentClass
end
if class then
end
end
end
end
if characterName and # characterName > 0 then
if ZO_CHARACTERCREATE_MANAGER : GetShouldPromptForTutorialSkip ( ) and CanSkipTutorialArea ( ) and startLocation ~= CHARACTER_OPTION_CLEAN_TEST_AREA and startLocation ~= "CharacterSelect_FromIngame" then
-- color the character name white so it's highlighted in the dialog
local genderDecoratedCharacterName = ZO_SELECTED_TEXT : Colorize ( GetGrammarDecoratedName ( characterName , CharacterCreateGetGender ( characterMode ) ) )
ZO_Dialogs_ShowDialog ( "CHARACTER_CREATE_SKIP_TUTORIAL" , { startLocation = startLocation } , { mainTextParams = { genderDecoratedCharacterName } } )
else
end
end
end
local raceTemplate = characterInfo
if mode == CHARACTER_CREATE_MODE_EDIT_RACE then
raceTemplate = {
race = 0 ,
alliance = characterInfo . alliance ,
}
end
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateRaceSelectorsForTemplate ( ... ) end , self . characterData : GetRaceInfo ( ) , raceTemplate , self . raceRadioGroup )
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateClassSelectorsForTemplate ( ... ) end , self . characterData : GetClassInfo ( ) , characterInfo , self . classRadioGroup )
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateAllianceSelectorsForTemplate ( ... ) end , self . characterData : GetAllianceInfo ( ) , characterInfo , self . allianceRadioGroup )
end
end
end
-- we may not have any template selected or we have no templates
-- so create a default template with no restrictions
if templateData == nil then
end
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateRaceSelectorsForTemplate ( ... ) end , self . characterData : GetRaceInfo ( ) , templateData , self . raceRadioGroup )
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateClassSelectorsForTemplate ( ... ) end , self . characterData : GetClassInfo ( ) , templateData , self . classRadioGroup )
self : UpdateSelectorsForTemplate ( function ( ... ) return self : UpdateAllianceSelectorsForTemplate ( ... ) end , self . characterData : GetAllianceInfo ( ) , templateData , self . allianceRadioGroup )
end
--
--[[ XML Handlers and global functions ]] --
--
end
end
end
end
local nameIsValid = ( # nameViolations == 0 )
if nameIsValid then
editControl : SetColor ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_TEXT_COLORS , INTERFACE_TEXT_COLOR_NORMAL ) )
else
editControl : SetColor ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_TEXT_COLORS , INTERFACE_TEXT_COLOR_FAILED ) )
end
return nameIsValid , nameViolations
end
-- Validation changes the text in the edit control, which causes this to be called again, bail if we're already validating to avoid recursion.
if editControl . validating then
return
end
editControl . validating = true
if isValidName then
else
else
end
end
editControl . validating = nil
end
end
end
end
end
local selectorClickHandlers =
{
[ CHARACTER_CREATE_SELECTOR_RACE ] = function ( button )
end ,
[ CHARACTER_CREATE_SELECTOR_CLASS ] = function ( button )
end ,
[ CHARACTER_CREATE_SELECTOR_ALLIANCE ] = function ( button )
end ,
}
end
end
SetTooltipText ( InformationTooltip , zo_strformat ( button . tooltipFormatter , button . nameFn ( CharacterCreateGetGender ( characterMode ) , button . defId ) ) )
end
-- If a button is disabled, add any disable reasons to the tooltip
-- Check if disabled due to a barbershop mode
if characterCreateMode ~= CHARACTER_CREATE_MODE_CREATE then
local selectorType = button . selectorType
local addDisableReason = false
local tokenType
if characterCreateMode == CHARACTER_CREATE_MODE_EDIT_APPEARANCE then
tokenType = SERVICE_TOKEN_APPEARANCE_CHANGE
addDisableReason = selectorType == CHARACTER_CREATE_SELECTOR_RACE or selectorType == CHARACTER_CREATE_SELECTOR_CLASS or selectorType == CHARACTER_CREATE_SELECTOR_ALLIANCE
elseif characterCreateMode == CHARACTER_CREATE_MODE_EDIT_RACE then
tokenType = SERVICE_TOKEN_RACE_CHANGE
addDisableReason = selectorType == CHARACTER_CREATE_SELECTOR_CLASS or selectorType == CHARACTER_CREATE_SELECTOR_ALLIANCE
end
if addDisableReason then
InformationTooltip : AddLine ( zo_strformat ( SI_CREATE_CHARACTER_SELECTOR_TOKEN_DISABLED , tokenString ) , "" , ZO_NORMAL_TEXT : UnpackRGB ( ) )
end
end
-- Check for race specific disable reasons
if button . selectorType == CHARACTER_CREATE_SELECTOR_RACE then
local restrictionString = ZO_CHARACTERCREATE_MANAGER . GetOptionRestrictionString ( restrictionReason , restrictingCollectible )
if restrictionString ~= "" then
end
-- Check for class specific disable reasons
elseif button . selectorType == CHARACTER_CREATE_SELECTOR_CLASS then
local restrictionString = ZO_CHARACTERCREATE_MANAGER . GetOptionRestrictionString ( restrictionReason , restrictingCollectible )
if restrictionString ~= "" then
end
end
end
end
end
end
end
if currentTab then
end
end
end |