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{
14 me.configureDialog(me);
15 return me;
16}
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 17 of file dialog_media_musicplayer.qc.

18{
19 entity e;
20 entity soundList, playList;
21 float columns_nospacing = (me.columns - 0.2);
22
23 me.gotoRC(me, 0.5, 0); me.setFirstColumn(me, me.currentColumn);
24 me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:")));
25 me.TD(me, 1, 2.5, e = makeXonoticInputBox(0, string_null));
26 soundList = makeXonoticSoundList();
27 e.onChange = SoundList_Filter_Change;
28 e.onChangeEntity = soundList;
29 playList = makeXonoticPlayList();
30 soundList.playlist = playList;
31
32 me.TR(me);
33 me.TD(me, me.rows - 4.5, columns_nospacing / 2, soundList);
34
35 me.gotoRC(me, me.rows - 3, 0);
36 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Add")), '0 0 0'));
37 e.onClick = SoundList_Add;
38 e.onClickEntity = soundList;
39 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Add all")), '0 0 0'));
40 e.onClick = SoundList_Add_All;
41 e.onClickEntity = soundList;
42 me.TR(me);
43 me.TD(me, 1, columns_nospacing / 2, e = makeXonoticButton(_("Set as menu track"), '0 0 0'));
45 e.onClickEntity = soundList;
46 me.TR(me);
47 me.TD(me, 1, columns_nospacing / 2, e = makeXonoticButton(_("Reset default menu track"), '0 0 0'));
49 e.onClickEntity = soundList;
50 me.TR(me);
51 me.TR(me);
52 me.gotoRC(me, 0.5, columns_nospacing / 2 + 0.2); me.setFirstColumn(me, me.currentColumn);
53 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticTextLabel(0, _("Playlist:")));
54 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticCheckBox(0, "music_playlist_random0", _("Random order")));
55 me.TR(me);
56 me.TD(me, me.rows - 3.5, columns_nospacing / 2, playList);
57
58 me.gotoRC(me, me.rows - 2, columns_nospacing / 2 + 0.2);
59 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Stop")), '0 0 0'));
60 e.onClick = StopSound_Click;
61 e.onClickEntity = playList;
62 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Play")), '0 0 0'));
63 e.onClick = StartSound_Click;
64 e.onClickEntity = playList;
65 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Pause")), '0 0 0'));
66 e.onClick = PauseSound_Click;
67 e.onClickEntity = playList;
68 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Prev")), '0 0 0'));
69 e.onClick = PrevSound_Click;
70 e.onClickEntity = playList;
71 me.TD(me, 1, columns_nospacing / 10, e = makeXonoticButton(ZCTX(_("MUSICPL^Next")), '0 0 0'));
72 e.onClick = NextSound_Click;
73 e.onClickEntity = playList;
74 me.TR(me);
75 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Remove")), '0 0 0'));
76 e.onClick = PlayList_Remove;
77 e.onClickEntity = playList;
78 me.TD(me, 1, columns_nospacing / 4, e = makeXonoticButton(ZCTX(_("MUSICPL^Remove all")), '0 0 0'));
79 e.onClick = PlayList_Remove_All;
80 e.onClickEntity = playList;
81}
#define ZCTX(s)
Definition i18n.qh:68
entity makeXonoticButton(string theText, vector theColor)
Definition button.qc:9
string string_null
Definition nil.qh:9
void StopSound_Click(entity btn, entity me)
Definition playlist.qc:173
void NextSound_Click(entity btn, entity me)
Definition playlist.qc:221
entity makeXonoticPlayList()
Definition playlist.qc:3
void PauseSound_Click(entity btn, entity me)
Definition playlist.qc:242
void PlayList_Remove(entity btn, entity me)
Definition playlist.qc:91
void PlayList_Remove_All(entity btn, entity me)
Definition playlist.qc:96
void PrevSound_Click(entity btn, entity me)
Definition playlist.qc:216
void StartSound_Click(entity btn, entity me)
Definition playlist.qc:211
void SoundList_Add(entity box, entity me)
Definition soundlist.qc:115
void SoundList_Filter_Change(entity box, entity me)
Definition soundlist.qc:105
entity makeXonoticSoundList()
Definition soundlist.qc:6
void SoundList_Menu_Track_Reset(entity box, entity me)
Definition soundlist.qc:100
void SoundList_Menu_Track_Change(entity box, entity me)
Definition soundlist.qc:95
void SoundList_Add_All(entity box, entity me)
Definition soundlist.qc:120
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:9

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.