Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_media_musicplayer.qc File Reference
#include "dialog_media_musicplayer.qh"
#include "soundlist.qh"
#include "playlist.qh"
#include "textlabel.qh"
#include "inputbox.qh"
#include "button.qh"
#include "checkbox.qh"
Include dependency graph for dialog_media_musicplayer.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

entity makeXonoticMusicPlayerTab ()
void XonoticMusicPlayerTab_fill (entity me)

Function Documentation

◆ makeXonoticMusicPlayerTab()

entity makeXonoticMusicPlayerTab ( )

Definition at line 11 of file dialog_media_musicplayer.qc.

12{
13 entity me;
15 me.configureDialog(me);
16 return me;
17}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define NEW(cname,...)
Definition oo.qh:117

References entity(), and NEW.

Referenced by XonoticMediaDialog_fill().

◆ XonoticMusicPlayerTab_fill()

void XonoticMusicPlayerTab_fill ( entity me)

Definition at line 18 of file dialog_media_musicplayer.qc.

19{
20 entity e;
21 entity soundList, playList;
22 float columns_nospacing = (me.columns - 0.2);
23
24 me.gotoRC(me, 0.5, 0); me.setFirstColumn(me, me.currentColumn);
25 me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:")));
26 me.TD(me, 1, 2.5, e = makeXonoticInputBox(0, string_null));
27 soundList = makeXonoticSoundList();
28 e.onChange = SoundList_Filter_Change;
29 e.onChangeEntity = soundList;
30 playList = makeXonoticPlayList();
31 soundList.playlist = playList;
32
33 me.TR(me);
34 me.TD(me, me.rows - 4.5, columns_nospacing / 2, soundList);
35
36 me.gotoRC(me, me.rows - 3, 0);
37 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Add")), '0 0 0'));
38 e.onClick = SoundList_Add;
39 e.onClickEntity = soundList;
40 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Add all")), '0 0 0'));
41 e.onClick = SoundList_Add_All;
42 e.onClickEntity = soundList;
43 me.TR(me);
44 me.TD(me, 1, columns_nospacing / 2, e = makeXonoticButton(_("Set as menu track"), '0 0 0'));
46 e.onClickEntity = soundList;
47 me.TR(me);
48 me.TD(me, 1, columns_nospacing / 2, e = makeXonoticButton(_("Reset default menu track"), '0 0 0'));
50 e.onClickEntity = soundList;
51 me.TR(me);
52 me.TR(me);
53 me.gotoRC(me, 0.5, columns_nospacing / 2 + 0.2); me.setFirstColumn(me, me.currentColumn);
54 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticTextLabel(0, _("Playlist:")));
55 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticCheckBox(0, "music_playlist_random0", _("Random order")));
56 me.TR(me);
57 me.TD(me, me.rows - 3.5, columns_nospacing / 2, playList);
58
59 me.gotoRC(me, me.rows - 2, columns_nospacing / 2 + 0.2);
60 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Stop")), '0 0 0'));
61 e.onClick = StopSound_Click;
62 e.onClickEntity = playList;
63 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Play")), '0 0 0'));
64 e.onClick = StartSound_Click;
65 e.onClickEntity = playList;
66 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Pause")), '0 0 0'));
67 e.onClick = PauseSound_Click;
68 e.onClickEntity = playList;
69 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Prev")), '0 0 0'));
70 e.onClick = PrevSound_Click;
71 e.onClickEntity = playList;
72 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Next")), '0 0 0'));
73 e.onClick = NextSound_Click;
74 e.onClickEntity = playList;
75 me.TR(me);
76 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Remove")), '0 0 0'));
77 e.onClick = PlayList_Remove;
78 e.onClickEntity = playList;
79 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Remove all")), '0 0 0'));
80 e.onClick = PlayList_Remove_All;
81 e.onClickEntity = playList;
82}
#define ZCTX(s)
Definition i18n.qh:68
entity makeXonoticButton(string theText, vector theColor)
Definition button.qc:10
string string_null
Definition nil.qh:9
void StopSound_Click(entity btn, entity me)
Definition playlist.qc:174
void NextSound_Click(entity btn, entity me)
Definition playlist.qc:222
entity makeXonoticPlayList()
Definition playlist.qc:3
void PauseSound_Click(entity btn, entity me)
Definition playlist.qc:243
void PlayList_Remove(entity btn, entity me)
Definition playlist.qc:92
void PlayList_Remove_All(entity btn, entity me)
Definition playlist.qc:97
void PrevSound_Click(entity btn, entity me)
Definition playlist.qc:217
void StartSound_Click(entity btn, entity me)
Definition playlist.qc:212
void SoundList_Add(entity box, entity me)
Definition soundlist.qc:117
void SoundList_Filter_Change(entity box, entity me)
Definition soundlist.qc:107
entity makeXonoticSoundList()
Definition soundlist.qc:6
void SoundList_Menu_Track_Reset(entity box, entity me)
Definition soundlist.qc:102
void SoundList_Menu_Track_Change(entity box, entity me)
Definition soundlist.qc:97
void SoundList_Add_All(entity box, entity me)
Definition soundlist.qc:122
entity makeXonoticTextLabel(float theAlign, string theText)
Definition textlabel.qc:3
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition checkbox.qc:28
entity makeXonoticInputBox(bool doEditColorCodes, string theCvar)
Definition inputbox.qc:10

References entity(), makeXonoticButton(), makeXonoticCheckBox(), makeXonoticInputBox(), makeXonoticPlayList(), makeXonoticSoundList(), makeXonoticTextLabel(), NextSound_Click(), PauseSound_Click(), PlayList_Remove(), PlayList_Remove_All(), PrevSound_Click(), SoundList_Add(), SoundList_Add_All(), SoundList_Filter_Change(), SoundList_Menu_Track_Change(), SoundList_Menu_Track_Reset(), StartSound_Click(), StopSound_Click(), string_null, and ZCTX.