Merge branch 'master' into terencehill/screenshot_viewer
authorterencehill <piuntn@gmail.com>
Sat, 4 Feb 2012 19:04:42 +0000 (20:04 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 4 Feb 2012 19:04:42 +0000 (20:04 +0100)
Conflicts:
gfx/menu/wickedx/skinvalues.txt
gfx/menu/xaw/skinvalues.txt
qcsrc/menu/item/image.c
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/dialog_multiplayer.c
qcsrc/menu/xonotic/mainwindow.c

1  2 
gfx/menu/wickedx/skinvalues.txt
gfx/menu/xaw/skinvalues.txt
qcsrc/menu/classes.c
qcsrc/menu/item/image.c
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/dialog_multiplayer.c
qcsrc/menu/xonotic/mainwindow.c

index 0000000,3259d71..d391011
mode 000000,100755..100644
--- /dev/null
@@@ -1,0 -1,229 +1,230 @@@
+ title WickedX
+ author sev
+ // Colors: 'Red Green Blue'
+ // Suffixes: Clicked (_c), Disabled (_d), Focused (_f), Normal (_n)
+ // Background layer scaling:
+ //   Crop (c), Letterbox (l), Height (h), Width (w), Stretch (s)
+ // Background layer positioning:
+ //   Top Left (7), Top Center (8) Top Right (9)
+ //   Middle Left (4), Middle Center (5) Middle Right (6)
+ //   Bottom Left (1), Bottom Center (2) Bottom Right (3)
+ // ALIGN_BACKGROUND(_INGAME) spspsp, s=Scale p=Position
+ //------------------------------------------------------------------------------
+ // Structure (e.g. positions, sizes, margins)
+ //------------------------------------------------------------------------------
+ // item: color picker
+ //   uses "colorpicker" images
+ MARGIN_COLORPICKER              '0 0 0'
+ // item: dialog
+ //   uses "border" images
+ //   uses "closebutton" images
+ MARGIN_TOP                      8
+ MARGIN_BOTTOM                   12
+ MARGIN_LEFT                     16
+ MARGIN_RIGHT                    16
+ MARGIN_COLUMNS                  4
+ MARGIN_ROWS                     4
+ HEIGHT_DIALOGBORDER             1
+ // font sizes (used for everything)
+ FONTSIZE_NORMAL                 12
+ HEIGHT_NORMAL                   1.5
+ FONTSIZE_TITLE                  16
+ HEIGHT_TITLE                    1.5
+ HEIGHT_ZOOMEDTITLE              -1
+ // general 
+ //   uses "background" images
+ //   uses "background_ingame" images
+ ALIGN_BACKGROUND                h5h5
+ ALIGN_BACKGROUND_INGAME         h5
+ ALPHA_BACKGROUND_INGAME         1
+ ALPHA_DISABLED                  0.2
+ ALPHA_BEHIND                    0.5
+ ALPHA_TEXT                      0.7
+ // mouse
+ //   uses "cursor" images
+ SIZE_CURSOR                     '32 32 0'
+ OFFSET_CURSOR                   '0 0 0'
+ ALPHA_CURSOR_INTRO              0
+ // nexposee positions of windows (they are the scale transformation
+ // centers, NOT the actual positions of the windows!)
+ POSITION_DIALOG_MULTIPLAYER     '0.8 0.4 0'
+ POSITION_DIALOG_SINGLEPLAYER    '0.2 0.4 0'
+ POSITION_DIALOG_SETTINGS        '0.5 0.95 0'
+ POSITION_DIALOG_CREDITS         '-0.05 1.2 0'
+ POSITION_DIALOG_QUIT            '1.05 1.2 0'
+ // tooltips
+ //   uses "tooltip" images
+ MARGIN_TOOLTIP                  '8 8 0'
+ BORDER_TOOLTIP                  '16 16 0'
+ FONTSIZE_TOOLTIP                12
+ ALPHA_TOOLTIP                   0.7
+ WIDTH_TOOLTIP                   0.3
+ AVOID_TOOLTIP                   '8 8 0'
+ //------------------------------------------------------------------------------
+ // Colors (e.g. font colors, field colors)
+ //------------------------------------------------------------------------------
+ // item: campaign
+ ALPHA_CAMPAIGN_SELECTABLE       0.8
+ COLOR_CAMPAIGN_SELECTABLE       '1 1 1'
+ ALPHA_CAMPAIGN_CURRENT          1
+ COLOR_CAMPAIGN_CURRENT          '1 1 1'
+ ALPHA_CAMPAIGN_FUTURE           0.2
+ COLOR_CAMPAIGN_FUTURE           '1 1 1'
+ ALPHA_CAMPAIGN_DESCRIPTION      0.7
+ // item: credits list
+ COLOR_CREDITS_TITLE             '0.875 0.375 0'
+ ALPHA_CREDITS_TITLE             1
+ COLOR_CREDITS_FUNCTION          '0 0.1875 0.4375'
+ ALPHA_CREDITS_FUNCTION          0.5
+ COLOR_CREDITS_PERSON            '0 0.375 0.75'
+ ALPHA_CREDITS_PERSON            0.875
+ ROWS_CREDITS                    20
+ WIDTH_CREDITS                   0.5
+ // item: cvar list
+ ALPHA_CVARLIST_SAVED            1
+ ALPHA_CVARLIST_TEMPORARY        0.7    
+ COLOR_CVARLIST_CHANGED          '0 0.375 0.75' 
+ COLOR_CVARLIST_UNCHANGED        '1 1 1'
+ COLOR_CVARLIST_CONTROLS         '1 0 0'
+ // item: list box
+ COLOR_LISTBOX_SELECTED          '0.875 0.375 0'
+ ALPHA_LISTBOX_SELECTED          1
+ COLOR_LISTBOX_WAITING           '1 1 1'
+ ALPHA_LISTBOX_WAITING           0.5
+ // item: map list
+ COLOR_MAPLIST_TITLE             '1 1 1'
+ COLOR_MAPLIST_AUTHOR            '0 0.375 0.75'
+ COLOR_MAPLIST_INCLUDEDBG        '0 0.1875 0.4375'
+ ALPHA_MAPLIST_INCLUDEDFG        1
+ ALPHA_MAPLIST_INCLUDEDBG        0.375
+ ALPHA_MAPLIST_NOTINCLUDEDFG     0.25
+ // item: nexposee
+ ALPHAS_MAINMENU                 '0.8 0.9 1'
+ // item: player model
+ COLOR_MODELTITLE                '1 1 1'
+ ALPHA_MODELTITLE                1
+ // item: server info
+ COLOR_SERVERINFO_NAME           '1 1 1'
+ COLOR_SERVERINFO_IP             '0.875 0.375 0'
+ // item: server list
+ ALPHA_SERVERLIST_FULL           0.4
+ ALPHA_SERVERLIST_EMPTY          0.7
+ COLOR_SERVERLIST_LOWPING        '0 1 0'
+ COLOR_SERVERLIST_MEDPING        '1 0.75 0'
+ COLOR_SERVERLIST_HIGHPING       '1 0 0'
+ ALPHA_SERVERLIST_HIGHPING       0.4
+ ALPHA_SERVERLIST_FAVORITE       0.8
+ COLOR_SERVERLIST_FAVORITE       '1 1 1'
+ // item: skin list
+ COLOR_SKINLIST_TITLE            '1 1 1'
+ COLOR_SKINLIST_AUTHOR           '0 0.375 0.75'
+ //------------------------------------------------------------------------------
+ // Images (colors multiplied to images)
+ //------------------------------------------------------------------------------
+ // item: button
+ //   uses "button" images
+ //   uses "buttongray" images
+ //   uses "bigbutton" images
+ //   uses "bigbuttongray" images
+ COLOR_BUTTON_N                  '1 1 1'
+ COLOR_BUTTON_C                  '1 1 1'
+ COLOR_BUTTON_F                  '1 1 1'
+ COLOR_BUTTON_D                  '1 1 1'
+ // item: checkbox
+ //   uses "checkbox" images
+ COLOR_CHECKBOX_N                '1 1 1'
+ COLOR_CHECKBOX_C                '0.5 0.75 1'
+ COLOR_CHECKBOX_F                '0.5 0.75 1'
+ COLOR_CHECKBOX_D                '1 1 1'
+ // item: crosshair button
+ //   uses "crosshairbutton" images
+ // dialog background colors
+ //   uses "border" images
+ COLOR_DIALOG_MULTIPLAYER        '1 1 1'
+ COLOR_DIALOG_SETTINGS           '1 1 1'
+ COLOR_DIALOG_TEAMSELECT         '1 1 1'
+ COLOR_DIALOG_SANDBOXTOOLS       '1 1 1'
+ COLOR_DIALOG_QUIT               '1 1 1'
+ COLOR_DIALOG_ADVANCED           '1 1 1'
+ COLOR_DIALOG_MUTATORS           '1 1 1'
+ COLOR_DIALOG_MAPINFO            '1 1 1'
+ COLOR_DIALOG_USERBIND           '1 1 1'
+ COLOR_DIALOG_SINGLEPLAYER       '1 1 1'
+ COLOR_DIALOG_CREDITS            '1 1 1'
+ COLOR_DIALOG_WEAPONS            '1 1 1'
+ COLOR_DIALOG_VIEW               '1 1 1'
+ COLOR_DIALOG_MODEL              '1 1 1'
+ COLOR_DIALOG_CROSSHAIR          '1 1 1'
+ COLOR_DIALOG_HUD                '1 1 1'
+ COLOR_DIALOG_SERVERINFO         '1 1 1'
+ COLOR_DIALOG_CVARS              '1 0 0'
++COLOR_DIALOG_SCREENSHOTVIEWER   '1 1 1'
+ COLOR_DIALOG_HUDCONFIRM         '1 0 0'
+ // item: input box
+ //   uses "inputbox" images
+ COLOR_INPUTBOX_N                '1 1 1'
+ COLOR_INPUTBOX_F                '1 1 1'
+ MARGIN_INPUTBOX_CHARS           1
+ // item: key grabber
+ COLOR_KEYGRABBER_TITLES         '1 1 1'
+ ALPHA_KEYGRABBER_TITLES         1
+ COLOR_KEYGRABBER_KEYS           '1 1 1'
+ ALPHA_KEYGRABBER_KEYS           0.7
+ // item: player color button
+ //   uses "colorbutton" images
+ //   uses "color" images
+ // item: player name editor
+ //   uses "charmap" images
+ //   uses "charmapbutton" images
+ // item: radio button
+ //   uses "radiobutton" images
+ COLOR_RADIOBUTTON_N             '1 1 1'
+ COLOR_RADIOBUTTON_C             '1 1 1'
+ COLOR_RADIOBUTTON_F             '1 1 1'
+ COLOR_RADIOBUTTON_D             '1 1 1'
+ // item: scrollbar
+ //   uses "scrollbar" images
+ COLOR_SCROLLBAR_N               '1 1 1'
+ COLOR_SCROLLBAR_C               '0.5 0.75 1'
+ COLOR_SCROLLBAR_F               '0.5 0.75 1'
+ COLOR_SCROLLBAR_S               '0.25 0.25 0.25'
+ WIDTH_SCROLLBAR                 16
+ // item: slider
+ //   uses "slider" images
+ COLOR_SLIDER_N                  '1 1 1'
+ COLOR_SLIDER_C                  '0.5 0.75 1'
+ COLOR_SLIDER_F                  '0.5 0.75 1'
+ COLOR_SLIDER_D                  '1 1 1'
+ COLOR_SLIDER_S                  '0.25 0.25 0.25'
+ WIDTH_SLIDERTEXT                0.333333333333
+ TOLERANCE_SLIDER                '0.2 2 0'
@@@ -29,10 -30,13 +30,14 @@@ COLOR_DIALOG_USERBIND           '1 1 1
  COLOR_DIALOG_SINGLEPLAYER       '1 1 1'
  COLOR_DIALOG_CREDITS            '1 1 1'
  COLOR_DIALOG_WEAPONS            '1 1 1'
- COLOR_DIALOG_WAYPOINTS          '1 1 1'
+ COLOR_DIALOG_VIEW               '1 1 1'
+ COLOR_DIALOG_MODEL              '1 1 1'
+ COLOR_DIALOG_CROSSHAIR          '1 1 1'
+ COLOR_DIALOG_HUD                '1 1 1'
  COLOR_DIALOG_SERVERINFO         '1 1 1'
  COLOR_DIALOG_CVARS              '1 0 0'
 +COLOR_DIALOG_SCREENSHOTVIEWER   '1 1 1'
+ COLOR_DIALOG_HUDCONFIRM         '1 0 0'
  
  // nexposee positions of windows (they are the scale transformation
  // centers, NOT the actual positions of the windows!)
  #include "xonotic/dialog_singleplayer_winner.c"
  #include "xonotic/dialog_credits.c"
  #include "xonotic/credits.c"
+ #include "xonotic/dialog_multiplayer_playersetup_crosshair.c"
+ #include "xonotic/dialog_multiplayer_playersetup_hud.c"
+ #include "xonotic/dialog_multiplayer_playersetup_hudconfirm.c"
+ #include "xonotic/dialog_multiplayer_playersetup_model.c"
+ #include "xonotic/dialog_multiplayer_playersetup_view.c"
  #include "xonotic/dialog_multiplayer_playersetup_weapons.c"
  #include "xonotic/weaponslist.c"
- #include "xonotic/dialog_multiplayer_playersetup_waypoint.c"
  #include "xonotic/dialog_multiplayer_demo.c"
  #include "xonotic/demolist.c"
 +#include "xonotic/screenshotimage.c"
 +#include "xonotic/dialog_multiplayer_screenshot.c"
 +#include "xonotic/dialog_multiplayer_screenshot_screenshotviewer.c"
 +#include "xonotic/screenshotlist.c"
  #include "xonotic/colorpicker.c"
  #include "xonotic/colorpicker_string.c"
  #include "xonotic/cvarlist.c"
@@@ -41,11 -24,8 +41,12 @@@ void Image_configureImage(entity me, st
  }
  void Image_draw(entity me)
  {
 +      if(me.imgSize_x > 1 || me.imgSize_y > 1)
 +              draw_SetClip();
        draw_Picture(me.imgOrigin, me.src, me.imgSize, me.color, 1);
 +      if(me.imgSize_x > 1 || me.imgSize_y > 1)
 +              draw_ClearClip();
+       SUPER(Image).draw(me);
  }
  void Image_updateAspect(entity me)
  {
@@@ -63,10 -64,13 +64,14 @@@ SKINBEGI
        SKINVECTOR(COLOR_DIALOG_SINGLEPLAYER, '1 1 0.7');
        SKINVECTOR(COLOR_DIALOG_CREDITS, '0.7 0.7 1');
        SKINVECTOR(COLOR_DIALOG_WEAPONS, '1 0.7 0.7');
-       SKINVECTOR(COLOR_DIALOG_WAYPOINTS, '0.7 0.7 1');
+       SKINVECTOR(COLOR_DIALOG_VIEW, '1 0.7 0.7');
+       SKINVECTOR(COLOR_DIALOG_MODEL, '1 0.7 0.7');
+       SKINVECTOR(COLOR_DIALOG_CROSSHAIR, '1 0.7 0.7');
+       SKINVECTOR(COLOR_DIALOG_HUD, '1 0.7 0.7');
        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');
+       SKINVECTOR(COLOR_DIALOG_HUDCONFIRM, '1 0 0');
  
        // nexposee positions of windows (they are the scale transformation
        // centers, NOT the actual positions of the windows!)
@@@ -15,12 -15,11 +15,11 @@@ void XonoticMultiplayerDialog_fill(enti
        entity mc, e;
        mc = makeXonoticTabController(me.rows - 2);
        me.TR(me);
-               me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Servers"),  makeXonoticServerListTab()));
-               me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Create"),  makeXonoticServerCreateTab()));
-               me.TD(me, 1, 1, mc.makeTabButton(mc, _("Demos"),   makeXonoticDemoBrowserTab()));
-               me.TD(me, 1, 1, mc.makeTabButton(mc, _("Screenshots"),   makeXonoticScreenshotBrowserTab()));
-               me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Player Setup"),  makeXonoticPlayerSettingsTab()));
+               me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Servers"), makeXonoticServerListTab()));
+               me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Create"), makeXonoticServerCreateTab()));
+               me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Demos"), makeXonoticDemoBrowserTab()));
++              me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Screenshots"), makeXonoticScreenshotBrowserTab()));
+               me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Player Setup"), makeXonoticPlayerSettingsTab()));
 -
        me.TR(me);
        me.TR(me);
                me.TD(me, me.rows - 2, me.columns, mc);
@@@ -9,10 -9,13 +9,14 @@@ CLASS(MainWindow) EXTENDS(ModalControll
        ATTRIB(MainWindow, mapInfoDialog, entity, NULL)
        ATTRIB(MainWindow, userbindEditDialog, entity, NULL)
        ATTRIB(MainWindow, winnerDialog, entity, NULL)
-       ATTRIB(MainWindow, waypointDialog, entity, NULL)
        ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
        ATTRIB(MainWindow, cvarsDialog, entity, NULL)
 +      ATTRIB(MainWindow, screenshotViewerDialog, entity, NULL)
+       ATTRIB(MainWindow, viewDialog, entity, NULL)
+       ATTRIB(MainWindow, modelDialog, entity, NULL)
+       ATTRIB(MainWindow, crosshairDialog, entity, NULL)
+       ATTRIB(MainWindow, hudDialog, entity, NULL)
+       ATTRIB(MainWindow, hudconfirmDialog, entity, NULL)
        ATTRIB(MainWindow, mainNexposee, entity, NULL)
        ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
        ATTRIB(MainWindow, dialogToShow, entity, NULL)
@@@ -118,11 -120,39 +121,43 @@@ void MainWindow_configureMainWindow(ent
        i = spawnXonoticHUDPhysicsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 +      
 +      me.screenshotViewerDialog = i = spawnXonoticScreenshotViewerDialog();
 +      i.configureDialog(i);
 +      me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
  
+       i = spawnXonoticHUDCenterprintDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       
+       // dialogs used by settings
+       me.userbindEditDialog = i = spawnXonoticUserbindEditDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       me.cvarsDialog = i = spawnXonoticCvarsDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       
+       // dialog used by singleplayer
+       me.winnerDialog = i = spawnXonoticWinnerDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       
+       // dialog used by multiplayer/join
+       me.serverInfoDialog = i = spawnXonoticServerInfoDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       
+       // dialogs used by multiplayer/create
+       me.mapInfoDialog = i = spawnXonoticMapInfoDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
        me.advancedDialog = i = spawnXonoticAdvancedDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);