From 4b104ecdaf68b089871e9c37b845f6ead07c5af2 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 12 Aug 2010 19:56:30 +0200 Subject: [PATCH] Define the color of the viewer And do a small cleanup on dialog_multiplayer_screenshot.c --- gfx/menu/default/skinvalues.txt | 1 + gfx/menu/xaw/skinvalues.txt | 1 + qcsrc/menu/skin-customizables.inc | 1 + qcsrc/menu/xonotic/dialog_multiplayer_screenshot.c | 8 +++++--- .../dialog_multiplayer_screenshot_screenshotviewer.c | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gfx/menu/default/skinvalues.txt b/gfx/menu/default/skinvalues.txt index 8e0f548a7..de81ef878 100755 --- a/gfx/menu/default/skinvalues.txt +++ b/gfx/menu/default/skinvalues.txt @@ -177,6 +177,7 @@ COLOR_DIALOG_WEAPONS '1 1 1' COLOR_DIALOG_RADAR '1 1 1' COLOR_DIALOG_SERVERINFO '1 1 1' COLOR_DIALOG_CVARS '1 0 0' +COLOR_DIALOG_SCREENSHOTVIEWER '1 1 1' // item: input box // uses "inputbox" images diff --git a/gfx/menu/xaw/skinvalues.txt b/gfx/menu/xaw/skinvalues.txt index 666b971c2..b34f88c8a 100644 --- a/gfx/menu/xaw/skinvalues.txt +++ b/gfx/menu/xaw/skinvalues.txt @@ -32,6 +32,7 @@ COLOR_DIALOG_WEAPONS '1 1 1' COLOR_DIALOG_RADAR '1 1 1' COLOR_DIALOG_SERVERINFO '1 1 1' COLOR_DIALOG_CVARS '1 0 0' +COLOR_DIALOG_SCREENSHOTVIEWER '1 1 1' // nexposee positions of windows (they are the scale transformation // centers, NOT the actual positions of the windows!) diff --git a/qcsrc/menu/skin-customizables.inc b/qcsrc/menu/skin-customizables.inc index c3320e503..5270cb672 100644 --- a/qcsrc/menu/skin-customizables.inc +++ b/qcsrc/menu/skin-customizables.inc @@ -65,6 +65,7 @@ SKINBEGIN SKINVECTOR(COLOR_DIALOG_RADAR, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_SERVERINFO, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_CVARS, '1 0 0'); + SKINVECTOR(COLOR_DIALOG_SCREENSHOTVIEWER, '0.7 0.7 1'); // nexposee positions of windows (they are the scale transformation // centers, NOT the actual positions of the windows!) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_screenshot.c b/qcsrc/menu/xonotic/dialog_multiplayer_screenshot.c index c46d631d3..56aacdf30 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_screenshot.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_screenshot.c @@ -33,6 +33,7 @@ void XonoticScreenshotBrowserTab_fill(entity me) { entity e, btn, slist; slist = makeXonoticScreenshotList(); + const float slist_height = 8; me.TR(me); me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Filter:")); me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0')); @@ -48,13 +49,14 @@ void XonoticScreenshotBrowserTab_fill(entity me) e.onClick = ScreenshotList_Refresh_Click; e.onClickEntity = slist; me.TR(me); - me.TD(me, 8, me.columns, slist); - me.gotoRC(me, 9, 0); + me.TD(me, slist_height, me.columns, slist); + + me.gotoRC(me, slist_height + 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton("Open in the viewer", '0 0 0')); e.onClick = StartScreenshot_Click; e.onClickEntity = slist; me.TR(me); - me.TD(me, me.rows - 10, me.columns, e = makeXonoticScreenshotImage()); + me.TD(me, me.rows - me.currentRow, me.columns, e = makeXonoticScreenshotImage()); e.showTitle = 0; me.screenshotImage = e; slist.screenshotPreview = e; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_screenshot_screenshotviewer.c b/qcsrc/menu/xonotic/dialog_multiplayer_screenshot_screenshotviewer.c index 07047cf0f..f0cd2ecc6 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_screenshot_screenshotviewer.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_screenshot_screenshotviewer.c @@ -8,7 +8,7 @@ CLASS(XonoticScreenshotViewerDialog) EXTENDS(XonoticDialog) ATTRIB(XonoticScreenshotViewerDialog, intendedWidth, float, 1) ATTRIB(XonoticScreenshotViewerDialog, rows, float, 25) ATTRIB(XonoticScreenshotViewerDialog, columns, float, 6.5) - ATTRIB(XonoticScreenshotViewerDialog, color, vector, SKINCOLOR_DIALOG_MULTIPLAYER) + ATTRIB(XonoticScreenshotViewerDialog, color, vector, SKINCOLOR_DIALOG_SCREENSHOTVIEWER) ATTRIB(XonoticScreenshotViewerDialog, scrList, entity, NULL) ATTRIB(XonoticScreenshotViewerDialog, screenshotImage, entity, NULL) ATTRIB(XonoticScreenshotViewerDialog, currentScrPath, string, string_null) -- 2.39.2