tron@2186: /* $Id$ */ tron@2186: truelight@0: #include "stdafx.h" Darkvater@1891: #include "openttd.h" tron@507: #include "table/strings.h" Darkvater@4937: #include "table/sprites.h" tron@2163: #include "functions.h" truelight@0: #include "window.h" truelight@0: #include "gfx.h" truelight@0: #include "sound.h" truelight@0: #include "hal.h" tron@2159: #include "macros.h" tron@2159: #include "variables.h" belugas@4120: #include "music.h" truelight@0: tron@2155: static byte _music_wnd_cursong; tron@2155: static bool _song_is_active; belugas@4120: static byte _cur_playlist[NUM_SONGS_PLAYLIST]; tron@2155: truelight@0: truelight@0: truelight@0: static byte _playlist_all[] = { tron@2639: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0 truelight@0: }; truelight@0: truelight@0: static byte _playlist_old_style[] = { tron@2639: 1, 8, 2, 9, 14, 15, 19, 13, 0 truelight@0: }; truelight@0: truelight@0: static byte _playlist_new_style[] = { truelight@0: 6, 11, 10, 17, 21, 18, 5, 0 truelight@0: }; truelight@0: truelight@0: static byte _playlist_ezy_street[] = { truelight@0: 12, 7, 16, 3, 20, 4, 0 truelight@0: }; truelight@0: truelight@0: static byte * const _playlists[] = { truelight@0: _playlist_all, truelight@0: _playlist_old_style, truelight@0: _playlist_new_style, truelight@0: _playlist_ezy_street, truelight@0: msf.custom_1, truelight@0: msf.custom_2, truelight@0: }; truelight@0: tron@1093: static void SkipToPrevSong(void) truelight@0: { truelight@0: byte *b = _cur_playlist; truelight@0: byte *p = b; truelight@0: byte t; truelight@0: belugas@4867: if (b[0] == 0) return; // empty playlist truelight@193: belugas@4867: do p++; while (p[0] != 0); // find the end truelight@0: belugas@4867: t = *--p; // and copy the bytes truelight@0: while (p != b) { truelight@0: p--; truelight@0: p[1] = p[0]; truelight@0: } truelight@0: *b = t; truelight@0: truelight@0: _song_is_active = false; truelight@0: } truelight@0: tron@1093: static void SkipToNextSong(void) truelight@0: { tron@2639: byte* b = _cur_playlist; tron@2639: byte t; truelight@0: tron@2639: t = b[0]; tron@2639: if (t != 0) { tron@2639: while (b[1] != 0) { truelight@0: b[0] = b[1]; truelight@0: b++; truelight@0: } truelight@0: b[0] = t; truelight@0: } truelight@0: truelight@0: _song_is_active = false; truelight@0: } truelight@0: truelight@0: static void MusicVolumeChanged(byte new_vol) truelight@0: { truelight@0: _music_driver->set_volume(new_vol); truelight@0: } truelight@0: tron@1093: static void DoPlaySong(void) truelight@0: { truelight@0: char filename[256]; belugas@4120: snprintf(filename, sizeof(filename), "%s%s", Darkvater@5296: _paths.gm_dir, origin_songs_specs[_music_wnd_cursong - 1].filename); truelight@0: _music_driver->play_song(filename); truelight@0: } truelight@0: tron@1093: static void DoStopMusic(void) truelight@0: { truelight@0: _music_driver->stop_song(); truelight@0: } truelight@0: tron@1093: static void SelectSongToPlay(void) truelight@0: { truelight@2247: uint i = 0; belugas@4120: uint j = 0; belugas@4120: char filename[256]; truelight@0: truelight@2247: memset(_cur_playlist, 0, sizeof(_cur_playlist)); hackykid@1884: do { belugas@4867: if (_playlists[msf.playlist][i] != 0) { // Don't evaluate playlist terminator belugas@4867: snprintf(filename, sizeof(filename), "%s%s", Darkvater@5296: _paths.gm_dir, origin_songs_specs[(_playlists[msf.playlist][i]) - 1].filename); belugas@4867: belugas@4867: /* we are now checking for the existence of that file prior belugas@4867: * to add it to the list of available songs */ belugas@4867: if (FileExists(filename)) { belugas@4867: _cur_playlist[j] = _playlists[msf.playlist][i]; belugas@4867: j++; belugas@4867: } belugas@4120: } truelight@2247: } while (_playlists[msf.playlist][i++] != 0 && i < lengthof(_cur_playlist) - 1); truelight@0: truelight@0: if (msf.shuffle) { truelight@0: i = 500; truelight@0: do { truelight@0: uint32 r = InteractiveRandom(); tron@2140: byte *a = &_cur_playlist[GB(r, 0, 5)]; tron@2140: byte *b = &_cur_playlist[GB(r, 8, 5)]; truelight@0: truelight@0: if (*a != 0 && *b != 0) { truelight@0: byte t = *a; truelight@0: *a = *b; truelight@0: *b = t; truelight@0: } truelight@0: } while (--i); truelight@0: } truelight@0: } truelight@0: tron@1093: static void StopMusic(void) truelight@0: { truelight@0: _music_wnd_cursong = 0; truelight@0: DoStopMusic(); truelight@0: _song_is_active = false; truelight@0: InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9); truelight@0: } truelight@0: tron@1093: static void PlayPlaylistSong(void) truelight@0: { truelight@0: if (_cur_playlist[0] == 0) { truelight@0: SelectSongToPlay(); belugas@4867: /* if there is not songs in the playlist, it may indicate belugas@4867: * no file on the gm folder, or even no gm folder. belugas@4867: * Stop the playback, then */ belugas@4120: if (_cur_playlist[0] == 0) { belugas@4120: _song_is_active = false; belugas@4120: _music_wnd_cursong = 0; belugas@4120: msf.playing = false; belugas@4120: return; belugas@4120: } truelight@0: } truelight@0: _music_wnd_cursong = _cur_playlist[0]; truelight@0: DoPlaySong(); truelight@0: _song_is_active = true; truelight@193: truelight@0: InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9); truelight@0: } truelight@0: tron@1093: void ResetMusic(void) truelight@0: { truelight@0: _music_wnd_cursong = 1; truelight@0: DoPlaySong(); truelight@0: } truelight@0: tron@1093: void MusicLoop(void) truelight@0: { Darkvater@3052: if (!msf.playing && _song_is_active) { truelight@0: StopMusic(); Darkvater@3052: } else if (msf.playing && !_song_is_active) { truelight@0: PlayPlaylistSong(); truelight@0: } truelight@0: belugas@4120: if (!_song_is_active) return; truelight@0: Darkvater@1724: if (!_music_driver->is_song_playing()) { Darkvater@1724: if (_game_mode != GM_MENU) { Darkvater@1724: StopMusic(); Darkvater@1724: SkipToNextSong(); Darkvater@1724: PlayPlaylistSong(); tron@2639: } else { Darkvater@1724: ResetMusic(); tron@2639: } truelight@0: } truelight@0: } truelight@0: truelight@0: static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e) truelight@0: { tron@2952: switch (e->event) { truelight@0: case WE_PAINT: { tron@2630: const byte* p; tron@2133: uint i; tron@2133: int y; truelight@0: belugas@4709: SetWindowWidgetDisabledState(w, 11, msf.playlist <= 3); belugas@4719: LowerWindowWidget(w, 3); belugas@4719: LowerWindowWidget(w, 4); truelight@0: DrawWindowWidgets(w); truelight@0: truelight@0: GfxFillRect(3, 23, 3+177,23+191,0); truelight@0: GfxFillRect(251, 23, 251+177,23+191,0); truelight@0: truelight@0: DrawStringCentered(92, 15, STR_01EE_TRACK_INDEX, 0); truelight@0: tron@534: SetDParam(0, STR_01D5_ALL + msf.playlist); truelight@0: DrawStringCentered(340, 15, STR_01EF_PROGRAM, 0); truelight@0: tron@2133: for (i = 1; i <= NUM_SONGS_AVAILABLE; i++) { tron@534: SetDParam(0, i); tron@534: SetDParam(2, i); tron@534: SetDParam(1, SPECSTR_SONGNAME); truelight@0: DrawString(4, 23+(i-1)*6, (i < 10) ? STR_01EC_0 : STR_01ED, 0); truelight@0: } truelight@0: tron@2639: for (i = 0; i != 6; i++) { tron@2639: DrawStringCentered(216, 45 + i * 8, STR_01D5_ALL + i, (i == msf.playlist) ? 0xC : 0x10); truelight@0: } truelight@0: truelight@193: DrawStringCentered(216, 45+8*6+16, STR_01F0_CLEAR, 0); tron@4468: #if 0 tron@4468: DrawStringCentered(216, 45 + 8 * 6 + 16 * 2, STR_01F1_SAVE, 0); tron@4468: #endif truelight@0: truelight@0: y = 23; tron@2639: for (p = _playlists[msf.playlist], i = 0; (i = *p) != 0; p++) { tron@534: SetDParam(0, i); tron@2639: SetDParam(1, SPECSTR_SONGNAME); tron@534: SetDParam(2, i); truelight@0: DrawString(252, y, (i < 10) ? STR_01EC_0 : STR_01ED, 0); truelight@0: y += 6; truelight@0: } truelight@0: break; truelight@0: } truelight@193: truelight@0: case WE_CLICK: belugas@4634: switch (e->we.click.widget) { belugas@4867: case 3: { // add to playlist belugas@4634: int y = (e->we.click.pt.y - 23) / 6; tron@2639: uint i; truelight@0: byte *p; tron@2639: truelight@0: if (msf.playlist < 4) return; tron@2639: if (!IS_INT_INSIDE(y, 0, NUM_SONGS_AVAILABLE)) return; truelight@0: truelight@0: p = _playlists[msf.playlist]; belugas@4120: for (i = 0; i != NUM_SONGS_PLAYLIST - 1; i++) { truelight@0: if (p[i] == 0) { tron@2639: p[i] = y + 1; tron@2639: p[i + 1] = 0; truelight@0: SetWindowDirty(w); truelight@0: SelectSongToPlay(); truelight@0: break; truelight@0: } truelight@0: } belugas@4120: } break; truelight@0: belugas@4867: case 4: { // remove from playlist belugas@4634: int y = (e->we.click.pt.y - 23) / 6; belugas@4120: uint i; belugas@4120: byte *p; belugas@4120: belugas@4120: if (msf.playlist < 4) return; belugas@4120: if (!IS_INT_INSIDE(y, 0, NUM_SONGS_AVAILABLE)) return; belugas@4120: belugas@4120: p = _playlists[msf.playlist]; belugas@4120: for (i = y; i != NUM_SONGS_PLAYLIST - 1; i++) { belugas@4120: p[i] = p[i + 1]; belugas@4120: } belugas@4120: belugas@4120: SetWindowDirty(w); belugas@4120: SelectSongToPlay(); truelight@0: } break; belugas@4120: belugas@4867: case 11: // clear truelight@0: _playlists[msf.playlist][0] = 0; truelight@0: SetWindowDirty(w); truelight@0: StopMusic(); truelight@0: SelectSongToPlay(); truelight@0: break; belugas@4120: rubidium@4432: #if 0 belugas@4867: case 12: // save rubidium@4432: ShowInfo("MusicTrackSelectionWndProc:save not implemented\n"); rubidium@4432: break; rubidium@4432: #endif belugas@4120: truelight@0: case 5: case 6: case 7: case 8: case 9: case 10: /* set playlist */ belugas@4634: msf.playlist = e->we.click.widget - 5; truelight@0: SetWindowDirty(w); truelight@0: InvalidateWindow(WC_MUSIC_WINDOW, 0); truelight@0: StopMusic(); truelight@0: SelectSongToPlay(); truelight@0: break; truelight@0: } truelight@0: break; truelight@0: } truelight@0: } truelight@0: truelight@0: static const Widget _music_track_selection_widgets[] = { rubidium@4344: { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, truelight@867: { WWT_CAPTION, RESIZE_NONE, 14, 11, 431, 0, 13, STR_01EB_MUSIC_PROGRAM_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, Darkvater@4938: { WWT_PANEL, RESIZE_NONE, 14, 0, 431, 14, 217, 0x0, STR_NULL}, Darkvater@4938: { WWT_PANEL, RESIZE_NONE, 14, 2, 181, 22, 215, 0x0, STR_01FA_CLICK_ON_MUSIC_TRACK_TO}, Darkvater@4938: { WWT_PANEL, RESIZE_NONE, 14, 250, 429, 22, 215, 0x0, STR_CLICK_ON_TRACK_TO_REMOVE}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 44, 51, 0x0, STR_01F3_SELECT_ALL_TRACKS_PROGRAM}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 52, 59, 0x0, STR_01F4_SELECT_OLD_STYLE_MUSIC}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 60, 67, 0x0, STR_01F5_SELECT_NEW_STYLE_MUSIC}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 68, 75, 0x0, STR_0330_SELECT_EZY_STREET_STYLE}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 76, 83, 0x0, STR_01F6_SELECT_CUSTOM_1_USER_DEFINED}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 84, 91, 0x0, STR_01F7_SELECT_CUSTOM_2_USER_DEFINED}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 108, 115, 0x0, STR_01F8_CLEAR_CURRENT_PROGRAM_CUSTOM1}, tron@4468: #if 0 Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 186, 245, 124, 131, 0x0, STR_01F9_SAVE_MUSIC_SETTINGS}, tron@4468: #endif darkvater@176: { WIDGETS_END}, truelight@0: }; truelight@0: truelight@0: static const WindowDesc _music_track_selection_desc = { truelight@0: 104, 131, 432, 218, truelight@0: WC_MUSIC_TRACK_SELECTION,0, truelight@0: WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, truelight@0: _music_track_selection_widgets, truelight@0: MusicTrackSelectionWndProc truelight@0: }; truelight@0: tron@1093: static void ShowMusicTrackSelection(void) truelight@0: { truelight@0: AllocateWindowDescFront(&_music_track_selection_desc, 0); truelight@0: } truelight@0: truelight@0: static void MusicWindowWndProc(Window *w, WindowEvent *e) truelight@0: { tron@2952: switch (e->event) { truelight@0: case WE_PAINT: { tron@2639: uint i; truelight@0: StringID str; truelight@0: belugas@4719: RaiseWindowWidget(w, 7); belugas@4719: RaiseWindowWidget(w, 9); truelight@0: DrawWindowWidgets(w); truelight@0: truelight@0: GfxFillRect(187, 16, 200, 33, 0); truelight@0: tron@2639: for (i = 0; i != 8; i++) { truelight@0: int color = 0xD0; truelight@0: if (i > 4) { truelight@0: color = 0xBF; truelight@0: if (i > 6) { truelight@0: color = 0xB8; truelight@0: } truelight@0: } belugas@4120: GfxFillRect(187, NUM_SONGS_PLAYLIST - i * 2, 200, NUM_SONGS_PLAYLIST - i * 2, color); truelight@0: } truelight@0: truelight@0: GfxFillRect(60, 46, 239, 52, 0); truelight@0: tron@2639: if (_song_is_active == 0 || _music_wnd_cursong == 0) { tron@2639: str = STR_01E3; tron@2639: } else { tron@534: SetDParam(0, _music_wnd_cursong); tron@2639: str = (_music_wnd_cursong < 10) ? STR_01E4_0 : STR_01E5; truelight@0: } truelight@0: DrawString(62, 46, str, 0); truelight@0: truelight@0: str = STR_01E6; truelight@0: if (_song_is_active != 0 && _music_wnd_cursong != 0) { truelight@0: str = STR_01E7; tron@534: SetDParam(0, SPECSTR_SONGNAME); tron@534: SetDParam(1, _music_wnd_cursong); truelight@0: } truelight@0: DrawStringCentered(155, 46, str, 0); truelight@0: truelight@0: truelight@0: DrawString(60, 38, STR_01E8_TRACK_XTITLE, 0); truelight@193: tron@2639: for (i = 0; i != 6; i++) { tron@2639: DrawStringCentered(25 + i * 50, 59, STR_01D5_ALL + i, msf.playlist == i ? 0xC : 0x10); truelight@0: } truelight@0: truelight@0: DrawStringCentered(31, 43, STR_01E9_SHUFFLE, (msf.shuffle ? 0xC : 0x10)); truelight@0: DrawStringCentered(269, 43, STR_01EA_PROGRAM, 0); truelight@0: DrawStringCentered(141, 15, STR_01DB_MUSIC_VOLUME, 0); truelight@0: DrawStringCentered(141, 29, STR_01DD_MIN_MAX, 0); truelight@0: DrawStringCentered(247, 15, STR_01DC_EFFECTS_VOLUME, 0); truelight@0: DrawStringCentered(247, 29, STR_01DD_MIN_MAX, 0); truelight@0: hackykid@1938: DrawFrameRect(108, 23, 174, 26, 14, FR_LOWERED); hackykid@1938: DrawFrameRect(214, 23, 280, 26, 14, FR_LOWERED); truelight@0: tron@4468: DrawFrameRect( tron@4468: 108 + msf.music_vol / 2, 22, 111 + msf.music_vol / 2, 28, 14, 0 tron@4468: ); truelight@0: tron@4468: DrawFrameRect( tron@4468: 214 + msf.effect_vol / 2, 22, 217 + msf.effect_vol / 2, 28, 14, 0 tron@4468: ); truelight@0: } break; truelight@0: truelight@0: case WE_CLICK: belugas@4634: switch (e->we.click.widget) { truelight@0: case 2: // skip to prev truelight@0: if (!_song_is_active) truelight@0: return; truelight@0: SkipToPrevSong(); truelight@0: break; truelight@0: case 3: // skip to next truelight@0: if (!_song_is_active) truelight@0: return; truelight@0: SkipToNextSong(); truelight@0: break; truelight@0: case 4: // stop playing Darkvater@3052: msf.playing = false; truelight@0: break; truelight@0: case 5: // start playing Darkvater@3052: msf.playing = true; truelight@0: break; truelight@0: case 6:{ // volume sliders truelight@0: byte *vol,new_vol; belugas@4634: int x = e->we.click.pt.x - 88; truelight@0: truelight@0: if (x < 0) truelight@0: return; truelight@0: truelight@0: vol = &msf.music_vol; truelight@0: if (x >= 106) { truelight@0: vol = &msf.effect_vol; truelight@0: x -= 106; truelight@0: } truelight@0: truelight@0: new_vol = min(max(x-21,0)*2,127); truelight@0: if (new_vol != *vol) { truelight@0: *vol = new_vol; truelight@0: if (vol == &msf.music_vol) truelight@0: MusicVolumeChanged(new_vol); truelight@0: SetWindowDirty(w); truelight@0: } truelight@0: truelight@0: _left_button_clicked = false; truelight@0: } break; truelight@0: case 10: //toggle shuffle truelight@0: msf.shuffle ^= 1; truelight@0: StopMusic(); truelight@0: SelectSongToPlay(); truelight@0: break; truelight@0: case 11: //show track selection truelight@0: ShowMusicTrackSelection(); truelight@0: break; truelight@0: case 12: case 13: case 14: case 15: case 16: case 17: // playlist belugas@4634: msf.playlist = e->we.click.widget - 12; truelight@0: SetWindowDirty(w); truelight@0: InvalidateWindow(WC_MUSIC_TRACK_SELECTION, 0); truelight@0: StopMusic(); truelight@0: SelectSongToPlay(); truelight@0: break; truelight@0: } truelight@0: break; truelight@0: truelight@0: case WE_MOUSELOOP: truelight@0: InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 7); truelight@0: break; truelight@0: } truelight@0: truelight@0: } truelight@0: truelight@0: static const Widget _music_window_widgets[] = { rubidium@4344: { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, truelight@867: { WWT_CAPTION, RESIZE_NONE, 14, 11, 299, 0, 13, STR_01D2_JAZZ_JUKEBOX, STR_018C_WINDOW_TITLE_DRAG_THIS}, Darkvater@4937: { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 0, 21, 14, 35, SPR_IMG_SKIP_TO_PREV, STR_01DE_SKIP_TO_PREVIOUS_TRACK}, Darkvater@4937: { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 22, 43, 14, 35, SPR_IMG_SKIP_TO_NEXT, STR_01DF_SKIP_TO_NEXT_TRACK_IN_SELECTION}, Darkvater@4937: { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 44, 65, 14, 35, SPR_IMG_STOP_MUSIC, STR_01E0_STOP_PLAYING_MUSIC}, Darkvater@4937: { WWT_PUSHIMGBTN, RESIZE_NONE, 14, 66, 87, 14, 35, SPR_IMG_PLAY_MUSIC, STR_01E1_START_PLAYING_MUSIC}, Darkvater@4938: { WWT_PANEL, RESIZE_NONE, 14, 88, 299, 14, 35, 0x0, STR_01E2_DRAG_SLIDERS_TO_SET_MUSIC}, Darkvater@4938: { WWT_PANEL, RESIZE_NONE, 14, 186, 201, 15, 34, 0x0, STR_NULL}, Darkvater@4938: { WWT_PANEL, RESIZE_NONE, 14, 0, 299, 36, 57, 0x0, STR_NULL}, Darkvater@4938: { WWT_PANEL, RESIZE_NONE, 14, 59, 240, 45, 53, 0x0, STR_NULL}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 6, 55, 42, 49, 0x0, STR_01FB_TOGGLE_PROGRAM_SHUFFLE}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 244, 293, 42, 49, 0x0, STR_01FC_SHOW_MUSIC_TRACK_SELECTION}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 0, 49, 58, 65, 0x0, STR_01F3_SELECT_ALL_TRACKS_PROGRAM}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 50, 99, 58, 65, 0x0, STR_01F4_SELECT_OLD_STYLE_MUSIC}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 100, 149, 58, 65, 0x0, STR_01F5_SELECT_NEW_STYLE_MUSIC}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 150, 199, 58, 65, 0x0, STR_0330_SELECT_EZY_STREET_STYLE}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 200, 249, 58, 65, 0x0, STR_01F6_SELECT_CUSTOM_1_USER_DEFINED}, Darkvater@4938: { WWT_PUSHBTN, RESIZE_NONE, 14, 250, 299, 58, 65, 0x0, STR_01F7_SELECT_CUSTOM_2_USER_DEFINED}, darkvater@176: { WIDGETS_END}, truelight@0: }; truelight@0: truelight@0: static const WindowDesc _music_window_desc = { truelight@0: 0, 22, 300, 66, truelight@0: WC_MUSIC_WINDOW,0, truelight@0: WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, truelight@0: _music_window_widgets, truelight@0: MusicWindowWndProc truelight@0: }; truelight@0: tron@1093: void ShowMusicWindow(void) truelight@0: { truelight@0: AllocateWindowDescFront(&_music_window_desc, 0); truelight@0: }