mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Replaced lines in settings with primitives
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 130 B |
Binary file not shown.
Before Width: | Height: | Size: 90 B |
Binary file not shown.
Before Width: | Height: | Size: 91 B |
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* MiscWidgets.cpp, part of VCMI engine
|
* GraphicalPrimitiveCanvas.cpp, part of VCMI engine
|
||||||
*
|
*
|
||||||
* Authors: listed in file AUTHORS in main folder
|
* Authors: listed in file AUTHORS in main folder
|
||||||
*
|
*
|
||||||
|
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
class GraphicalPrimitiveCanvas : public CIntObject
|
class GraphicalPrimitiveCanvas : public CIntObject
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
enum class PrimitiveType
|
enum class PrimitiveType
|
||||||
{
|
{
|
||||||
LINE,
|
LINE,
|
||||||
@@ -21,7 +20,6 @@ public:
|
|||||||
FILLED_BOX
|
FILLED_BOX
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
|
||||||
struct PrimitiveEntry
|
struct PrimitiveEntry
|
||||||
{
|
{
|
||||||
ColorRGBA color;
|
ColorRGBA color;
|
||||||
|
@@ -26,7 +26,15 @@
|
|||||||
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : 0}, "color" : [ 255, 255, 255, 64 ] },
|
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : -1, "y" : 0}, "color" : [ 255, 255, 255, 64 ] },
|
||||||
{ "type" : "line", "a" : { "x" : 0, "y" : 1}, "b" : { "x" : -1, "y" : 1}, "color" : [ 0, 0, 0, 64 ] },
|
{ "type" : "line", "a" : { "x" : 0, "y" : 1}, "b" : { "x" : -1, "y" : 1}, "color" : [ 0, 0, 0, 64 ] },
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
|
||||||
|
"verticalLine" : {
|
||||||
|
"type": "graphicalPrimitive",
|
||||||
|
"primitives" : [
|
||||||
|
{ "type" : "line", "a" : { "x" : 0, "y" : 0}, "b" : { "x" : 0, "y" : -1}, "color" : [ 255, 255, 255, 64 ] },
|
||||||
|
{ "type" : "line", "a" : { "x" : 1, "y" : 0}, "b" : { "x" : 1, "y" : -1}, "color" : [ 0, 0, 0, 64 ] },
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
"boxWithBackground" : {
|
"boxWithBackground" : {
|
||||||
"type": "graphicalPrimitive",
|
"type": "graphicalPrimitive",
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
{
|
{
|
||||||
"library" : "config/widgets/settings/library.json",
|
"library" : [
|
||||||
|
"config/widgets/settings/library.json",
|
||||||
|
"config/widgets/commonPrimitives.json",
|
||||||
|
],
|
||||||
|
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "lineLabelsEnd",
|
"name": "lineLabelsEnd",
|
||||||
"type": "texture",
|
"type": "horizontalLine",
|
||||||
"image": "settingsWindow/lineHorizontal",
|
|
||||||
"rect": { "x" : 5, "y" : 229, "w": 365, "h": 3}
|
"rect": { "x" : 5, "y" : 229, "w": 365, "h": 3}
|
||||||
},
|
},
|
||||||
/////////////////////////////////////// Left section - Hero Speed and Map Scrolling
|
/////////////////////////////////////// Left section - Hero Speed and Map Scrolling
|
||||||
|
@@ -1,18 +1,19 @@
|
|||||||
{
|
{
|
||||||
"library" : "config/widgets/settings/library.json",
|
"library" : [
|
||||||
|
"config/widgets/settings/library.json",
|
||||||
|
"config/widgets/commonPrimitives.json",
|
||||||
|
],
|
||||||
|
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "lineCreatureInfo",
|
"name": "lineCreatureInfo",
|
||||||
"type": "texture",
|
"type": "horizontalLine",
|
||||||
"image": "settingsWindow/lineHorizontal",
|
|
||||||
"rect": { "x" : 5, "y" : 289, "w": 365, "h": 3}
|
"rect": { "x" : 5, "y" : 289, "w": 365, "h": 3}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lineAnimationSpeed",
|
"name": "lineAnimationSpeed",
|
||||||
"type": "texture",
|
"type": "horizontalLine",
|
||||||
"image": "settingsWindow/lineHorizontal",
|
|
||||||
"rect": { "x" : 5, "y" : 349, "w": 365, "h": 3}
|
"rect": { "x" : 5, "y" : 349, "w": 365, "h": 3}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
{
|
{
|
||||||
"library" : "config/widgets/settings/library.json",
|
"library" : [
|
||||||
|
"config/widgets/settings/library.json",
|
||||||
|
"config/widgets/commonPrimitives.json",
|
||||||
|
],
|
||||||
|
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "lineLabelsEnd",
|
"name": "lineLabelsEnd",
|
||||||
"type": "texture",
|
"type": "horizontalLine",
|
||||||
"image": "settingsWindow/lineHorizontal",
|
|
||||||
"rect": { "x" : 5, "y" : 349, "w": 365, "h": 3}
|
"rect": { "x" : 5, "y" : 349, "w": 365, "h": 3}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -35,8 +35,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"checkboxFake" : {
|
"checkboxFake" : {
|
||||||
"type": "picture",
|
"type": "boxWithBackground",
|
||||||
"image": "settingsWindow/checkBoxEmpty"
|
"rect": { "x" : 0, "y" : 0, "w": 32, "h": 24}
|
||||||
|
|
||||||
},
|
},
|
||||||
"audioSlider" : {
|
"audioSlider" : {
|
||||||
"type": "slider",
|
"type": "slider",
|
||||||
|
@@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
"library" : [
|
||||||
|
"config/widgets/commonPrimitives.json"
|
||||||
|
],
|
||||||
|
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -9,14 +13,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lineTabs",
|
"name": "lineTabs",
|
||||||
"type": "texture",
|
"type": "horizontalLine",
|
||||||
"image": "settingsWindow/lineHorizontal",
|
|
||||||
"rect": { "x" : 10, "y" : 45, "w": 580, "h": 3}
|
"rect": { "x" : 10, "y" : 45, "w": 580, "h": 3}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lineColumns",
|
"name": "lineColumns",
|
||||||
"type": "texture",
|
"type": "verticalLine",
|
||||||
"image": "settingsWindow/lineVertical",
|
|
||||||
"rect": { "x" : 370, "y" : 50, "w": 3, "h": 420}
|
"rect": { "x" : 370, "y" : 50, "w": 3, "h": 420}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -91,8 +93,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "lineButtons",
|
"name": "lineButtons",
|
||||||
"type": "texture",
|
"type": "horizontalLine",
|
||||||
"image": "settingsWindow/lineHorizontal",
|
|
||||||
"rect": { "x" : 375, "y" : 289, "w": 220, "h": 3}
|
"rect": { "x" : 375, "y" : 289, "w": 220, "h": 3}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -33,10 +33,8 @@
|
|||||||
"offset": {"x": 0, "y": 0}
|
"offset": {"x": 0, "y": 0}
|
||||||
},
|
},
|
||||||
"timeInputBackground" : {
|
"timeInputBackground" : {
|
||||||
"type": "transparentFilledRectangle",
|
"type": "boxWithBackground",
|
||||||
"rect": {"x": 0, "y": 0, "w": 86, "h": 23},
|
"rect": {"x": 0, "y": 0, "w": 86, "h": 23}
|
||||||
"color": [0, 0, 0, 128],
|
|
||||||
"colorLine": [64, 80, 128, 128]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user