-#ifdef INTERFACE
-CLASS(XonoticScreenshotBrowserTab) EXTENDS(XonoticTab)
- METHOD(XonoticScreenshotBrowserTab, fill, void(entity))
- ATTRIB(XonoticScreenshotBrowserTab, title, string, "Screenshot")
- ATTRIB(XonoticScreenshotBrowserTab, intendedWidth, float, 1)
- ATTRIB(XonoticScreenshotBrowserTab, rows, float, 21)
- ATTRIB(XonoticScreenshotBrowserTab, columns, float, 6.5)
- ATTRIB(XonoticScreenshotBrowserTab, name, string, "ScreenshotBrowser")
+#include "dialog_multiplayer_media_screenshot.qh"
- METHOD(XonoticScreenshotBrowserTab, loadPreviewScreenshot, void(entity, string))
- ATTRIB(XonoticScreenshotBrowserTab, screenshotImage, entity, NULL)
- ATTRIB(XonoticScreenshotBrowserTab, currentScrPath, string, string_null)
-ENDCLASS(XonoticScreenshotBrowserTab)
-entity makeXonoticScreenshotBrowserTab();
-#endif
+#include "dialog_multiplayer_media_screenshot_viewer.qh"
+#include "screenshotlist.qh"
+
+#include "textlabel.qh"
+#include "inputbox.qh"
+#include "checkbox.qh"
+#include "button.qh"
-#ifdef IMPLEMENTATION
entity makeXonoticScreenshotBrowserTab()
{
entity me;
- me = spawnXonoticScreenshotBrowserTab();
+ me = NEW(XonoticScreenshotBrowserTab);
me.configureDialog(me);
return me;
}
{
if (me.currentScrPath == scrImage)
return;
- if (me.currentScrPath)
- strunzone(me.currentScrPath);
- me.currentScrPath = strzone(scrImage);
+ strcpy(me.currentScrPath, scrImage);
me.screenshotImage.load(me.screenshotImage, me.currentScrPath);
}
void XonoticScreenshotBrowserTab_fill(entity me)
me.gotoRC(me, 0, 3.1);
me.TD(me, 1, 1.9, e = makeXonoticCheckBoxEx(2, 1, "cl_autoscreenshot", _("Auto screenshot scoreboard")));
+ e.sendCvars = true;
me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0'));
e.onClick = ScreenshotList_Refresh_Click;
e.onClickEntity = slist;
slist.screenshotBrowserDialog = me;
*/
}
-#endif