After Width: | Height: | Size: 7.5 KiB |
@ -0,0 +1,9 @@
|
||||
glyph height: 14
|
||||
glyph spacing: [0, 1]
|
||||
top margin: 0
|
||||
image: sans-11px.png
|
||||
image glyph size: [16, 16]
|
||||
first glyph: 0
|
||||
|
||||
glyph widths:
|
||||
32: 4
|
@ -0,0 +1,135 @@
|
||||
default font: sans-11px
|
||||
default font color: [0, 115, 234, 255]
|
||||
|
||||
buttons:
|
||||
default:
|
||||
default size: [96, 22]
|
||||
font color: [0, 115, 234, 255]
|
||||
|
||||
bordered image:
|
||||
source: lightness/button-up.png
|
||||
left border: [0,2,2,6]
|
||||
right border: [22,2,2,6]
|
||||
top border: [2,0,20,2]
|
||||
bottom border: [2,8,20,2]
|
||||
top left corner: [0,0,2,2]
|
||||
top right corner: [22,0,2,2]
|
||||
bottom left corner: [0,8,2,2]
|
||||
bottom right corner: [22,8,2,2]
|
||||
center: [2,2,20,6]
|
||||
|
||||
hover state:
|
||||
font color: [255, 255, 255, 255]
|
||||
bordered image:
|
||||
source: lightness/button-hover.png
|
||||
left border: [0,2,2,6]
|
||||
right border: [22,2,2,6]
|
||||
top border: [2,0,20,2]
|
||||
bottom border: [2,8,20,2]
|
||||
top left corner: [0,0,2,2]
|
||||
top right corner: [22,0,2,2]
|
||||
bottom left corner: [0,8,2,2]
|
||||
bottom right corner: [22,8,2,2]
|
||||
center: [2,2,20,6]
|
||||
|
||||
down state:
|
||||
font color: [255, 0, 132, 255]
|
||||
bordered image:
|
||||
source: lightness/button-down.png
|
||||
left border: [0,2,2,6]
|
||||
right border: [22,2,2,6]
|
||||
top border: [2,0,20,2]
|
||||
bottom border: [2,8,20,2]
|
||||
top left corner: [0,0,2,2]
|
||||
top right corner: [22,0,2,2]
|
||||
bottom left corner: [0,8,2,2]
|
||||
bottom right corner: [22,8,2,2]
|
||||
center: [2,2,20,6]
|
||||
panels:
|
||||
default:
|
||||
# the default panel is empty
|
||||
|
||||
mainMenuBackground:
|
||||
image: lightness/background.png
|
||||
antialised: true
|
||||
|
||||
roundedGridPanel:
|
||||
bordered image:
|
||||
source: lightness/menupanel.png
|
||||
left border: [0,2,2,6]
|
||||
right border: [22,2,2,6]
|
||||
top border: [2,0,20,2]
|
||||
bottom border: [2,8,20,2]
|
||||
top left corner: [0,0,2,2]
|
||||
top right corner: [22,0,2,2]
|
||||
bottom left corner: [0,8,2,2]
|
||||
bottom right corner: [22,8,2,2]
|
||||
center: [2,2,20,6]
|
||||
|
||||
flatPanel:
|
||||
bordered image:
|
||||
source: lightness/panel.png
|
||||
left border: [0,2,2,6]
|
||||
right border: [22,2,2,6]
|
||||
top border: [2,0,20,2]
|
||||
bottom border: [2,8,20,2]
|
||||
top left corner: [0,0,2,2]
|
||||
top right corner: [22,0,2,2]
|
||||
bottom left corner: [0,8,2,2]
|
||||
bottom right corner: [22,8,2,2]
|
||||
center: [2,2,20,6]
|
||||
|
||||
labels:
|
||||
default:
|
||||
font color: [0, 115, 234, 255]
|
||||
|
||||
windows:
|
||||
default:
|
||||
font color: [80, 80, 80, 255]
|
||||
head:
|
||||
text align: left
|
||||
margin: 8
|
||||
height: 26
|
||||
bordered image:
|
||||
source: lightness/window.png
|
||||
left border: [0,5,5,22]
|
||||
right border: [251,5,5,22]
|
||||
top border: [5,0,246,5]
|
||||
bottom border: [5,27,246,5]
|
||||
top left corner: [0,0,5,5]
|
||||
top right corner: [251,0,5,5]
|
||||
bottom left corner: [0,27,5,5]
|
||||
bottom right corner: [251,27,5,5]
|
||||
center: [5,5,246,22]
|
||||
body:
|
||||
bordered image:
|
||||
source: lightness/window.png
|
||||
left border: [0,32,2,222]
|
||||
right border: [254,32,2,222]
|
||||
bottom border: [2,254,252,2]
|
||||
bottom left corner: [0,254,2,2]
|
||||
bottom right corner: [254,254,2,2]
|
||||
center: [2, 32, 92, 92]
|
||||
|
||||
text edits:
|
||||
default:
|
||||
default size: [86, 20]
|
||||
font color: [80, 80, 80, 255]
|
||||
text margin: 3
|
||||
bordered image:
|
||||
source: lightness/button-down.png
|
||||
left border: [0,2,2,6]
|
||||
right border: [22,2,2,6]
|
||||
top border: [2,0,20,2]
|
||||
bottom border: [2,8,20,2]
|
||||
top left corner: [0,0,2,2]
|
||||
top right corner: [22,0,2,2]
|
||||
bottom left corner: [0,8,2,2]
|
||||
bottom right corner: [22,8,2,2]
|
||||
center: [2,2,20,6]
|
||||
|
||||
line decorations:
|
||||
default:
|
||||
bordered image:
|
||||
source: lightness/window.png
|
||||
top border: [2,254,252,2]
|
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 235 B |
After Width: | Height: | Size: 283 B |
After Width: | Height: | Size: 234 B |
After Width: | Height: | Size: 232 B |
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
@ -0,0 +1,46 @@
|
||||
/* The MIT License
|
||||
*
|
||||
* Copyright (c) 2010 OTClient, https://github.com/edubart/otclient
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONSTANTS_H
|
||||
#define CONSTANTS_H
|
||||
|
||||
enum AlignmentFlag {
|
||||
AlignLeft = 1,
|
||||
AlignRight = 2,
|
||||
AlignTop = 4,
|
||||
AlignBottom = 8,
|
||||
AlignHorizontalCenter = 16,
|
||||
AlignVerticalCenter = 32,
|
||||
AlignTopLeft = AlignTop | AlignLeft,
|
||||
AlignTopRight = AlignTop | AlignRight,
|
||||
AlignBottomLeft = AlignBottom | AlignLeft,
|
||||
AlignBottomRight = AlignBottom | AlignRight,
|
||||
AlignLeftCenter = AlignLeft | AlignVerticalCenter,
|
||||
AlignRightCenter = AlignRight | AlignVerticalCenter,
|
||||
AlignTopCenter = AlignTop | AlignHorizontalCenter,
|
||||
AlignBottomCenter = AlignBottom | AlignHorizontalCenter,
|
||||
AlignCenter = AlignVerticalCenter | AlignHorizontalCenter
|
||||
};
|
||||
|
||||
#endif // CONSTANTS_H
|
@ -0,0 +1,122 @@
|
||||
/* The MIT License
|
||||
*
|
||||
* Copyright (c) 2010 OTClient, https://github.com/edubart/otclient
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef YAML_H
|
||||
#define YAML_H
|
||||
|
||||
#include <prerequisites.h>
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
inline void operator>>(const YAML::Node& node, Color& color)
|
||||
{
|
||||
int r, g, b, a;
|
||||
node[0] >> r;
|
||||
node[1] >> g;
|
||||
node[2] >> b;
|
||||
node[3] >> a;
|
||||
color.setRGBA(r,g,b,a);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void operator>>(const YAML::Node& node, TPoint<T>& point)
|
||||
{
|
||||
node[0] >> point.x;
|
||||
node[1] >> point.y;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void operator>>(const YAML::Node& node, TRect<T>& rect)
|
||||
{
|
||||
T x, y, width, height;
|
||||
node[0] >> x;
|
||||
node[1] >> y;
|
||||
node[2] >> width;
|
||||
node[3] >> height;
|
||||
rect.setRect(x, y, width, height);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void operator>>(const YAML::Node& node, TSize<T>& size)
|
||||
{
|
||||
T w, h;
|
||||
node[0] >> w;
|
||||
node[1] >> h;
|
||||
size.setSize(w, h);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T yamlRead(const YAML::Node& node)
|
||||
{
|
||||
return node.Read<T>();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T yamlRead(const YAML::Node& node, const char *name)
|
||||
{
|
||||
T value;
|
||||
node[name] >> value;
|
||||
return value;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T yamlRead(const YAML::Node& node, const char *name, const T& defaultValue)
|
||||
{
|
||||
T value = defaultValue;
|
||||
if(node.FindValue(name))
|
||||
node[name] >> value;
|
||||
return value;
|
||||
}
|
||||
|
||||
inline bool yamlHasValue(const YAML::Node& node, const char *name)
|
||||
{
|
||||
return node.FindValue(name) != NULL;
|
||||
}
|
||||
|
||||
inline std::string yamlErrorDesc(const YAML::Node& node, const std::string& error)
|
||||
{
|
||||
return YAML::Exception(node.GetMark(), error.c_str()).what();
|
||||
}
|
||||
|
||||
inline void yamlThrowError(const YAML::Node& node, const std::string& error)
|
||||
{
|
||||
throw YAML::Exception(node.GetMark(), error.c_str());
|
||||
}
|
||||
|
||||
template<class A, class B>
|
||||
inline std::map<A,B> yamlReadMap(const YAML::Node& node, const char *name)
|
||||
{
|
||||
std::map<A,B> map;
|
||||
if(const YAML::Node* mapNode = node.FindValue(name)) {
|
||||
for(auto it = mapNode->begin(); it != mapNode->end(); ++it) {
|
||||
A a;
|
||||
B b;
|
||||
it.first() >> a;
|
||||
it.second() >> b;
|
||||
map[a] = b;
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
#endif // YAML_H
|