mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Added lines to window to separate UI elements into groups
This commit is contained in:
parent
273a06a878
commit
c011a5a9cf
Binary file not shown.
Before Width: | Height: | Size: 787 B After Width: | Height: | Size: 173 B |
Binary file not shown.
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 167 B |
BIN
Mods/vcmi/Data/settingsWindow/lineHorizontal.png
Normal file
BIN
Mods/vcmi/Data/settingsWindow/lineHorizontal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 B |
BIN
Mods/vcmi/Data/settingsWindow/lineVertical.png
Normal file
BIN
Mods/vcmi/Data/settingsWindow/lineVertical.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 91 B |
@ -9,25 +9,24 @@
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
|
||||
#include "SettingsMainWindow.h"
|
||||
|
||||
#include "GeneralOptionsTab.h"
|
||||
#include "AdventureOptionsTab.h"
|
||||
#include "BattleOptionsTab.h"
|
||||
#include "GeneralOptionsTab.h"
|
||||
#include "OtherOptionsTab.h"
|
||||
|
||||
#include "filesystem/ResourceID.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "CGeneralTextHandler.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "CServerHandler.h"
|
||||
#include "filesystem/ResourceID.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "lobby/CSavingScreen.h"
|
||||
#include "widgets/Buttons.h"
|
||||
#include "widgets/Images.h"
|
||||
#include "widgets/ObjectLists.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "CServerHandler.h"
|
||||
|
||||
#include "windows/CMessage.h"
|
||||
|
||||
SettingsMainWindow::SettingsMainWindow(BattleInterface * parentBattleUi) : InterfaceObjectConfigurable()
|
||||
{
|
||||
@ -43,7 +42,7 @@ SettingsMainWindow::SettingsMainWindow(BattleInterface * parentBattleUi) : Inter
|
||||
addCallback("closeWindow", [this](int) { backButtonCallback(); });
|
||||
build(config);
|
||||
|
||||
std::shared_ptr<CPicture> background = widget<CPicture>("background");
|
||||
std::shared_ptr<CIntObject> background = widget<CIntObject>("background");
|
||||
pos.w = background->pos.w;
|
||||
pos.h = background->pos.h;
|
||||
pos = center();
|
||||
@ -147,4 +146,14 @@ void SettingsMainWindow::closeAndPushEvent(EUserEvent code)
|
||||
{
|
||||
close();
|
||||
GH.pushUserEvent(code);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsMainWindow::showAll(SDL_Surface *to)
|
||||
{
|
||||
auto color = LOCPLINT ? LOCPLINT->playerID : PlayerColor(1);
|
||||
if(settings["session"]["spectate"].Bool())
|
||||
color = PlayerColor(1); // TODO: Spectator shouldn't need special code for UI colors
|
||||
|
||||
CIntObject::showAll(to);
|
||||
CMessage::drawBorder(color, to, pos.w+28, pos.h+29, pos.x-14, pos.y-15);
|
||||
}
|
||||
|
@ -40,5 +40,7 @@ private:
|
||||
void mainMenuButtonCallback();
|
||||
public:
|
||||
SettingsMainWindow(BattleInterface * parentBattleInterface = nullptr);
|
||||
|
||||
void showAll(SDL_Surface * to);
|
||||
};
|
||||
|
||||
|
@ -1,22 +1,29 @@
|
||||
{
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"name": "lineMovementEnd",
|
||||
"type": "texture",
|
||||
"image": "settingsWindow/lineHorizontal",
|
||||
"rect": { "x" : 5, "y" : 240, "w": 365, "h": 3}
|
||||
},
|
||||
{
|
||||
"name": "frameHeroMovement",
|
||||
"type": "picture",
|
||||
"image": "settingsWindow/frameMovement",
|
||||
"position": {"x": 6, "y": 47 }
|
||||
}, {
|
||||
"position": {"x": 6, "y": 57 }
|
||||
},
|
||||
{
|
||||
"name": "frameEnemyMovement",
|
||||
"type": "picture",
|
||||
"image": "settingsWindow/frameMovement",
|
||||
"position": {"x": 6, "y": 107 }
|
||||
"position": {"x": 6, "y": 117 }
|
||||
},
|
||||
{
|
||||
"name": "frameMapMovement",
|
||||
"type": "picture",
|
||||
"image": "settingsWindow/frameMovement",
|
||||
"position": {"x": 6, "y": 167 }
|
||||
"position": {"x": 6, "y": 177 }
|
||||
},
|
||||
|
||||
{
|
||||
@ -28,15 +35,15 @@
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"position": {"x": 100, "y": 60},
|
||||
"position": {"x": 100, "y": 70},
|
||||
"text": "core.genrltxt.569"
|
||||
},
|
||||
{
|
||||
"position": {"x": 100, "y": 120},
|
||||
"position": {"x": 100, "y": 130},
|
||||
"text": "core.genrltxt.570"
|
||||
},
|
||||
{
|
||||
"position": {"x": 100, "y": 180},
|
||||
"position": {"x": 100, "y": 190},
|
||||
"text": "core.genrltxt.571"
|
||||
}
|
||||
]
|
||||
@ -45,7 +52,7 @@
|
||||
{
|
||||
"name": "heroMovementSpeedPicker",
|
||||
"type": "toggleGroup",
|
||||
"position": {"x": 10, "y": 70},
|
||||
"position": {"x": 10, "y": 80},
|
||||
"items":
|
||||
[
|
||||
{
|
||||
@ -94,7 +101,7 @@
|
||||
{
|
||||
"name": "enemyMovementSpeedPicker",
|
||||
"type": "toggleGroup",
|
||||
"position": {"x": 10, "y": 130},
|
||||
"position": {"x": 10, "y": 140},
|
||||
"items":
|
||||
[
|
||||
{
|
||||
@ -135,7 +142,7 @@
|
||||
{
|
||||
"name": "mapScrollSpeedPicker",
|
||||
"type": "toggleGroup",
|
||||
"position": {"x": 10, "y": 190},
|
||||
"position": {"x": 10, "y": 200},
|
||||
"items":
|
||||
[
|
||||
{
|
||||
|
@ -1,6 +1,25 @@
|
||||
{
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"name": "lineCreatureInfo",
|
||||
"type": "texture",
|
||||
"image": "settingsWindow/lineHorizontal",
|
||||
"rect": { "x" : 5, "y" : 205, "w": 365, "h": 3}
|
||||
},
|
||||
{
|
||||
"name": "lineAnimationSpeed",
|
||||
"type": "texture",
|
||||
"image": "settingsWindow/lineHorizontal",
|
||||
"rect": { "x" : 5, "y" : 295, "w": 365, "h": 3}
|
||||
},
|
||||
{
|
||||
"name": "lineQueueSize",
|
||||
"type": "texture",
|
||||
"image": "settingsWindow/lineHorizontal",
|
||||
"rect": { "x" : 5, "y" : 365, "w": 365, "h": 3}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "animationSpeedLabel",
|
||||
"type": "label",
|
||||
|
@ -3,10 +3,23 @@
|
||||
[
|
||||
{
|
||||
"name": "background",
|
||||
"type": "picture",
|
||||
"image": "vcmiSettingsWindow",
|
||||
"position": {"x": 0, "y": 0}
|
||||
"type": "texture",
|
||||
"image": "DiBoxBck",
|
||||
"rect": {"w": 600, "h": 480}
|
||||
},
|
||||
{
|
||||
"name": "lineTabs",
|
||||
"type": "texture",
|
||||
"image": "settingsWindow/lineHorizontal",
|
||||
"rect": { "x" : 10, "y" : 45, "w": 580, "h": 3}
|
||||
},
|
||||
{
|
||||
"name": "lineColumns",
|
||||
"type": "texture",
|
||||
"image": "settingsWindow/lineVertical",
|
||||
"rect": { "x" : 370, "y" : 50, "w": 3, "h": 420}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"name": "settingsTabs",
|
||||
|
Loading…
Reference in New Issue
Block a user