Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 00264 00265 00266 00267 00268 00269 00270 00271 00272 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 00363 00364 00365 00366 00367 00368 00369 00370 00371 00372 00373 00374 00375 00376 00377 00378 00379 00380 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 00398 00399 00400 00401 00402 00403 00404 00405 00406 00407 00408 00409 00410 00411 00412 00413 00414 00415 00416 00417 00418 00419 00420 00421 00422 00423 00424 00425 00426 00427 00428 00429 00430 00431 00432 00433 00434 00435 00436 00437 00438 00439 00440 00441 00442 00443 00444 00445 00446 00447 00448 00449 00450 00451 00452 00453 00454 00455 00456 00457 00458 00459 00460 00461 00462 00463 00464 00465 00466 00467 00468 00469 00470 00471 00472 00473 00474 00475 00476 00477 00478 00479 00480 00481 00482 00483 00484 00485 00486 00487 00488 00489 00490 00491 00492 00493 00494 00495 00496 00497 00498 00499 00500 00501 00502 00503 00504 00505 00506 00507 00508 00509 00510 00511 00512 00513 00514 00515 00516 00517 00518 00519 00520 00521 00522 00523 00524 00525 00526 00527 00528 00529 00530 00531 00532 00533 00534 00535 00536 00537 00538 00539 00540 00541 00542 00543 00544 00545 00546 00547 00548 00549 00550 00551 00552 00553 00554 00555 00556 00557 00558 00559 00560 00561 00562 00563 00564 00565 00566 00567 00568 00569 00570 00571 00572 00573 00574 00575 00576 00577 00578 00579 00580 00581 00582 00583 00584 00585 00586 00587 00588 00589 00590 00591 00592 00593 00594 00595 00596 00597 00598 00599 00600 00601 00602 00603 00604 00605 00606 00607 00608 00609 00610 00611 00612 00613 00614 00615 00616 00617 00618 00619 00620 00621 00622 00623 00624 00625 00626 00627 00628 00629 00630 00631 00632 00633 00634 00635 00636 00637 00638 00639 00640 00641 00642 00643 00644 00645 00646 00647 00648 00649 00650 00651 00652 00653 00654 00655 00656 00657 00658 00659 00660 00661 00662 00663 00664 00665 00666 00667 00668 00669 00670 00671 00672 00673 00674 00675 00676 00677 00678 00679 00680 00681 00682 00683 00684 00685 00686 00687 00688 00689 00690 00691 00692 00693 00694 00695 00696 00697 00698 00699 00700 00701 00702 00703 00704 00705 00706 00707 00708 00709 00710 00711 00712 00713 00714 00715 00716 00717 00718 00719 00720 00721 00722 00723 00724 00725 00726 00727 00728 00729 00730 00731 00732 00733 00734 00735 00736 00737 00738 00739 00740 00741 00742 00743 00744 00745 00746 00747 00748 00749 00750 00751 00752 00753 00754 00755 00756 00757 00758 00759 00760 00761 00762 00763 00764 00765 00766 00767 00768 00769 00770 00771 00772 00773 00774 00775 00776 00777 00778 00779 00780 00781 00782 00783 00784 00785 00786 00787 00788 00789 00790 00791 00792 00793 00794 00795 00796 00797 00798 00799 00800 00801 00802 00803 00804 00805 00806 00807 00808 00809 00810 00811 00812 00813 00814 00815 00816 00817 00818 00819 00820 00821 00822 00823 00824 00825 00826 00827 00828 00829 00830 00831 00832 00833 00834 00835 00836 00837 00838 00839 00840 00841 00842 00843 00844 00845 00846 00847 00848 00849 00850 00851 00852 00853 00854 00855 00856 00857 00858 00859 00860 00861 00862 00863 00864 00865 00866 00867 00868 00869 00870 00871 00872 00873 00874 00875 00876 00877 00878 00879 00880 00881 00882 00883 00884 00885 00886 00887 00888 00889 00890 00891 00892 00893 00894 00895 00896 00897 00898 00899 00900 00901 00902 00903 00904 00905 00906 00907 00908 00909 00910 00911 00912 00913 00914 00915 00916 00917 00918 00919 00920 00921 00922 00923 00924 00925 00926 00927 00928 00929 00930 00931 00932 00933 00934 00935 00936 00937 00938 00939 00940 00941 00942 00943 00944 00945 00946 00947 00948 00949 00950 00951 00952 00953 00954 00955 00956 00957 00958 00959 00960 00961 00962 00963 00964 00965 00966 00967 00968 00969 00970 00971 00972 00973 00974 00975 00976 00977 00978 00979 00980 00981 00982 00983 00984 00985 00986 00987 00988 00989 00990 00991 00992 00993 00994 00995 00996 00997 00998 00999 01000 01001 01002 01003 01004 01005 01006 01007 01008 01009 01010 01011 01012 01013 01014 01015 01016 01017 01018 01019 01020 01021 01022 01023 01024 01025 01026 01027 01028 01029 01030 01031 01032 01033 01034 01035 01036 01037 01038 01039 01040 01041 01042 01043 01044 01045 01046 01047 01048 01049 01050 01051 01052 01053 01054 01055 01056 01057 01058 01059 01060 01061 01062 01063 01064 01065 01066 01067 01068 01069 01070 01071 01072 01073 01074 01075 01076 01077 01078 01079 01080 01081 01082 01083 01084 01085 01086 01087 01088 01089 01090 01091 01092 01093 01094 01095 01096 01097 01098 01099 01100 01101 01102 01103 01104 01105 01106 01107 01108 01109 01110 01111 01112 01113 01114 01115 01116 01117 01118 01119 01120 01121 01122 01123 01124 01125 01126 01127 01128 01129 01130 01131 01132 01133 01134 01135 01136 01137 01138 01139 01140 01141 01142 01143 01144 01145 01146 01147 01148 01149 01150 01151 01152 01153 01154 01155 01156 01157 01158 01159 01160 01161 01162 01163 01164 01165 01166 01167 01168 01169 01170 01171 01172 01173 01174 01175 01176 01177 01178 01179 01180 01181 01182 01183 01184 01185 01186 01187 01188 01189 01190 01191 01192 01193 01194 01195 01196 01197 01198 01199 01200 01201 01202 01203 01204 01205 01206 01207 01208 01209 01210 01211 01212 01213 01214 01215 01216 01217 01218 01219 01220 01221 01222 01223 01224 01225 01226 01227 01228 01229 01230 01231 01232 01233 01234 01235 01236 01237 01238 01239 01240 01241 01242 01243 01244 01245 01246 01247 01248 01249 01250 01251 01252 01253 01254 01255 01256 01257 01258 01259 01260 01261 01262 01263 01264 01265 01266 01267 01268 01269 01270 01271 01272 01273 01274 01275 01276 01277 01278 01279 01280 01281 01282 01283 01284 01285 01286 01287 01288 01289 01290 01291 01292 01293 01294 01295 01296 01297 01298 01299 01300 01301 01302 01303 01304 01305 01306 01307 01308 01309 01310 01311 01312 01313 01314 01315 01316 01317 01318 01319 01320 01321 01322 01323 01324 01325 01326 01327 01328 01329 01330 01331 01332 01333 01334 01335 01336 01337 01338 01339 01340 01341 01342 01343 01344 01345 01346 01347 01348 01349 01350 01351 01352 01353 01354 01355 01356 01357 01358 01359 01360 01361 01362 01363 01364 01365 01366 01367 01368 01369 01370 01371 01372 01373 01374 01375 01376 01377 01378 01379 01380 01381 01382 01383 01384 01385 01386 01387 01388 01389 01390 01391 01392 01393 01394 01395 01396 01397 01398 01399 01400 01401 01402 01403 01404 01405 01406 01407 01408 01409 01410 01411 01412 01413 01414 01415 01416 01417 01418 01419 01420 01421 01422 01423 01424 01425 01426 01427 01428 01429 01430 01431 01432 01433 01434 01435 01436 01437 01438 01439 01440 01441 01442 01443 01444 01445 01446 01447 01448 01449 01450 01451 01452 01453 01454 01455 01456 01457 01458 01459 01460 01461 01462 01463 01464 01465 01466 01467 01468 01469 01470 01471 01472 01473 01474 01475 01476 01477 01478 01479 01480 01481 01482 01483 01484 01485 01486 01487 01488 01489 01490 01491 01492 01493 01494 01495 01496 01497 01498 01499 01500 01501 01502 01503 01504 01505 01506 01507 01508 01509 01510 01511 01512 01513 01514 01515 01516 01517 01518 01519 01520 01521 01522 01523 01524 01525 01526 01527 01528 01529 01530 01531 01532 01533 01534 01535 01536 01537 01538 01539 01540 01541 01542 01543 01544 01545 01546 01547 01548 01549 01550 01551 01552 |
//============================================================================== // Created on: 10/15/2003 // Graphical User Interface for MP3 & OGG player control // // Written by Ron Prestenback // © 2003, Epic Games, Inc. All Rights Reserved //============================================================================== class StreamPlayer extends FloatingWindow; var() Automated GUIImage Bk1,bk2; var() Automated GUISectionBackground sb_PlayList, sb_Management; var() Automated GUIScrollTextBox lb_SongInfo; var() Automated GUILabel l_Time; var() Automated GUIListBox lb_Playlist,lb_AllPlaylists; var() Automated GUIButton b_BotA, b_BotB, b_BotC; var() Automated GUISlider sl_Volume; var() Automated GUIGFXButton b_Play, b_Stop, b_NextTrack, b_PrevTrack, b_Playlist, b_Management; var() Automated GUICheckboxButton ch_Shuffle, ch_ShuffleAll, ch_Repeat, ch_RepeatAll; var() editconst noexport GUIList li_Playlist, li_AllLists; var() editconst noexport editinline StreamInteraction Handler; var() editconst noexport editinline StreamPlaylistManager PlaylistManager; var() editconst noexport editinline StreamPlaylist CurrentPlaylist; var() config string OptionsMenu; var() config string ID3TagEditorMenu; var() config string PlaylistEditorMenu; var() config float ExpandedHeight; var() float ConstrictedHeight; var() editconst noexport int SongSeconds; var() Material PauseImage, PlayImage, OpenFolder, ClosedFolder; var() localized string CollapsePlaylistHint, ExpandPlaylistHint, PlayHint, PauseHint, CollapseManagementHint, ExpandManagementHint; var() localized string RenameCaption, NewCaption, PlaylistNameCaption; var() localized string PLAdd,PLRemove,PLClear; var() localized string MGNew,MGRemove,MGRename; var() int DebugIndex; var() bool bExpand, bConstrict; var() editconst noexport GUIContextMenu cm_Playlist, cm_AllLists; enum epbWinMode // Defines the various states of a component { MODE_Compact, // Compact, just the player controls MODE_PlayList, // Play list is showing MODE_Manager, // Play list manage is showing }; var() epbWinMode WindowMode; function InitComponent( GUIController MyController, GUIComponent MyOwner ) { Super.InitComponent(MyController, MyOwner); li_Playlist = lb_Playlist.List; li_Playlist.TextAlign = TXTA_Left; li_Playlist.OnDblClick = PlaylistDblClick; li_Playlist.OnChange = InternalOnChange; li_Playlist.bMultiSelect = True; li_Playlist.bDropSource = True; li_Playlist.bDropTarget = True; li_Playlist.OnDragDrop = PlaylistReceiveDrop; li_Playlist.OnEndDrag = PlaylistDragEnded; li_Playlist.ContextMenu = cm_Playlist; li_AllLists = lb_AllPlaylists.List; li_AllLists.TextAlign = TXTA_Left; li_AllLists.OnDblClick = PlaylistDblClick; li_AllLists.OnChange = InternalOnChange; li_Alllists.bMultiSelect = False; li_AllLists.bDropTarget = True; li_AllLists.bInitializeList = False; li_AllLists.ContextMenu = cm_AllLists; li_AllLists.OnDragDrop = AllListsReceiveDrop; sl_Volume.OnPreDrawCaption = SliderPreDrawCaption; sb_PlayList.ManageComponent(lb_PlayList); sb_Management.ManageComponent(lb_AllPlayLists); } function ResolutionChanged( int ResX, int ResY ) { if (WindowMode==MODE_Compact) Constrict(); super.ResolutionChanged(ResX,ResY); } event Opened( GUIComponent Sender ) { Super.Opened(Sender); Constrict(); if ( !SetPlaylistManager() ) Warn("Error setting PlaylistManager!"); sl_Volume.SetValue( float(PlayerOwner().ConsoleCommand("get ini:Engine.Engine.AudioDevice MusicVolume")) ); RefreshPlaylistSelections(); RefreshCurrentPlaylist(); RefreshPlaybackOptions(); } event Closed(GUIComponent Sender, bool bCancelled) { local int i; i = Controller.FindMenuIndexByName(PlaylistEditorMenu); if ( Controller.bCurMenuInitialized && i != -1 ) Controller.RemoveMenuAt(i,true); Super.Closed(Sender, bCancelled); PlaylistManager.Save(); HideAll(); } function SaveCurrentPosition() { if (WindowMode!=MODE_Compact) ExpandedHeight = WinHeight; DefaultLeft = WinLeft; DefaultTop = WinTop; DefaultWidth = WinWidth; if ( Controller.ResX <= 640 ) DefaultHeight = 0.32; else DefaultHeight = 0.27; SaveConfig(); } function bool SetHandler() { local int i; if ( Controller == None || Controller.ViewportOwner == None ) return false; for ( i = 0; i < Controller.ViewportOwner.LocalInteractions.Length; i++ ) { if ( StreamInteraction(Controller.ViewportOwner.LocalInteractions[i]) != None ) { Handler = StreamInteraction(Controller.ViewportOwner.LocalInteractions[i]); Handler.OnStreamChanged = HandleStreamChange; Handler.OnStreamingStopped = HandleStreamStop; Handler.OnAdjustVolume = HandleAdjustVolume; return true; } } log("StreamPlayer.SetHandler() - no StreamInteractions found!",'MusicPlayer'); return false; } function bool SetPlaylistManager() { if ( PlaylistManager != None ) { if ( Handler == None && !SetHandler() ) return false; return true; } if ( Handler == None && !SetHandler() ) return false; PlaylistManager = Handler.PlaylistManager; PlaylistManager.ChangedActivePlaylist = ActivePlaylistChanged; return PlaylistManager != None; } // Reload the values for shuffle, repeat, and volume function RefreshPlaybackOptions() { sl_Volume.SetValue( Handler.GetStreamVolume() ); ch_Shuffle.bChecked = PlaylistManager.GetShuffle(); ch_ShuffleAll.bChecked = PlaylistManager.GetShuffleAll(); ch_Repeat.bChecked = PlaylistManager.GetRepeat(); ch_RepeatAll.bChecked = PlaylistManager.GetRepeatAll(); } function RefreshPlaylistSelections() { local StreamPlaylist List; local int i; local string str; if ( PlaylistManager == None ) return; // Save the selected item so we can reselect it if it still exists after the refresh str = li_AllLists.Get(); li_AllLists.Clear(); for ( i = 0; i < PlaylistManager.GetPlaylistCount(); i++ ) { List = PlaylistManager.GetPlaylistAt(i); li_AllLists.Add(List.GetTitle(), List); } i = li_AllLists.FindIndex(str); // If couldn't find the previously selected list, attempt to set index to current playlist if ( i == -1 && CurrentPlaylist != None ) i = PlaylistManager.FindPlaylistIndex(CurrentPlaylist); // If that didn't work, don't worry about it li_AllLists.SilentSetIndex(i); } function ActivePlaylistChanged( StreamPlaylist NewList ) { RefreshCurrentPlaylist(); if ( WindowMode == MODE_Manager ) ShowPlaylist(); } function RefreshCurrentPlaylist() { if ( CurrentPlaylist != None ) CurrentPlaylist.OnPlaylistChanged = None; CurrentPlaylist = PlaylistManager.GetCurrentPlaylist(); if ( CurrentPlaylist == None ) { Warn("Invalid playlist selected!"); return; } LoadCurrentPlaylist(); li_Playlist.SetIndex( li_Playlist.FindIndex("",,,CurrentPlaylist.GetCurrentStream()) ); li_AllLists.SilentSetIndex( li_AllLists.FindIndex("",,,CurrentPlaylist) ); } function LoadCurrentPlaylist() { local int i; local array<Stream> Songs; li_Playlist.Clear(); if ( CurrentPlaylist == None ) return; CurrentPlaylist.GetSongs( Songs ); for ( i = 0; i < Songs.Length; i++ ) li_Playlist.Add( Songs[i].GetSongTitle(), Songs[i], Songs[i].GetPath() ); CurrentPlaylist.OnPlaylistChanged = HandlePlaylistChange; } function HandlePlaylistChange() { LoadCurrentPlaylist(); PlaylistManager.Save(); } // Called when a new stream has begun playing function HandleStreamChange( string NewStreamFileName ) { local Stream S; local int i; i = CurrentPlaylist.FindIndexByName(NewStreamFileName); S = CurrentPlaylist.GetStreamAt(i); // Set timer for seconds display ResetSongCounter(); if ( S != None ) CurrentPlaylist.SetCurrent(i); else { li_Playlist.SetIndex(-1); // Attempt to load an id3 tag for this file S = Handler.FileManager.CreateStream(NewStreamFileName); } ReadStream(S); PlaylistManager.Save(); } // Called when a song is stopped function HandleStreamStop() { UpdateSongTimeDisplay(); UpdatePlayButton(); li_Playlist.SetIndex(-1); DisableComponent(b_Stop); PlaylistManager.Save(); } function HandleAdjustVolume( float NewVolume ) { sl_Volume.SetValue(NewVolume); } function bool InternalOnClick( GUIComponent C ) { local Stream Obj; switch ( C ) { case b_Play: if ( !li_Playlist.IsValid() && !Handler.IsPlaying() ) { li_Playlist.SilentSetIndex(0); Play(); } Obj = Stream(li_Playlist.GetObject()); if ( Obj == None || Obj != Handler.CurrentStreamAttachment ) { Play(); return true; } PauseCurrent(); return true; case b_Stop: StopCurrent(); return true; case b_NextTrack: NextTrack(); return true; case b_PrevTrack: PrevTrack(); return true; case b_Playlist: TogglePlaylist(); return true; case b_Management: ToggleManagement(); return true; case b_BotA: if (WindowMode==MODE_PlayList) return Controller.OpenMenu( PlaylistEditorMenu, CurrentPlaylist.GetTitle() ); else if (WindowMode==MODE_Manager) NewPlaylist(); return true; case b_BotB: if (WindowMode==MODE_PlayList) CurrentListRemove(); else if (WindowMode==MODE_Manager) RemovePlayList(); return true; case b_BotC: if (WindowMode==MODE_PlayList) CurrentListClear(); else if (WindowMode==MODE_Manager) RenamePlayList(); } return true; } function int GetPlaylistManagerIndex( int ListIndex ) { if ( PlaylistManager == None || li_AllLists == None ) return -1; if ( !li_AllLists.IsValidIndex(ListIndex) ) ListIndex = li_AllLists.Index; return PlaylistManager.FindNameIndex( li_AllLists.GetItemAtIndex(ListIndex) ); } function InternalOnChange( GUIComponent C ) { switch ( C ) { case sl_Volume: Handler.SetMusicVolume(sl_Volume.Value); PlayerOwner().ConsoleCommand("set ini:Engine.Engine.AudioDevice MusicVolume"@sl_Volume.Value); PlayerOwner().ConsoleCommand("SetMusicVolume"@ sl_Volume.Value); break; case ch_Shuffle: PlaylistManager.SetShuffle(ch_Shuffle.bChecked); ch_ShuffleAll.bChecked = PlaylistManager.GetShuffleAll(); break; case ch_ShuffleAll: PlaylistManager.SetShuffleAll(ch_ShuffleAll.bChecked); ch_Shuffle.bChecked = PlaylistManager.GetShuffle(); break; case ch_Repeat: PlaylistManager.SetRepeat( ch_Repeat.bChecked ); ch_RepeatAll.bChecked = PlaylistManager.GetRepeatAll(); break; case ch_RepeatAll: PlaylistManager.SetRepeatAll( ch_RepeatAll.bChecked ); ch_Repeat.bChecked = PlaylistManager.GetRepeat(); break; case li_Playlist: if ( !Handler.IsPlaying() && li_Playlist.IsValid() ) ReadTagInfo( Stream(li_Playlist.GetObject()) ); break; } } // Just return true because I don't want a caption drawn for this slider function bool SliderPreDrawCaption( out float X, out float Y, out float XL, out float YL, out ETextAlign Justification ) { return true; } function bool AllListsReceiveDrop(GUIComponent Sender) { local int i, idx; local array<GUIListElem> Elems; local array<string> Items; local Stream str; local StreamPlaylist List; if ( Controller.DropSource == li_Playlist ) { List = PlaylistManager.GetPlaylistAt( GetPlaylistManagerIndex(li_AllLists.DropIndex) ); if ( List == None || List == CurrentPlaylist ) return false; List.InitializePlaylist(Handler.FileManager); Elems = li_Playlist.GetPendingElements(True); for ( i = Elems.Length - 1; i >= 0; i-- ) { str = Stream(Elems[i].ExtraData); if ( str != None ) List.AddStream(-1, str, True); } return true; } else if ( DirectoryTreeList(Controller.DropSource) != None ) { Items = DirectoryTreeList(Controller.DropSource).GetPendingItems(); idx = GetPlaylistManagerIndex(li_AllLists.DropIndex); List = PlaylistManager.GetPlaylistAt( idx ); if ( List == None ) return False; for ( i = Items.Length - 1; i >= 0; i-- ) PlaylistManager.InsertInPlaylist( idx, -1, Items[i], i > 0); return True; } return false; } // Check which type of file we're dropping, and perform the appropriate action function bool PlaylistReceiveDrop(GUIComponent Sender) { local array<string> Items; local int i, idx; // If this was a drag-n-drop between the same list, perform the default behavior if ( Sender == li_Playlist ) { if ( Controller.DropSource != li_AllLists && li_Playlist.InternalOnDragDrop(Sender) ) return true; // if source is the directory list, then figure what type of file we're attempting to drop if ( DirectoryTreeList(Controller.DropSource) != None ) { Items = DirectoryTreeList(Controller.DropSource).GetPendingItems(); idx = li_Playlist.DropIndex; if ( !li_Playlist.IsValidIndex(idx) ) idx = li_Playlist.Elements.Length; for ( i = Items.Length - 1; i >= 0; i-- ) PlaylistManager.InsertInPlaylist(PlaylistManager.GetCurrentIndex(), idx, Items[i], i > 0); li_Playlist.SetIndex(idx); return true; } } return false; } function PlaylistDragEnded(GUIComponent Accepting, bool bAccepted) { local int i; local array<Stream> Streams; li_Playlist.InternalOnEndDrag(Accepting, bAccepted); if ( bAccepted ) { if ( Accepting == li_Playlist ) { Streams.Length = li_Playlist.Elements.Length; for ( i = 0; i < li_Playlist.Elements.Length; i++ ) Streams[i] = Stream(li_Playlist.GetObjectAtIndex(i)); CurrentPlaylist.InitializePlaylist(Handler.FileManager); CurrentPlaylist.SetSongs(Streams); } } } function Play() { // The stream knows where it's located on the disk Handler.PlaySong(li_Playlist.GetExtra(),0.0); UpdatePlayButton(); } function StopCurrent() { Handler.StopSong(); UpdatePlayButton(); } function NextTrack() { Handler.NextSong(); UpdatePlayButton(); } function PrevTrack() { Handler.PrevSong(); } function PauseCurrent() { if ( !Handler.IsPlaying() ) Play(); else { Handler.PauseSong(); UpdatePlayButton(); } } function bool PlaylistDblClick( GUIComponent C ) { local int i; if ( C == li_Playlist ) { Play(); return true; } else if ( C == li_AllLists ) { i = PlaylistManager.FindPlaylistIndex( StreamPlaylist(li_AllLists.GetObject()) ); PlaylistManager.ActivatePlaylist(i); // ShowPlayList(); -- this should be called by ActivatePlaylist return true; } return false; } function ReadTagInfo( Stream StreamObj ) { local string TagText; local StreamTag sTag; sTag = StreamObj.GetTag(); // Get tag info TagText = StreamObj.GetSongTitle(); if ( sTag != None ) { if ( TagText != "" ) TagText $= "|"; TagText $= sTag.Artist.FieldValue; if ( TagText != "" ) TagText $= "|"; TagText $= sTag.Album.FieldValue; /* // if this song only had an ID3v1 tag associated with it, it isn't possible to get the song duration // until the audio code actually loads the mp3/ogg file, so if the duration is 0.0, request an update if ( float(sTag.Duration.FieldValue) <= 0.0 ) sTag.Duration.FieldValue = string(Handler.GetStreamDuration() * 1000); */ // Add any other desired tag fields here } lb_SongInfo.SetContent(TagText); } function ReadStream( Stream StreamObj ) { if ( StreamObj == None ) { log("ReadStream() called with StreamObj == None",'MusicPlayer'); return; } ReadTagInfo(StreamObj); EnableComponent(b_Stop); li_Playlist.SilentSetIndex( li_Playlist.FindIndex("",,,StreamObj) ); Handler.SetStreamAttachment(StreamObj); } function ReadStreamAt( int Index ) { local Stream StreamObj; StreamObj = Stream(lb_Playlist.List.GetObjectAtIndex(Index)); if ( StreamObj == None ) { log("ReadStreamInfo couldn't find stream object at index"@index,'MusicPlayer'); return; } ReadStream(StreamObj); } event Timer() { if ( Handler != None ) UpdateSongTimeDisplay(); } function ResetSongCounter( optional bool bNoRestart ) { SongSeconds = 0; if ( bNoRestart ) KillTimer(); else SetTimer(1.0, True); Timer(); } protected function UpdateSongTimeDisplay() { SongSeconds = int( Handler.GetStreamPosition() ); l_Time.Caption = class'StreamBase'.static.FormatTimeDisplay(SongSeconds); } function UpdatePlayButton() { if ( Handler == None ) return; if ( Handler.IsPlaying() && !Handler.IsPaused() ) { b_Play.Graphic = PauseImage; b_Play.SetHint(PauseHint); } else { b_Play.SetHint(PlayHint); b_Play.Graphic = PlayImage; } } // =========================================================== // Context Menu // =========================================================== function PlayerMenuClick( GUIContextMenu Menu, int Index ) { if ( Index < 0 || Index >= Menu.ContextItems.Length ) return; if ( Menu.ContextItems[Index] == "-" ) return; switch ( Index ) { case 0: Controller.OpenMenu(OptionsMenu); return; } } function RemovePlayList() { PlaylistManager.RemovePlaylist(li_AllLists.Get()); RefreshPlaylistSelections(); } function CurrentListClear() { PlaylistManager.ClearCurrentPlaylist(); LoadCurrentPlaylist(); } function PlaylistMenuClick( GUIContextMenu Menu, int Index ) { local int i; if ( Index < 0 || Index >= Menu.ContextItems.Length ) return; if ( Menu.ContextItems[Index] == "-" ) return; switch ( Index ) { case 0: // Activate i = PlaylistManager.FindPlaylistIndex( StreamPlaylist(li_AllLists.GetObject()) ); PlaylistManager.ActivatePlaylist(i); // ShowPlayList(); break; case 1: // Rename RenamePlayList(); break; case 2: // Create NewPlayList(); break; case 4: // Remove RemovePlayList(); break; case 5: // Clear CurrentListClear(); break; } } function CurrentListRemove() { local array<GUIListElem> Paths; local int i; Paths = li_Playlist.GetPendingElements(True); for ( i = 0; i < Paths.Length; i++ ) PlaylistManager.RemoveFromCurrentPlaylist(Paths[i].ExtraStrData, i < Paths.Length -1 ); } function SongMenuClick( GUIContextMenu Menu, int Index ) { if ( Index < 0 || Index >= Menu.ContextItems.Length ) return; if ( Menu.ContextItems[Index] == "-" ) return; switch ( Index ) { case 0: // Play Play(); break; case 1: // Editor Controller.OpenMenu(PlaylistEditorMenu); break; // case 2: // Tag // if ( li_Playlist.IsValid() && Controller.OpenMenu(ID3TagEditorMenu,li_Playlist.GetExtra()) ) // Controller.ActivePage.HandleObject(li_Playlist.GetObject()); // break; case 3: // Remove CurrentListRemove(); break; case 4: // Clear CurrentListClear(); break; } li_Playlist.ClearPendingElements(); } // ===================================================================================================================== function NewPlaylist() { if ( Controller.OpenMenu(Controller.RequestDataMenu, NewCaption, PlaylistNameCaption) ) Controller.ActivePage.OnClose = NewPlaylistClosed; } function RenamePlayList() { if ( Controller.OpenMenu(Controller.RequestDataMenu, RenameCaption, PlaylistNameCaption) ) { Controller.ActivePage.SetDataString( li_Alllists.Get() ); Controller.ActivePage.OnClose = RenameClosed; } } function NewPlaylistClosed( bool bCancelled ) { local string PlaylistName; if ( !bCancelled ) { PlaylistName = Controller.ActivePage.GetDataString(); if ( PlaylistManager.ActivatePlaylist(PlaylistManager.AddPlaylist(PlaylistName), true) ) RefreshPlaylistSelections(); } } function RenameClosed( bool bCancelled ) { local string PlaylistName; if ( !bCancelled ) { PlaylistName = Controller.ActivePage.GetDataString(); if ( PlaylistManager.RenamePlaylist(GetPlaylistManagerIndex(-1), PlaylistName) ) RefreshPlaylistSelections(); } } // ===================================================================================================================== // ===================================================================================================================== // Page/Component Animation // ===================================================================================================================== // ===================================================================================================================== /* function SetDefaultPosition() { local float F; F = MinPageHeight; MinPageHeight = default.MinPageHeight; Super.SetDefaultPosition(); MinPageHeight = F; } */ event SetVisibility( bool bIsVisible ) { local int i; if ( !bIsVisible ) { Super.SetVisibility(bIsVisible); return; } Super(GUIComponent).SetVisibility(bIsVisible); if ( !PropagateVisibility ) return; for ( i = 0; i < Controls.Length; i++ ) { // If the playlist is supposed to be hidden, skip it if ( Controls[i] == sb_Playlist && WindowMode!=MODE_Playlist || Controls[i] == sb_Management && WindowMode!=MODE_Manager ) continue; Controls[i].SetVisibility(True); } } function Expand() { bResizeHeightAllowed = True; if ( ExpandedHeight < WinHeight ) ExpandedHeight=WinHeight+0.1; WinHeight = RelativeHeight(ExpandedHeight); MinPageHeight = 0.4; CheckBounds(); } function Constrict() { bResizeHeightAllowed = False; WindowMode = MODE_Compact; if ( Controller.ResX <= 640 ) { MinPageHeight = 0.32; WinHeight= 0.32; } else { MinPageHeight = 0.27; WinHeight = 0.27; } } function HideAll() { Constrict(); sb_PlayList.SetVisibility(false); sb_Management.SetVisibility(false); b_BotA.SetVisibility(false); b_BotB.SetVisibility(false); b_BotC.SetVisibility(false); } function TogglePlaylist() { if (WindowMode!=MODE_PlayList) ShowPlayList(); else HidePlayList(); } function ShowPlayList() { if (WindowMode==MODE_Compact) // Expand the Window up Expand(); sb_PlayList.Caption = PlayListManager.GetCurrentTitle(); b_BotA.SetVisibility(true); b_BotA.Caption = plAdd; b_BotB.SetVisibility(true); b_BotB.Caption = plRemove; b_BotC.SetVisibility(true); b_BotC.Caption = plClear; sb_PlayList.SetVisibility(true); sb_Management.SetVisibility(false); WindowMode = MODE_PlayList; b_PlayList.Graphic=OpenFolder; } function HidePlayList() { Constrict(); b_BotA.SetVisibility(false); b_BotB.SetVisibility(false); b_BotC.SetVisibility(false); sb_PlayList.SetVisibility(false); b_PlayList.Graphic=ClosedFolder; } function ToggleManagement() { if (WindowMode!=MODE_Manager) ShowManagement(); else HideManagement(); return; } function ShowManagement() { if (WindowMode==MODE_Compact) // Expand the Window up Expand(); b_BotA.SetVisibility(true); b_BotA.Caption = mgNew; b_BotB.SetVisibility(true); b_BotB.Caption = mgRemove; b_BotC.SetVisibility(true); b_BotC.Caption = mgRename; sb_PlayList.SetVisibility(false); sb_Management.SetVisibility(true); WindowMode = MODE_Manager; b_Playlist.Graphic = ClosedFolder; } function HideManagement() { Constrict(); b_BotA.SetVisibility(false); b_BotB.SetVisibility(false); b_BotC.SetVisibility(false); sb_Management.SetVisibility(false); } function ManageDragOver( GUIComponent Sender ) { if ( bAnimating ) return; if ( Sender == b_Management && WindowMode != MODE_Manager ) ShowManagement(); else if ( Sender == b_Playlist && WindowMode != MODE_Playlist ) ShowPlaylist(); } function bool FloatingPreDraw( Canvas C ) { local float X,Y,xl,yl, BK1L, BK1T, BK1W, BK1H; local float l,t,w,h; local float bl,bt,bw,bh,bs; local bool b; if ( bInit ) Constrict(); b = super.FloatingPreDraw(c); // dock the songinfo box to the title bar t = t_WindowTitle.ActualTop()+ t_WindowTitle.ActualHeight(); l = ActualLeft(); w = ActualWidth(); l_Time.Style.TextSize(C,MenuState,"100:00",XL,YL,l_Time.FontScale); h = YL*3; // Align the controls. x = l + w - (C.SizeX*0.01); y = t + (C.SizeY*0.01); // Timer Box BK1.WinTop = BK1.RelativeTop(y); BK1.WinHeight = BK1.RelativeHeight(3*YL); BK1.WinWidth = BK1.RelativeWidth(XL + (XL*0.32)); BK1.WinLeft = BK1.RelativeLeft(X - BK1.ActualWidth()); BK1T = BK1.ActualTop(); BK1W = BK1.ActualWidth(); BK1H = BK1.ActualHeight(); BK1L = BK1.ActualLeft(); l_Time.SetPosition(BK1L, BK1T, BK1W, BK1H, True); X = BK1L - (C.SizeX*0.01); lb_SongInfo.WinTop = lb_SongInfo.RelativeTop(y - C.SizeY * 0.01); lb_SongInfo.WinLeft = lb_SongInfo.RelativeLeft(l + (C.SizeX*0.02)); lb_SongInfo.WinWidth = lb_SongInfo.RelativeWidth(X - (lb_SongInfo.ActualLeft())); // Do the buttons bh = ActualHeight(ch_Shuffle.StandardHeight); bw = bh; bt = BK1T + BK1H - bh; bs = C.SizeX*0.01; bl = x - bw; MoveButton(ch_ShuffleAll,BL,BT,BW,BH,BS); MoveButton(ch_Shuffle,BL,BT,BW,BH,BS); MoveButton(ch_RepeatAll,BL,BT,BW,BH,BS); MoveButton(ch_Repeat,BL,BT,BW,BH,BS); MoveButton(b_NextTrack,BL,BT,BW,BH,BS); MoveButton(b_Play,BL,BT,BW,BH,BS); MoveButton(b_Stop,BL,BT,BW,BH,BS); MoveButton(b_PrevTrack,BL,BT,BW,BH,BS); sl_Volume.WinLeft = sl_Volume.RelativeLeft(lb_SongInfo.ActualLeft()); sl_Volume.WinTop = sl_Volume.RelativeTop(bt); sl_Volume.WinHeight = sl_Volume.RelativeHeight(bh); sl_Volume.WinWidth = sl_Volume.RelativeWidth(bl - sl_Volume.ActualLeft()); lb_SongInfo.WinHeight = lb_SongInfo.RelativeHeight( (sl_Volume.ActualTop() - (C.SizeY * 0.01)) - lb_SongInfo.ActualTop() ); t = sl_Volume.ActualTop() + sl_Volume.ActualHeight() + (C.SizeY *0.01); l = sl_Volume.ActualLeft(); b_PlayList.SetPosition(l,t,bw,bh,true); b_Management.SetPosition(l+bw+bs,t,bw,bh,true); l = l+(bw*2)+(bs*2); bt = t + bh*0.32; bk2.WinLeft = bk2.RelativeLeft(l); bk2.WinTop = bk2.RelativeTop(bt); bk2.WinHeight = bk2.RelativeHeight(bh*0.5); bk2.WinWidth = bk2.RelativeWidth((BK1L+BK1W-bw) - bk2.ActualLeft()); l = ActualLeft(); w = ActualWidth(); t = bt + (bh*1.5); if (WindowMode==MODE_PlayList) { sb_PlayList.WinLeft = sb_Playlist.RelativeLeft(l); sb_PlayList.WinWidth = sb_Playlist.RelativeWidth(w); sb_PlayList.WinTop = sb_Playlist.RelativeTop(t); sb_PlayList.WinHeight = sb_Playlist.RelativeHeight(ActualTop() + ActualHeight() - t); T = t + sb_PlayList.ActualHeight() - 32; SetBottomButtons(C,sb_PlayList.ActualLeft(),T,sb_PlayList.ActualWidth(), 32); } if (WindowMode==MODE_Manager) { sb_Management.WinLeft = sb_Management.RelativeLeft(l); sb_Management.WinWidth = sb_Management.RelativeWidth(w); sb_Management.WinTop = sb_Management.RelativeTop(t); sb_Management.WinHeight = sb_Management.RelativeHeight(ActualTop() + ActualHeight() - t); T = t + sb_Management.ActualHeight() - 32; SetBottomButtons(C,sb_Management.ActualLeft(),T, sb_Management.ActualWidth(), 32); } return b; } function MoveButton(GUIButton B, out float L, float T, float W, float H, float S) { B.SetPosition(l,t,w,h,true); L -= w+S; } function SetBottomButtons(Canvas C, float Left, float Top, float Width, float Height) { local int i; local float xsize,xl,yl,s; local GUIButton B; s = Controller.ResX*0.01; for (i=0;i<Controls.Length;i++) if ( Controls[i].Tag>0 ) { B = GUIButton(Controls[i]); b.Style.TextSize(C,b.MenuState,b.Caption,XL,YL,b.FontScale); xsize += XL + S; Controls[i].WinWidth = Controls[i].RelativeWidth(XL + S); } Left = Left + (Width/2) - (xsize/2); for (i=0;i<Controls.Length;i++) if ( Controls[i].Tag>0 ) { Controls[i].WinTop = Controls[i].RelativeTop(Top); Controls[i].WinLeft = Controls[i].RelativeLeft(Left); Controls[i].WinHeight= Controls[i].RelativeHeight(Height); Left += Controls[i].ActualWidth(); } } // ===================================================================================================================== // ===================================================================================================================== // Notifications // ===================================================================================================================== // ===================================================================================================================== function ResizedBoth() { ExpandedHeight = RelativeHeight(); Super.ResizedBoth(); } function ResizedHeight() { ExpandedHeight = RelativeHeight(); Super.ResizedHeight(); } defaultproperties { Begin Object Class=GUIImage Name=Img1 Image=Texture'2K4Menus.NewControls.Display99' ImageStyle=ISTY_Stretched WinTop=0.200000 WinLeft=0.200000 WinWidth=0.200000 WinHeight=0.200000 End Object Bk1=GUIImage'GUI2K4.StreamPlayer.Img1' Begin Object Class=GUIImage Name=img2 Image=Texture'2K4Menus.NewControls.NewSliderBar' ImageStyle=ISTY_Scaled WinTop=0.200000 WinLeft=0.200000 WinWidth=0.200000 WinHeight=0.200000 End Object bk2=GUIImage'GUI2K4.StreamPlayer.img2' Begin Object Class=AltSectionBackground Name=sbPlayList bFillClient=True Caption="Current Playlist" LeftPadding=0.000000 RightPadding=0.000000 WinTop=0.200000 WinLeft=0.200000 WinWidth=0.200000 WinHeight=0.200000 bVisible=False OnPreDraw=sbPlayList.InternalPreDraw End Object sb_PlayList=AltSectionBackground'GUI2K4.StreamPlayer.sbPlayList' Begin Object Class=AltSectionBackground Name=sbManagement bFillClient=True Caption="Play List Manager" LeftPadding=0.000000 RightPadding=0.000000 WinTop=0.200000 WinLeft=0.200000 WinWidth=0.200000 WinHeight=0.200000 bVisible=False OnPreDraw=sbManagement.InternalPreDraw End Object sb_Management=AltSectionBackground'GUI2K4.StreamPlayer.sbManagement' Begin Object Class=GUIScrollTextBox Name=SongInfoBox bNoTeletype=True OnCreateComponent=SongInfoBox.InternalOnCreateComponent WinWidth=0.200000 WinHeight=0.200000 bTabStop=False bAcceptsInput=False bNeverFocus=True End Object lb_SongInfo=GUIScrollTextBox'GUI2K4.StreamPlayer.SongInfoBox' Begin Object Class=GUILabel Name=SongTime Caption="0:00" TextAlign=TXTA_Center VertAlign=TXTA_Center FontScale=FNS_Large StyleName="TextLabel" WinTop=-0.200000 WinLeft=0.200000 WinWidth=0.241172 WinHeight=0.550191 End Object l_Time=GUILabel'GUI2K4.StreamPlayer.SongTime' Begin Object Class=GUIListBox Name=PlaylistListBox bVisibleWhenEmpty=True OnCreateComponent=PlaylistListBox.InternalOnCreateComponent Hint="Current Playlist" WinTop=0.300000 WinLeft=0.010859 WinWidth=0.977425 WinHeight=0.588941 RenderWeight=0.503000 TabOrder=6 bVisible=False End Object lb_Playlist=GUIListBox'GUI2K4.StreamPlayer.PlaylistListBox' Begin Object Class=GUIListBox Name=SelectPlaylistListBox bVisibleWhenEmpty=True OnCreateComponent=SelectPlaylistListBox.InternalOnCreateComponent Hint="Select A Playlist" WinTop=0.235000 WinLeft=0.010859 WinWidth=0.977425 WinHeight=0.717500 TabOrder=1 bBoundToParent=True bVisible=False End Object lb_AllPlaylists=GUIListBox'GUI2K4.StreamPlayer.SelectPlaylistListBox' Begin Object Class=GUIButton Name=bBotA Caption="Add" StyleName="FooterButton" Tag=1 bVisible=False OnClick=StreamPlayer.InternalOnClick OnKeyEvent=bBotA.InternalOnKeyEvent End Object b_BotA=GUIButton'GUI2K4.StreamPlayer.bBotA' Begin Object Class=GUIButton Name=bBotB Caption="Remove" StyleName="FooterButton" Tag=1 bVisible=False OnClick=StreamPlayer.InternalOnClick OnKeyEvent=bBotB.InternalOnKeyEvent End Object b_BotB=GUIButton'GUI2K4.StreamPlayer.bBotB' Begin Object Class=GUIButton Name=bBotC Caption="Clear" StyleName="FooterButton" Tag=1 bVisible=False OnClick=StreamPlayer.InternalOnClick OnKeyEvent=bBotC.InternalOnKeyEvent End Object b_BotC=GUIButton'GUI2K4.StreamPlayer.bBotC' Begin Object Class=GUISlider Name=StreamVolume MaxValue=1.000000 Hint="Volume" WinWidth=0.544922 WinHeight=1.000000 TabOrder=0 OnClick=StreamVolume.InternalOnClick OnMousePressed=StreamVolume.InternalOnMousePressed OnMouseRelease=StreamVolume.InternalOnMouseRelease OnChange=StreamPlayer.InternalOnChange OnKeyEvent=StreamVolume.InternalOnKeyEvent OnCapturedMouseMove=StreamVolume.InternalCapturedMouseMove End Object sl_Volume=GUISlider'GUI2K4.StreamPlayer.StreamVolume' Begin Object Class=GUIGFXButton Name=PlayButton Graphic=Texture'2K4Menus.MP3.Play' Position=ICP_Scaled StyleName="TextLabel" WinLeft=0.717110 WinWidth=0.040000 TabOrder=4 bTabStop=True OnClick=StreamPlayer.InternalOnClick OnKeyEvent=PlayButton.InternalOnKeyEvent End Object b_Play=GUIGFXButton'GUI2K4.StreamPlayer.PlayButton' Begin Object Class=GUIGFXButton Name=StopButton Graphic=Texture'2K4Menus.MP3.Stop' Position=ICP_Scaled StyleName="TextLabel" Hint="Stop" WinLeft=0.605859 WinWidth=0.040000 TabOrder=2 bTabStop=True OnClick=StreamPlayer.InternalOnClick OnKeyEvent=StopButton.InternalOnKeyEvent End Object b_Stop=GUIGFXButton'GUI2K4.StreamPlayer.StopButton' Begin Object Class=GUIGFXButton Name=NextTrackButton Graphic=Texture'2K4Menus.MP3.NextTrack' Position=ICP_Scaled StyleName="TextLabel" Hint="Next" WinLeft=0.660860 WinWidth=0.040000 TabOrder=3 bTabStop=True OnClick=StreamPlayer.InternalOnClick OnKeyEvent=NextTrackButton.InternalOnKeyEvent End Object b_NextTrack=GUIGFXButton'GUI2K4.StreamPlayer.NextTrackButton' Begin Object Class=GUIGFXButton Name=PrevTrackButton Graphic=Texture'2K4Menus.MP3.PreviousTrack' Position=ICP_Scaled StyleName="TextLabel" Hint="Previous" WinLeft=0.542109 WinWidth=0.040000 TabOrder=1 bTabStop=True OnClick=StreamPlayer.InternalOnClick OnKeyEvent=PrevTrackButton.InternalOnKeyEvent End Object b_PrevTrack=GUIGFXButton'GUI2K4.StreamPlayer.PrevTrackButton' Begin Object Class=GUIGFXButton Name=ShowPlaylistButton Graphic=Texture'2K4Menus.MP3.ViewPlaylist' StyleName="RoundScaledButton" WinLeft=0.825470 WinWidth=0.052422 WinHeight=0.925000 TabOrder=5 bTabStop=True OnClick=StreamPlayer.InternalOnClick OnKeyEvent=ShowPlaylistButton.InternalOnKeyEvent OnDragOver=StreamPlayer.ManageDragOver End Object b_Playlist=GUIGFXButton'GUI2K4.StreamPlayer.ShowPlaylistButton' Begin Object Class=GUIGFXButton Name=ManagePlaylistsButton Graphic=Texture'2K4Menus.MP3.Add' StyleName="RoundScaledButton" Hint="Manage Playlists" WinLeft=0.883360 WinWidth=0.052422 WinHeight=0.925000 TabOrder=6 bTabStop=True OnClick=StreamPlayer.InternalOnClick OnKeyEvent=ManagePlaylistsButton.InternalOnKeyEvent OnDragOver=StreamPlayer.ManageDragOver End Object b_Management=GUIGFXButton'GUI2K4.StreamPlayer.ManagePlaylistsButton' Begin Object Class=GUICheckBoxButton Name=ShuffleCheck CheckedOverlay(0)=Texture'2K4Menus.MP3.ShuffleOnceWatched' CheckedOverlay(1)=Texture'2K4Menus.MP3.ShuffleOnceWatched' CheckedOverlay(2)=Texture'2K4Menus.MP3.ShuffleOnceWatched' CheckedOverlay(3)=Texture'2K4Menus.MP3.ShuffleOnceWatched' CheckedOverlay(4)=Texture'2K4Menus.MP3.ShuffleOnceWatched' CheckedOverlay(5)=Texture'2K4Menus.MP3.ShuffleOnce' CheckedOverlay(6)=Texture'2K4Menus.MP3.ShuffleOnce' CheckedOverlay(7)=Texture'2K4Menus.MP3.ShuffleOnce' CheckedOverlay(8)=Texture'2K4Menus.MP3.ShuffleOnce' CheckedOverlay(9)=Texture'2K4Menus.MP3.ShuffleOnce' bAllOverlay=True Hint="Shuffle" WinTop=0.666667 WinLeft=0.840000 WinWidth=0.040000 TabOrder=2 OnChange=StreamPlayer.InternalOnChange OnKeyEvent=ShuffleCheck.InternalOnKeyEvent End Object ch_Shuffle=GUICheckBoxButton'GUI2K4.StreamPlayer.ShuffleCheck' Begin Object Class=GUICheckBoxButton Name=ShuffleAllCheck CheckedOverlay(0)=Texture'2K4Menus.MP3.ShuffleAllWatched' CheckedOverlay(1)=Texture'2K4Menus.MP3.ShuffleAllWatched' CheckedOverlay(2)=Texture'2K4Menus.MP3.ShuffleAllWatched' CheckedOverlay(3)=Texture'2K4Menus.MP3.ShuffleAllWatched' CheckedOverlay(4)=Texture'2K4Menus.MP3.ShuffleAllWatched' CheckedOverlay(5)=Texture'2K4Menus.MP3.ShuffleAll' CheckedOverlay(6)=Texture'2K4Menus.MP3.ShuffleAll' CheckedOverlay(7)=Texture'2K4Menus.MP3.ShuffleAll' CheckedOverlay(8)=Texture'2K4Menus.MP3.ShuffleAll' CheckedOverlay(9)=Texture'2K4Menus.MP3.ShuffleAll' bAllOverlay=True Hint="Shuffle All" WinTop=0.666667 WinLeft=0.880000 WinWidth=0.040000 TabOrder=3 OnChange=StreamPlayer.InternalOnChange OnKeyEvent=ShuffleAllCheck.InternalOnKeyEvent End Object ch_ShuffleAll=GUICheckBoxButton'GUI2K4.StreamPlayer.ShuffleAllCheck' Begin Object Class=GUICheckBoxButton Name=RepeatCheck CheckedOverlay(0)=Texture'2K4Menus.MP3.RepeatOnceWatched' CheckedOverlay(1)=Texture'2K4Menus.MP3.RepeatOnceWatched' CheckedOverlay(2)=Texture'2K4Menus.MP3.RepeatOnceWatched' CheckedOverlay(3)=Texture'2K4Menus.MP3.RepeatOnceWatched' CheckedOverlay(4)=Texture'2K4Menus.MP3.RepeatOnceWatched' CheckedOverlay(5)=Texture'2K4Menus.MP3.RepeatOnce' CheckedOverlay(6)=Texture'2K4Menus.MP3.RepeatOnce' CheckedOverlay(7)=Texture'2K4Menus.MP3.RepeatOnce' CheckedOverlay(8)=Texture'2K4Menus.MP3.RepeatOnce' CheckedOverlay(9)=Texture'2K4Menus.MP3.RepeatOnce' bAllOverlay=True Hint="Repeat" WinTop=0.666667 WinLeft=0.760000 WinWidth=0.040000 TabOrder=0 OnChange=StreamPlayer.InternalOnChange OnKeyEvent=RepeatCheck.InternalOnKeyEvent End Object ch_Repeat=GUICheckBoxButton'GUI2K4.StreamPlayer.RepeatCheck' Begin Object Class=GUICheckBoxButton Name=RepeatAllCheck CheckedOverlay(0)=Texture'2K4Menus.MP3.RepeatAllWatched' CheckedOverlay(1)=Texture'2K4Menus.MP3.RepeatAllWatched' CheckedOverlay(2)=Texture'2K4Menus.MP3.RepeatAllWatched' CheckedOverlay(3)=Texture'2K4Menus.MP3.RepeatAllWatched' CheckedOverlay(4)=Texture'2K4Menus.MP3.RepeatAllWatched' CheckedOverlay(5)=Texture'2K4Menus.MP3.RepeatAll' CheckedOverlay(6)=Texture'2K4Menus.MP3.RepeatAll' CheckedOverlay(7)=Texture'2K4Menus.MP3.RepeatAll' CheckedOverlay(8)=Texture'2K4Menus.MP3.RepeatAll' CheckedOverlay(9)=Texture'2K4Menus.MP3.RepeatAll' bAllOverlay=True Hint="Repeat All" WinTop=0.666667 WinLeft=0.800000 WinWidth=0.040000 TabOrder=1 OnChange=StreamPlayer.InternalOnChange OnKeyEvent=RepeatAllCheck.InternalOnKeyEvent End Object ch_RepeatAll=GUICheckBoxButton'GUI2K4.StreamPlayer.RepeatAllCheck' ID3TagEditorMenu="GUI2K4.ID3TagEditor" PlaylistEditorMenu="GUI2K4.StreamPlaylistEditor" ExpandedHeight=0.500000 ConstrictedHeight=0.320000 PauseImage=Texture'2K4Menus.MP3.Pause' PlayImage=Texture'2K4Menus.MP3.Play' OpenFolder=Texture'2K4Menus.MP3.ClosePlaylist' ClosedFolder=Texture'2K4Menus.MP3.ViewPlaylist' CollapsePlaylistHint="Hide Current Playlist" ExpandPlaylistHint="Show Current Playlist" PlayHint="Play" PauseHint="Pause" CollapseManagementHint="Hide Playlist Options" ExpandManagementHint="Show Playlist Options" RenameCaption="Rename Playlist" NewCaption="Create New Playlist" PlaylistNameCaption="Name: " PLAdd="Add" PLRemove="Remove" PLClear="Clear" MGNew="New" MGRemove="Remove" MGRename="Rename" Begin Object Class=GUIContextMenu Name=SongRCMenu ContextItems(0)="Play Selected" ContextItems(1)="Open Playlist Editor" ContextItems(2)="-" ContextItems(3)="Remove From Playlist" ContextItems(4)="Clear Playlist" OnSelect=StreamPlayer.SongMenuClick End Object cm_Playlist=GUIContextMenu'GUI2K4.StreamPlayer.SongRCMenu' Begin Object Class=GUIContextMenu Name=PlaylistRCMenu ContextItems(0)="Activate Playlist" ContextItems(1)="Rename Playlist" ContextItems(2)="Create new Playlist" ContextItems(3)="-" ContextItems(4)="Delete Playlist" ContextItems(5)="Clear Playlist" OnSelect=StreamPlayer.PlaylistMenuClick End Object cm_AllLists=GUIContextMenu'GUI2K4.StreamPlayer.PlaylistRCMenu' WindowName="Music Player" MinPageWidth=0.750000 MinPageHeight=0.320000 MaxPageWidth=0.900000 bResizeHeightAllowed=False bPersistent=True bAllowedAsLast=True WinHeight=0.320000 Begin Object Class=GUIContextMenu Name=PlayerRCMenu ContextItems(0)="Change Settings" OnSelect=StreamPlayer.PlayerMenuClick End Object ContextMenu=GUIContextMenu'GUI2K4.StreamPlayer.PlayerRCMenu' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |