mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Added descriptions for new buttons in pregame menu
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
"vcmi.lobby.noPreview" : "no preview",
|
||||
"vcmi.lobby.noUnderground" : "no underground",
|
||||
"vcmi.lobby.sortDate" : "Sorts maps by change date",
|
||||
"vcmi.lobby.backToLobby" : "Return to lobby",
|
||||
|
||||
"vcmi.lobby.login.title" : "VCMI Online Lobby",
|
||||
"vcmi.lobby.login.username" : "Username:",
|
||||
|
@@ -45,10 +45,10 @@
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/CThreadHelper.h"
|
||||
#include "../../lib/MetaString.h"
|
||||
#include "../../lib/filesystem/Filesystem.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
#include "../../lib/mapping/CMapHeader.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/mapping/CMapInfo.h"
|
||||
|
||||
ISelectionScreenInfo::ISelectionScreenInfo(ESelectionScreen ScreenType)
|
||||
: screenType(ScreenType)
|
||||
@@ -138,8 +138,11 @@ InfoCard::InfoCard()
|
||||
playerListBg = std::make_shared<CPicture>(ImagePath::builtin("CHATPLUG.bmp"), 16, 276);
|
||||
chat = std::make_shared<CChatBox>(Rect(18, 126, 335, 143));
|
||||
|
||||
buttonInvitePlayers = std::make_shared<CButton>(Point(30, 360), AnimationPath::builtin("GSPBUT2.DEF"), CGI->generaltexth->zelp[105], [=](){ CSH->getGlobalLobby().activateRoomInviteInterface(); } );
|
||||
buttonOpenGlobalLobby = std::make_shared<CButton>(Point(200, 360), AnimationPath::builtin("GSPBUT2.DEF"), CGI->generaltexth->zelp[105], [=](){ CSH->getGlobalLobby().activateInterface(); });
|
||||
buttonInvitePlayers = std::make_shared<CButton>(Point(20, 365), AnimationPath::builtin("pregameInvitePlayers"), CGI->generaltexth->zelp[105], [=](){ CSH->getGlobalLobby().activateRoomInviteInterface(); } );
|
||||
buttonOpenGlobalLobby = std::make_shared<CButton>(Point(188, 365), AnimationPath::builtin("pregameReturnToLobby"), CGI->generaltexth->zelp[105], [=](){ CSH->getGlobalLobby().activateInterface(); });
|
||||
|
||||
buttonInvitePlayers->setTextOverlay (MetaString::createFromTextID("vcmi.lobby.invite.header").toString(), EFonts::FONT_SMALL, Colors::WHITE);
|
||||
buttonOpenGlobalLobby->setTextOverlay(MetaString::createFromTextID("vcmi.lobby.backToLobby").toString(), EFonts::FONT_SMALL, Colors::WHITE);
|
||||
|
||||
if(SEL->screenType == ESelectionScreen::campaignList)
|
||||
{
|
||||
@@ -191,6 +194,8 @@ InfoCard::InfoCard()
|
||||
disableLabelRedraws();
|
||||
}
|
||||
setChat(false);
|
||||
if (CSH->inLobbyRoom())
|
||||
setChat(true); // FIXME: less ugly version?
|
||||
}
|
||||
|
||||
void InfoCard::disableLabelRedraws()
|
||||
|
118
config/widgets/buttons/pregameInvitePlayers.json
Normal file
118
config/widgets/buttons/pregameInvitePlayers.json
Normal file
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"normal" : {
|
||||
"width": 157,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 0, "y": 0, "w": 157, "h": 20}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 157, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : 0, "y" : -1}, "color" : [ 255, 255, 255, 64 ] },
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : 0}, "color" : [ 255, 255, 255, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 80 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 160 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : -2}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
{ "type" : "line", "a" : { "x" : -2, "y" : 1}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : -1}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
{ "type" : "line", "a" : { "x" : -1, "y" : 0}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"pressed" : {
|
||||
"width": 157,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 1, "y": 1, "w": 156, "h": 19}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 157, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 3, "y" : 3}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 160 ] },
|
||||
|
||||
{ "type" : "rectangle", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 48 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 96 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : 2, "y" : -3}, "color" : [ 255, 255, 255, 64 ] },
|
||||
{ "type" : "line", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : 2}, "color" : [ 255, 255, 255, 128 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"blocked" : {
|
||||
"width": 157,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 0, "y": 0, "w": 157, "h": 20}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 157, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : 0, "y" : -1}, "color" : [ 255, 255, 255, 64 ] },
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : 0}, "color" : [ 255, 255, 255, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 80 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 160 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : -2}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
{ "type" : "line", "a" : { "x" : -2, "y" : 1}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : -1}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
{ "type" : "line", "a" : { "x" : -1, "y" : 0}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"highlighted" : {
|
||||
"width": 157,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 0, "y": 0, "w": 157, "h": 20}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 157, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 128 ] },
|
||||
|
||||
{ "type" : "rectangle", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 255, 255, 255, 255 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : -2}, "b" : { "x" : -2, "y" : -2}, "color" : [ 255, 255, 255, 255 ] },
|
||||
{ "type" : "line", "a" : { "x" : -2, "y" : 1}, "b" : { "x" : -2, "y" : -2}, "color" : [ 255, 255, 255, 255 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 160 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 160 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
118
config/widgets/buttons/pregameReturnToLobby.json
Normal file
118
config/widgets/buttons/pregameReturnToLobby.json
Normal file
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"normal" : {
|
||||
"width": 163,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 0, "y": 0, "w": 163, "h": 20}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 163, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : 0, "y" : -1}, "color" : [ 255, 255, 255, 64 ] },
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : 0}, "color" : [ 255, 255, 255, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 80 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 160 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : -2}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
{ "type" : "line", "a" : { "x" : -2, "y" : 1}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : -1}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
{ "type" : "line", "a" : { "x" : -1, "y" : 0}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"pressed" : {
|
||||
"width": 163,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 1, "y": 1, "w": 162, "h": 19}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 163, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 3, "y" : 3}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 160 ] },
|
||||
|
||||
{ "type" : "rectangle", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 48 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 96 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : 2, "y" : -3}, "color" : [ 255, 255, 255, 64 ] },
|
||||
{ "type" : "line", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : 2}, "color" : [ 255, 255, 255, 128 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"blocked" : {
|
||||
"width": 163,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 0, "y": 0, "w": 163, "h": 20}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 163, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : 0, "y" : -1}, "color" : [ 255, 255, 255, 64 ] },
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : 0}, "color" : [ 255, 255, 255, 128 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 80 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 160 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : -2}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
{ "type" : "line", "a" : { "x" : -2, "y" : 1}, "b" : { "x" : -2, "y" : -2}, "color" : [ 0, 0, 0, 192 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 0, "y" : -1}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
{ "type" : "line", "a" : { "x" : -1, "y" : 0}, "b" : { "x" : -1, "y" : -1}, "color" : [ 0, 0, 0, 255 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"highlighted" : {
|
||||
"width": 163,
|
||||
"height": 20,
|
||||
"items" : [
|
||||
{
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"color" : "blue",
|
||||
"rect": {"x": 0, "y": 0, "w": 163, "h": 20}
|
||||
},
|
||||
{
|
||||
"type": "graphicalPrimitive",
|
||||
"rect": {"x": 0, "y": 0, "w": 163, "h": 20},
|
||||
"primitives" : [
|
||||
{ "type" : "filledBox", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 0, 0, 0, 128 ] },
|
||||
|
||||
{ "type" : "rectangle", "a" : { "x" : 2, "y" : 2}, "b" : { "x" : -3, "y" : -3}, "color" : [ 255, 255, 255, 255 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : -2}, "b" : { "x" : -2, "y" : -2}, "color" : [ 255, 255, 255, 255 ] },
|
||||
{ "type" : "line", "a" : { "x" : -2, "y" : 1}, "b" : { "x" : -2, "y" : -2}, "color" : [ 255, 255, 255, 255 ] },
|
||||
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : 1, "y" : -2}, "color" : [ 255, 255, 255, 160 ] },
|
||||
{ "type" : "line", "a" : { "x" : 1, "y" : 1}, "b" : { "x" : -2, "y" : 1}, "color" : [ 255, 255, 255, 160 ] },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user