81 #ifdef PLATFORM_CONSOLE
82 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/character_creation/xbox/character_creation.layout");
83 m_CharacterSaved =
false;
85 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/character_creation/pc/character_creation.layout");
88 m_CharacterRotationFrame = layoutRoot.FindAnyWidget(
"character_rotation_frame");
89 m_Apply = layoutRoot.FindAnyWidget(
"apply");
90 m_Save = layoutRoot.FindAnyWidget(
"save");
91 m_RandomizeCharacter = layoutRoot.FindAnyWidget(
"randomize_character");
92 m_BackButton = layoutRoot.FindAnyWidget(
"back");
93 m_Version = TextWidget.Cast(layoutRoot.FindAnyWidget(
"version"));
94 m_DetailsRoot = layoutRoot.FindAnyWidget(
"menu_details_tooltip");
95 m_DetailsLabel = TextWidget.Cast(
m_DetailsRoot.FindAnyWidget(
"menu_details_label"));
97 m_CharacterHeaderText = TextWidget.Cast(layoutRoot.FindAnyWidget(
"char_header_text"));
98 m_PlayedCharacterInfo = layoutRoot.FindAnyWidget(
"played_char_info");
102 #ifdef PLATFORM_CONSOLE
103 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
105 version =
"#main_menu_version" +
" " + version;
107 m_Version.SetText(version);
114 m_NameSelector =
new OptionSelectorEditbox(layoutRoot.FindAnyWidget(
"character_name_setting_option"), m_Scene.
GetIntroCharacter().GetCharacterName(), null,
false);
118 m_GenderSelector.SetValue(
"Female");
123 m_GenderSelector.SetValue(
"Male");
131 m_GenderSelector.ShowNavigationButtons(
true);
132 m_SkinSelector.ShowNavigationButtons(
true);
133 m_TopSelector.ShowNavigationButtons(
true);
134 m_BottomSelector.ShowNavigationButtons(
true);
135 m_ShoesSelector.ShowNavigationButtons(
true);
137 if (!m_MultiOptionSelectors)
140 m_MultiOptionSelectors.Insert(layoutRoot.FindAnyWidget(
"character_gender_button"), m_GenderSelector);
141 m_MultiOptionSelectors.Insert(layoutRoot.FindAnyWidget(
"character_head_button"), m_SkinSelector);
142 m_MultiOptionSelectors.Insert(layoutRoot.FindAnyWidget(
"character_top_button"), m_TopSelector);
143 m_MultiOptionSelectors.Insert(layoutRoot.FindAnyWidget(
"character_bottom_button"), m_BottomSelector);
144 m_MultiOptionSelectors.Insert(layoutRoot.FindAnyWidget(
"character_shoes_button"), m_ShoesSelector);
152 m_TopSelector.SetValue(obj.GetType(),
false);
154 obj = scene_char.GetInventory().FindAttachment(
InventorySlots.LEGS);
156 m_BottomSelector.SetValue(obj.GetType(),
false);
158 obj = scene_char.GetInventory().FindAttachment(
InventorySlots.FEET);
160 m_ShoesSelector.SetValue(obj.GetType(),
false);
162 m_SkinSelector.SetValue(scene_char.GetType());
165 m_GenderSelector.m_OptionChanged.Insert(GenderChanged);
166 m_SkinSelector.m_OptionChanged.Insert(SkinChanged);
167 m_TopSelector.m_OptionChanged.Insert(TopChanged);
168 m_BottomSelector.m_OptionChanged.Insert(BottomChanged);
169 m_ShoesSelector.m_OptionChanged.Insert(ShoesChanged);
258 m_GenderSelector.SetValue(
"Female");
260 m_SkinSelector.SetRandomValue();
264 m_GenderSelector.SetValue(
"Male");
266 m_SkinSelector.SetRandomValue();
272 m_BottomSelector.SetValue(
GetGame().GetMenuDefaultCharacterData().GetAttachmentMap().
Get(
InventorySlots.LEGS),
false);
273 m_ShoesSelector.SetValue(
GetGame().GetMenuDefaultCharacterData().GetAttachmentMap().
Get(
InventorySlots.FEET),
false);
455 #ifndef PLATFORM_CONSOLE
456 bool show = header !=
"" && desc !=
"";
458 m_DetailsLabel.SetText(header);
459 m_DetailsText.SetText(desc);
464 float parent_pos_x, parent_pos_y;
465 float parent_size_x, parent_size_y;
466 float layout_size_x, layout_size_y;
468 w.GetScreenPos(parent_pos_x,parent_pos_y);
469 w.GetScreenSize(parent_size_x,parent_size_y);
470 layoutRoot.GetScreenSize(layout_size_x,layout_size_y);
472 float set_x = layout_size_x - parent_pos_x;
473 float set_y = layout_size_y - parent_pos_y - parent_size_y;
477 m_DetailsText.Update();
478 m_DetailsLabel.Update();
514 #ifdef PLATFORM_CONSOLE
515 if (
GetGame().GetUserManager() &&
GetGame().GetUserManager().GetSelectedUser())
518 if (
name.LengthUtf8() > 16)
530 m_NameSelector.SetValue(
name);
534 #ifdef PLATFORM_CONSOLE
535 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
537 m_Apply.Show(m_CharacterSaved || !m_Scene.
GetIntroCharacter().IsDefaultCharacter());
538 m_Save.Show(!m_CharacterSaved && m_Scene.
GetIntroCharacter().IsDefaultCharacter());
540 version =
"#main_menu_version" +
" " + version;
548 m_CharacterHeaderText.SetText(
"#character_menu_header");
552 m_CharacterHeaderText.SetText(
"#server_browser_prev_play_filter");
555 m_Version.SetText(version);
557 #ifdef PLATFORM_CONSOLE
625 if (w.IsInherited(ButtonWidget))
627 ButtonWidget button = ButtonWidget.Cast(w);
628 button.SetTextColor(
ARGB(255, 200, 0, 0));
631 w.SetColor(
ARGB(255, 0, 0, 0));
633 TextWidget text1 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text"));
634 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_label"));
635 TextWidget text3 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text_1"));
636 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() +
"_image"));
637 Widget option = Widget.Cast(w.FindAnyWidget(w.GetName() +
"_option_wrapper"));
638 Widget option_label = w.FindAnyWidget(
"option_label");
642 text1.SetColor(
ARGB(255, 255, 0, 0));
647 text2.SetColor(
ARGB(255, 255, 0, 0));
652 text3.SetColor(
ARGB(255, 255, 0, 0));
658 image.SetColor(
ARGB(255, 200, 0, 0));
663 option.SetColor(
ARGB(255, 255, 0, 0));
666 #ifndef PLATFORM_CONSOLE
669 option_label.SetColor(
ARGB(255, 255, 0, 0));
676 if (w.IsInherited(ButtonWidget))
678 ButtonWidget button = ButtonWidget.Cast(w);
682 TextWidget text1 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text"));
683 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text_1"));
684 TextWidget text3 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_label"));
685 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() +
"_image"));
686 Widget option = w.FindAnyWidget(w.GetName() +
"_option_wrapper");
687 Widget option_label = w.FindAnyWidget(
"option_label");
712 option.SetColor(
ARGB(150, 255, 255, 255));
715 #ifndef PLATFORM_CONSOLE
725 #ifndef PLATFORM_CONSOLE
731 ButtonWidget button = ButtonWidget.Cast(w);
738 TextWidget text1 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text"));
739 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_label"));
740 TextWidget text3 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text_1"));
741 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() +
"_image"));
742 Widget option = Widget.Cast(w.FindAnyWidget(w.GetName() +
"_option_wrapper"));
743 Widget option_label = w.FindAnyWidget(
"option_label");
771 #ifndef PLATFORM_CONSOLE
774 option_label.SetColor(
ColorManager.COLOR_DISABLED_TEXT);
789 #ifdef PLATFORM_CONSOLE
800 string result =
string.Format(
"<image set=\"%1\" name=\"%2\" scale=\"%3\" />",
"playstation_buttons",
"DPAD_left_short", 1.92);
801 string result2 =
string.Format(
"<image set=\"%1\" name=\"%2\" scale=\"%3\" />",
"playstation_buttons",
"DPAD_right_short", 1.92);
803 string result =
string.Format(
"<image set=\"%1\" name=\"%2\" scale=\"%3\" />",
"xbox_buttons",
"DPAD_left_short", 1.92);
804 string result2 =
string.Format(
"<image set=\"%1\" name=\"%2\" scale=\"%3\" />",
"xbox_buttons",
"DPAD_right_short", 1.92);
806 text +=
string.Format(
" %1%2 %3", result, result2,
"#layout_character_creation_toolbar_select");
809 toolbar_text.SetText(text);
819 toolbar_y2.SetText(saveTextIcon);
820 toolbar_y2_2.SetText(saveTextIcon);