]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc
Merge branch 'master' into terencehill/min_spec_time
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_media_screenshot.qc
index 89a76b608dce46dcb73c662188a790298b15f749..afde0914a48b981db347492f8db456e31ae4da64 100644 (file)
@@ -1,24 +1,17 @@
-#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;
 }
@@ -26,9 +19,7 @@ void XonoticScreenshotBrowserTab_loadPreviewScreenshot(entity me, string scrImag
 {
        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)
@@ -79,4 +70,3 @@ void XonoticScreenshotBrowserTab_fill(entity me)
                        slist.screenshotBrowserDialog = me;
 */
 }
-#endif