X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_multiplayer_create_mapinfo.c;h=9baf36127dfe56648994b79735a84a5c124a06a3;hb=2d826438b2ebd36c678772891253184fc7d483ff;hp=e242b6667546e5576444ccee6fa668908693be3f;hpb=fd2b1a8ba60990ceca63c494e1fc6094c3b7f6b2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c index e242b6667..9baf36127 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c @@ -5,7 +5,7 @@ CLASS(XonoticMapInfoDialog) EXTENDS(XonoticDialog) ATTRIB(XonoticMapInfoDialog, title, string, _("Map Information")) ATTRIB(XonoticMapInfoDialog, color, vector, SKINCOLOR_DIALOG_MAPINFO) ATTRIB(XonoticMapInfoDialog, intendedWidth, float, 1.0) - ATTRIB(XonoticMapInfoDialog, rows, float, 12) + ATTRIB(XonoticMapInfoDialog, rows, float, 11) ATTRIB(XonoticMapInfoDialog, columns, float, 10) ATTRIB(XonoticMapInfoDialog, previewImage, entity, NULL) @@ -22,7 +22,6 @@ CLASS(XonoticMapInfoDialog) EXTENDS(XonoticDialog) ATTRIB(XonoticMapInfoDialog, currentMapAuthor, string, string_null) ATTRIB(XonoticMapInfoDialog, currentMapDescription, string, string_null) ATTRIB(XonoticMapInfoDialog, currentMapPreviewImage, string, string_null) - ATTRIB(XonoticMapInfoDialog, currentMapFeaturesText, string, string_null) ENDCLASS(XonoticMapInfoDialog) #endif @@ -40,21 +39,21 @@ void XonoticMapInfoDialog_loadMapInfo(entity me, float i, entity mlb) strunzone(me.currentMapAuthor); strunzone(me.currentMapDescription); strunzone(me.currentMapPreviewImage); - strunzone(me.currentMapFeaturesText); } me.currentMapBSPName = strzone(MapInfo_Map_bspname); - me.currentMapTitle = strzone(MapInfo_Map_title); - me.currentMapAuthor = strzone(MapInfo_Map_author); + me.currentMapTitle = strzone(strdecolorize(MapInfo_Map_title)); + me.currentMapAuthor = strzone(strdecolorize(MapInfo_Map_author)); me.currentMapDescription = strzone(MapInfo_Map_description); - me.currentMapFeaturesText = strzone((MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS) ? _("Full item placement") : _("MinstaGib only")); me.currentMapPreviewImage = strzone(strcat("/maps/", MapInfo_Map_bspname)); me.frame.setText(me.frame, me.currentMapBSPName); me.titleLabel.setText(me.titleLabel, me.currentMapTitle); me.authorLabel.setText(me.authorLabel, me.currentMapAuthor); me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription); - me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText); - me.previewImage.src = me.currentMapPreviewImage; + if(draw_PictureSize(me.currentMapPreviewImage) == '0 0 0') + me.previewImage.src = "nopreview_map"; + else + me.previewImage.src = me.currentMapPreviewImage; for(i = 0; i < GameType_GetCount(); ++i) { @@ -86,11 +85,6 @@ void XonoticMapInfoDialog_fill(entity me) e.colorL = SKINCOLOR_MAPLIST_AUTHOR; e.allowCut = 1; me.authorLabel = e; - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Features:"))); - me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, "")); - e.allowCut = 1; - me.featuresLabel = e; me.TR(me); me.TD(me, 1, w, e = makeXonoticTextLabel(0, _("Game types:"))); @@ -103,7 +97,7 @@ void XonoticMapInfoDialog_fill(entity me) me.TR(me); me.TDempty(me, 0.2); } - me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, GameType_GetName(i))); + me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, MapInfo_Type_ToText(GameType_GetID(i)))); me.(typeLabels[i]) = e; }