public void InitPanel() { mCharacterToggle.Add(CharacterToggleEvent); mSendBtn.Add(SendBtnEvent); InitSpeedinessGroup(); InitExpressionGroup(); }
public void InitPanel() { mMusicToggle.Add(MusicToggleEvent); mSoundToggle.Add(SoundToggleEvent); mExitBtn.Add(ExitBtnEvnet); mCloseBtn.Add(Hide); }
public void InitPanel() { mShareHaveAwardToggle.Add(ShareHaveAwardToggleEvent); mSignInActivityToggle.Add(SignInActivityToggleEvent); mTurntableActivityToggle.Add(TurntableActivityToggleEvent); mSignInActivityToggle.isOn = true; }
public void InitPanel() { _CirclePanelComponent = UIComponent.GetUiView <FriendCirclePanelComponent>(); mRoomListToggle.Add(RoomListToggleEvent); mMilitaryBtn.Add(MilitaryToggleEvent, false); mRankingToggle.Add(RankingToggleEvent); mManageToggle.Add(ManageToggleEvent); mApplyToggle.Add(ApplyToggleEvent); }
private int _CurrUIInFriendsCircleId = 0;//当前界面显示的信息对应的亲友圈ID public async Task RefreshViewInfo() { mRecemmendStatuToggle.onValueChanged.RemoveAllListeners(); mRecemmendStatuToggle.isOn = FrienCircleComponet.Ins.CuurSelectFriendsCircle.IsRecommend; mRecemmendStatuToggle.Add(RecemmendStatuToggleEvent); await InitMemberList(); _CurrUIInFriendsCircleId = FrienCircleComponet.Ins.CuurSelectFriendsCircle.FriendsCircleId; }
public void InitPanel() { _ActivityView = mActivityViewGo.AddItem <ActivityView>(); _AnnouncementView = mAnnouncementViewGo.AddItem <AnnouncementView>(); mCloseBtn.Add(Hide); mActivityToggle.Add(ActivityToggleEvent); mAnnouncementToggle.Add(AnnouncementToggleEvent); }
public override void Awake(GameObject go, AnnouncementConfig data, string uiType) { base.Awake(go, data, uiType); _Toggle = gameObject.GetComponent <Toggle>(); _NameText = gameObject.FindChild("Text").GetComponent <Text>(); _HicNameText = gameObject.FindChild("hic/Text").GetComponent <Text>(); _Toggle.Add(ToggleEvent); _NameText.text = mData.Name; _HicNameText.text = mData.Name; }
public void InitPanel() { Ins = this; mNormalWanFaToggle.Add(NormalWanFaToggleEvent); //正常房间 mFreedomWanFaToggle.Add(FreedomWanFaToggleEvent); //自由创建的房间 mRecordPerformanceBtn.Add(RecordPerformanceBtnEvent); //DOTO 战绩面板待实现 mCreateRoomBtn.Add(CreateRoomBtnEvent); //创建房间 mFastJoinBtn.Add(FastJoinBtnEvent); //快速加入 mRefreshBtn.Add(RefreshBtnEvent); //刷新按钮 就是刷新房间列表 _broadcastPlay.RegisterBroadcast(mAnnouncementText, FrienCircleComponet.Ins.CuurSelectFriendsCircle.Announcement); //公告赋值 mNormalWanFaToggle.isOn = true; //默认显示 默认玩法 }
public MultiSelectFoldout(PackageToolBarRegularButton button = null) { m_Toggle = new Toggle { name = "multiSelectFoldoutToggle", classList = { "containerTitle", "expander" } }; m_Container = new VisualElement { name = "multiSelectFoldoutContainer" }; Add(m_Toggle); Add(m_Container); SetExpanded(false); m_Toggle.RegisterValueChangedCallback(evt => SetExpanded(evt.newValue)); m_Button = button; if (button != null) { m_Toggle.Add(button.element); } }
// 0 = Value, 1 = name, 2 = public, 3 = synced, 4 = syncType public UdonParameterProperty(UdonGraph graphView, UdonNodeDefinition definition, UdonNodeData nodeData) { this.graph = graphView; this.definition = definition; this.nodeData = nodeData; // Make sure the incoming nodeData has the right number of nodeValues (super old graphs didn't have sync info) if (this.nodeData.nodeValues.Length != 5) { this.nodeData.nodeValues = GetDefaultNodeValues(); for (int i = 0; i < nodeData.nodeValues.Length; i++) { this.nodeData.nodeValues[i] = nodeData.nodeValues[i]; } } // Public Toggle isPublic = new Toggle { text = "public", value = (bool)GetValue(ValueIndices.isPublic) }; #if UNITY_2019_3_OR_NEWER isPublic.RegisterValueChangedCallback( #else isPublic.OnValueChanged( #endif e => { SetNewValue(e.newValue, ValueIndices.isPublic); }); Add(isPublic); // Is Synced Field isSynced = new Toggle { text = "synced", value = (bool)GetValue(ValueIndices.isSynced), }; #if UNITY_2019_3_OR_NEWER isSynced.RegisterValueChangedCallback( #else isSynced.OnValueChanged( #endif e => { SetNewValue(e.newValue, ValueIndices.isSynced); syncField.visible = e.newValue; }); Add(isSynced); // Sync Field, add to isSynced List <string> choices = new List <string>() { "none", "linear", "smooth" }; syncField = new EditorUI.PopupField <string>(choices, 0) { visible = isSynced.value }; #if UNITY_2019_3_OR_NEWER syncField.RegisterValueChangedCallback( #else syncField.OnValueChanged( #endif e => { SetNewValue(e.newValue, ValueIndices.syncType); }); isSynced.Add(syncField); // Container to show/edit Default Value var friendlyName = UdonGraphExtensions.FriendlyTypeName(definition.type).FriendlyNameify(); defaultValueContainer = new VisualElement(); defaultValueContainer.Add( new Label("default value") { name = "default-value-label" }); // Generate Default Value Field var value = TryGetValueObject(out object result); _inputField = UdonFieldFactory.CreateField( definition.type, result, newValue => SetNewValue(newValue, ValueIndices.value) ); if (_inputField != null) { defaultValueContainer.Add(_inputField); Add(defaultValueContainer); } }
public void InitPanel() { mDescText.text = mData.Describe; mSelectToggle.Add(ToggleEvent); }
// 0 = Value, 1 = name, 2 = public, 3 = synced, 4 = syncType public UdonParameterProperty(UdonGraph graphView, UdonNodeDefinition definition, UdonNodeData nodeData) { this.graph = graphView; this.definition = definition; this.nodeData = nodeData; string friendlyName = UdonGraphExtensions.FriendlyTypeName(definition.type).FriendlyNameify(); // Public Toggle isPublic = new Toggle { text = "public", value = (bool)GetValue(ValueIndices.isPublic) }; #if UNITY_2019_3_OR_NEWER isPublic.RegisterValueChangedCallback( #else isPublic.OnValueChanged( #endif e => { SetNewValue(e.newValue, ValueIndices.isPublic); }); Add(isPublic); if (UdonNetworkTypes.CanSync(definition.type)) { // Is Synced Field isSynced = new Toggle { text = "synced", value = (bool)GetValue(ValueIndices.isSynced), name = "syncToggle", }; #if UNITY_2019_3_OR_NEWER isSynced.RegisterValueChangedCallback( #else isSynced.OnValueChanged( #endif e => { SetNewValue(e.newValue, ValueIndices.isSynced); syncField.visible = e.newValue; }); // Sync Field, add to isSynced List <string> choices = new List <string>() { "none" }; if (UdonNetworkTypes.CanSyncLinear(definition.type)) { choices.Add("linear"); } if (UdonNetworkTypes.CanSyncSmooth(definition.type)) { choices.Add("smooth"); } syncField = new EditorUI.PopupField <string>(choices, 0) { visible = isSynced.value, }; syncField.Insert(0, new Label("smooth:")); #if UNITY_2019_3_OR_NEWER syncField.RegisterValueChangedCallback( #else syncField.OnValueChanged( #endif e => { SetNewValue(e.newValue, ValueIndices.syncType); }); // Only show sync smoothing dropdown if there are choices to be made if (choices.Count > 1) { isSynced.Add(syncField); } Add(isSynced); } else { // Cannot Sync SetNewValue(false, ValueIndices.isSynced); Add(new Label($"{friendlyName} cannot be synced.")); } // Container to show/edit Default Value defaultValueContainer = new VisualElement(); defaultValueContainer.Add( new Label("default value") { name = "default-value-label" }); // Generate Default Value Field var value = TryGetValueObject(out object result); _inputField = UdonFieldFactory.CreateField( definition.type, result, newValue => SetNewValue(newValue, ValueIndices.value) ); if (_inputField != null) { defaultValueContainer.Add(_inputField); Add(defaultValueContainer); } }