Go to the source code of this file.
|
entity | makeXonoticPlayList () |
|
void | NextSound_Click (entity btn, entity me) |
|
void | PauseSound_Click (entity btn, entity me) |
|
void | PlayList_Remove (entity btn, entity me) |
|
void | PlayList_Remove_All (entity btn, entity me) |
|
void | PrevSound_Click (entity btn, entity me) |
|
void | StartSound_Click (entity btn, entity me) |
|
void | StopSound_Click (entity btn, entity me) |
|
void | XonoticPlayList_addToPlayList (entity me, string track) |
|
void | XonoticPlayList_configureXonoticPlayList (entity me) |
|
void | XonoticPlayList_doubleClickListBoxItem (entity me, float i, vector where) |
|
void | XonoticPlayList_draw (entity me) |
|
void | XonoticPlayList_drawListBoxItem (entity me, int i, vector absSize, bool isSelected, bool isFocused) |
|
float | XonoticPlayList_keyDown (entity me, float scan, float ascii, float shift) |
|
float | XonoticPlayList_mouseDrag (entity me, vector pos) |
|
void | XonoticPlayList_pauseSound (entity me) |
|
void | XonoticPlayList_removeSelectedFromPlayList (entity me) |
|
void | XonoticPlayList_resizeNotify (entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) |
|
void | XonoticPlayList_resumeSound (entity me) |
|
void | XonoticPlayList_startSound (entity me, float offset) |
|
void | XonoticPlayList_stopSound (entity me) |
|
◆ makeXonoticPlayList()
entity makeXonoticPlayList |
( |
| ) |
|
◆ NextSound_Click()
Definition at line 222 of file playlist.qc.
224 me.startSound(me, +1);
◆ PauseSound_Click()
◆ PlayList_Remove()
Definition at line 92 of file playlist.qc.
94 me.removeSelectedFromPlayList(me);
◆ PlayList_Remove_All()
◆ PrevSound_Click()
Definition at line 217 of file playlist.qc.
219 me.startSound(me, -1);
◆ StartSound_Click()
◆ StopSound_Click()
◆ XonoticPlayList_addToPlayList()
Definition at line 35 of file playlist.qc.
References argv(), cvar_set(), cvar_string(), strcat(), and tokenize_console.
40 cvar_set(
"music_playlist_list0", track);
44 for(i = 0; i < me.nItems; ++i)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
◆ XonoticPlayList_configureXonoticPlayList()
void XonoticPlayList_configureXonoticPlayList |
( |
entity |
me | ) |
|
◆ XonoticPlayList_doubleClickListBoxItem()
◆ XonoticPlayList_draw()
◆ XonoticPlayList_drawListBoxItem()
Definition at line 136 of file playlist.qc.
References argv(), cvar(), draw_CenterText(), draw_Fill(), draw_Text(), draw_TextShortenToWidth(), eX, eY, ftos(), getFadedAlpha(), and time.
140 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
143 me.focusedItemAlpha =
getFadedAlpha(me.focusedItemAlpha, SKINALPHA_LISTBOX_FOCUSED, SKINFADEALPHA_LISTBOX_FOCUSED);
144 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_FOCUSED, me.focusedItemAlpha);
147 if(i == me.playingTrack)
149 float f =
cvar(
"music_playlist_sampleposition0");
151 if(f <= 0 || (((
time * 2) & 1) && f > 0))
152 draw_Text(me.realUpperMargin *
eY + (me.columnNumberOrigin + me.columnNumberSize) *
eX,
"\xE2\x96\xB6", me.realFontSize,
'1 1 1', SKINALPHA_TEXT, 0);
156 draw_CenterText(me.realUpperMargin *
eY + (me.columnNumberOrigin + 0.5 * me.columnNumberSize) *
eX, s, me.realFontSize,
'1 1 1', SKINALPHA_TEXT, 0);
159 draw_Text(me.realUpperMargin *
eY + me.columnNameOrigin *
eX, s, me.realFontSize,
'1 1 1', SKINALPHA_TEXT, 0);
◆ XonoticPlayList_keyDown()
◆ XonoticPlayList_mouseDrag()
◆ XonoticPlayList_pauseSound()
◆ XonoticPlayList_removeSelectedFromPlayList()
void XonoticPlayList_removeSelectedFromPlayList |
( |
entity |
me | ) |
|
Definition at line 52 of file playlist.qc.
References argv(), cvar(), cvar_set(), cvar_string(), ftos(), strcat(), strlen(), substring(), and tokenize_console.
59 for(i = 0; i < me.nItems; ++i)
61 if(i == me.selectedItem)
63 if(i == me.nItems - 1)
64 me.setSelected(me, me.selectedItem - 1);
65 if(
cvar(
"music_playlist_index") == 0 ||
cvar(
"music_playlist_index") == 999)
67 if(
cvar(
"music_playlist_current0") == i)
69 else if(
cvar(
"music_playlist_current0") > i)
70 cvar_set(
"music_playlist_current0",
ftos(
cvar(
"music_playlist_current0") - 1));
80 cvar_set(
"music_playlist_list0",
"");
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
◆ XonoticPlayList_resizeNotify()
Definition at line 17 of file playlist.qc.
References SUPER.
19 me.itemAbsSize =
'0 0 0';
22 me.itemAbsSize.y = absSize.y * me.itemHeight;
23 me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
24 me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
25 me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
26 me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
28 me.columnNumberOrigin = 0;
29 me.columnNumberSize = 3 * me.realFontSize.x;
31 me.columnNameOrigin = me.columnNumberSize + me.realFontSize.x;
32 me.columnNameSize = 1 - me.columnNameOrigin - me.realFontSize.x;
◆ XonoticPlayList_resumeSound()
Definition at line 227 of file playlist.qc.
References cvar(), and localcmd.
231 if(
cvar(
"music_playlist_index") == 999)
232 localcmd(
"\nmusic_playlist_index 0; wait; music_playlist_sampleposition0 0\n");
◆ XonoticPlayList_startSound()
◆ XonoticPlayList_stopSound()