tayaki.blogg.se

Diy lyric prompter
Diy lyric prompter










diy lyric prompter

OpenWindow(0, 0, 0, DWidth, DHeight, "", #PB_Window_BorderLess) It's also possible to add drag'n drop to sort the files in the list. Load and Save are planned to save and load the 'playlist'. It's no problem to make the scrolling 'smooth'.Īlso the missing menu stuff should be no problem.

diy lyric prompter

MoveMemory(Buffer + Pitch, Buffer, 767 * Pitch) If EventType() = #PB_EventType_RightClick *Buffer = AllocateMemory(SizeOf(FileStructure)) OpenWindowedScreen(WindowID(0), 0, 0, 800, 768)įilename$ = OpenFileRequester("Choose a file", Filename$, "Text|*.txt", 0)ĪddGadgetItem(0, Help, GetFilePart(Filename$, #PB_FileSystem_NoExtension)) ListIconGadget(0, 800, 0, 224, 768, "File", 150, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)ĪddKeyboardShortcut(0, #PB_Shortcut_Pause, #Menu_Pause)ĪddKeyboardShortcut(0, #PB_Shortcut_Down, #Menu_Down)ĪddKeyboardShortcut(0, #PB_Shortcut_Escape, #Menu_Escape) OpenWindow(0, 0, 0, 1024, 768, "Prompter", #PB_Window_SystemMenu|#PB_Window_ScreenCentered) Both will work, and they are not a lot different, but the list is a tiny bit easier, once you do it.ĭefine.i Event, Exit, PauseFlag, File, FileNo, Help, LastTime, ActualTime, Buffer, Pitch, THeight, TWidth, YPosĭefine *Buffer.FileStructure, *Ptr.FileStructure The list was designed for tasks like these. To iterate, you have to use a For-Next loop, and then also a test to see if the data is blank, unless you store the number of lines in another variable-which is an unnecessary step with Lists. However, to add you require an incrementing counter.

diy lyric prompter

#Diy lyric prompter Pc#

That's not so bad with songs, because it is still small enough to fit any pc from the past 2-3 decades. You have to guess at the size, which would presumably be bigger than the longest song you would ever want. Finally, for clearing for a new song it is just one command, ClearList().Īn array is a fixed size. If there is other data, you can use a structure, also. There are never any counters to increment, unless you want one for another reason. (I often make a macro to add and assign.) To iterate, just use foreach-this is the easiest part. To add one, call AddElement(mylist()), then mylist() = "lyric line". Look it up in the help file, also, but this is a lightweight description.Ī list is a random number of elements, which are stored in the order they are added. Keya wrote:sorry im new to Purebasic but whats the difference between a string list and an array of strings?












Diy lyric prompter