Xonotic
dialog_multiplayer_media_screenshot.qc
Go to the documentation of this file.
2 
4 #include "screenshotlist.qh"
5 
6 #include "textlabel.qh"
7 #include "inputbox.qh"
8 #include "checkbox.qh"
9 #include "button.qh"
10 
12 {
13  entity me;
15  me.configureDialog(me);
16  return me;
17 }
19 {
20  if (me.currentScrPath == scrImage)
21  return;
22  strcpy(me.currentScrPath, scrImage);
23  me.screenshotImage.load(me.screenshotImage, me.currentScrPath);
24 }
26 {
27  entity e, slist;
28  slist = makeXonoticScreenshotList();
29  float slist_height = me.rows - 2;
30 
31 
32  me.TR(me);
33  me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, _("Filter:")));
34  me.TD(me, 1, 2.4, e = makeXonoticInputBox(0, string_null));
36  e.onChangeEntity = slist;
37  slist.screenshotViewerDialog = main.screenshotViewerDialog;
38  main.screenshotViewerDialog.scrList = slist;
39 
40  me.gotoRC(me, 0, 3.1);
41  me.TD(me, 1, 1.9, e = makeXonoticCheckBoxEx(2, 1, "cl_autoscreenshot", _("Auto screenshot scoreboard")));
42  e.sendCvars = true;
43  me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0'));
44  e.onClick = ScreenshotList_Refresh_Click;
45  e.onClickEntity = slist;
46 
47  /*me.TR(me);
48  me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Filter:"));
49  me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
50  e.onChange = ScreenshotList_Filter_Would_Change;
51  e.onChangeEntity = slist;
52  slist.screenshotViewerDialog = main.screenshotViewerDialog;
53  main.screenshotViewerDialog.scrList = slist;
54  me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0'));
55  e.onClick = ScreenshotList_Refresh_Click;
56  e.onClickEntity = slist;*/
57 
58  me.gotoRC(me, 1.5, 0);
59  me.TD(me, me.rows - 2.5, me.columns, slist);
60 
61  me.gotoRC(me, slist_height + 1, 0);
62  me.TD(me, 1, me.columns, e = makeXonoticButton(_("Open in the viewer"), '0 0 0'));
63  e.onClick = StartScreenshot_Click;
64  e.onClickEntity = slist;
65 /*
66  me.TR(me);
67  me.TD(me, me.rows - me.currentRow, me.columns, e = makeXonoticScreenshotImage());
68  e.showTitle = 0;
69  me.screenshotImage = e;
70  slist.screenshotPreview = e;
71  slist.screenshotBrowserDialog = me;
72 */
73 }
string string_null
Definition: nil.qh:9
void StartScreenshot_Click(entity btn, entity me)
#define NEW(cname,...)
Definition: oo.qh:105
entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText)
Definition: checkbox.qc:40
entity makeXonoticScreenshotBrowserTab()
void XonoticScreenshotBrowserTab_loadPreviewScreenshot(entity me, string scrImage)
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
#define strcpy(this, s)
Definition: string.qh:49
void XonoticScreenshotBrowserTab_fill(entity me)
entity makeXonoticScreenshotList()
void ScreenshotList_Refresh_Click(entity btn, entity me)
void ScreenshotList_Filter_Would_Change(entity box, entity me)
entity makeXonoticInputBox(float doEditColorCodes, string theCvar)
Definition: inputbox.qc:10