diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-11 18:21:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-11 18:21:16 +0300 |
commit | ad914acb8d9e3430407820d8e95e3165b2c06860 (patch) | |
tree | 10eb23d74d5da8c0fb68b5ed2953082eb3cbd0fe | |
parent | 5243dd89f5d68a6cc7a463b525b5e7e7bf77bd77 (diff) | |
download | manaverse-ad914acb8d9e3430407820d8e95e3165b2c06860.tar.gz manaverse-ad914acb8d9e3430407820d8e95e3165b2c06860.tar.bz2 manaverse-ad914acb8d9e3430407820d8e95e3165b2c06860.tar.xz manaverse-ad914acb8d9e3430407820d8e95e3165b2c06860.zip |
Add some theme parameters for char create dialog.
-rw-r--r-- | data/themes/golden-delicious/CMakeLists.txt | 1 | ||||
-rw-r--r-- | data/themes/golden-delicious/Makefile.am | 1 | ||||
-rw-r--r-- | data/themes/golden-delicious/charcreate.xml | 34 | ||||
-rw-r--r-- | data/themes/jewelry/CMakeLists.txt | 1 | ||||
-rw-r--r-- | data/themes/jewelry/Makefile.am | 1 | ||||
-rw-r--r-- | data/themes/jewelry/charcreate.xml | 32 | ||||
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 24 |
7 files changed, 83 insertions, 11 deletions
diff --git a/data/themes/golden-delicious/CMakeLists.txt b/data/themes/golden-delicious/CMakeLists.txt index c91af5b9d..e6726fb48 100644 --- a/data/themes/golden-delicious/CMakeLists.txt +++ b/data/themes/golden-delicious/CMakeLists.txt @@ -7,6 +7,7 @@ SET (FILES button_pressed.xml button.xml buy.xml + charcreate.xml CHANGELOG.txt chat.xml checkbox.xml diff --git a/data/themes/golden-delicious/Makefile.am b/data/themes/golden-delicious/Makefile.am index 467f7fb2c..95042d23a 100644 --- a/data/themes/golden-delicious/Makefile.am +++ b/data/themes/golden-delicious/Makefile.am @@ -10,6 +10,7 @@ gui_DATA = \ button_highlighted.xml \ button_pressed.xml \ buy.xml \ + charcreate.xml \ CHANGELOG.txt \ chat.xml \ checkbox.xml \ diff --git a/data/themes/golden-delicious/charcreate.xml b/data/themes/golden-delicious/charcreate.xml new file mode 100644 index 000000000..4a89fe438 --- /dev/null +++ b/data/themes/golden-delicious/charcreate.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<skinset name="Default" image="window.png"> + <widget type="Window" xpos="260" ypos="0"> + <option name="captionoffsetx" value="20" /> + <option name="captionoffsety" value="7" /> + <option name="titlebarBold" value="1" /> + <option name="titlebarHeight" value="30" /> + <option name="labelPadding" value="2" /> + + <!--10--> + <option name="padding" value="5" /> + <option name="stickySpacing" value="6" /> + + <!-- Top Row --> + <part type="top-left-corner" xpos="0" ypos="0" width="30" height="53" /> + <part type="top-edge" xpos="31" ypos="0" width="48" height="53" /> + <part type="top-right-corner" xpos="80" ypos="0" width="30" height="53" /> + + <!-- Middle Row --> + <part type="left-edge" xpos="0" ypos="54" width="30" height="24" /> + <part type="bg-quad" xpos="31" ypos="54" width="48" height="24" /> + <part type="right-edge" xpos="80" ypos="54" width="30" height="24" /> + + <!-- Bottom Row --> + <part type="bottom-left-corner" xpos="0" ypos="79" width="30" height="28" /> + <part type="bottom-edge" xpos="31" ypos="79" width="48" height="28" /> + <part type="bottom-right-corner" xpos="80" ypos="79" width="30" height="28" /> + + <part type="closeImage" xpos="-163" ypos="0" width="22" height="22" /> + <part type="closeImageHighlighted" xpos="-138" ypos="0" width="22" height="22" /> + <part type="stickyImageUp" xpos="-130" ypos="51" width="19" height="22" /> + <part type="stickyImageDown" xpos="-99" ypos="51" width="19" height="22" /> + </widget> +</skinset> diff --git a/data/themes/jewelry/CMakeLists.txt b/data/themes/jewelry/CMakeLists.txt index d2ba17506..32ab012ac 100644 --- a/data/themes/jewelry/CMakeLists.txt +++ b/data/themes/jewelry/CMakeLists.txt @@ -7,6 +7,7 @@ SET (FILES button_highlighted.xml button_pressed.xml buy.xml + charcreate.xml CHANGELOG.txt chat.xml checkbox.xml diff --git a/data/themes/jewelry/Makefile.am b/data/themes/jewelry/Makefile.am index bf1662442..13cf65946 100644 --- a/data/themes/jewelry/Makefile.am +++ b/data/themes/jewelry/Makefile.am @@ -10,6 +10,7 @@ gui_DATA = \ button_highlighted.xml \ button_pressed.xml \ buy.xml \ + charcreate.xml \ CHANGELOG.txt \ chat.xml \ checkbox.xml \ diff --git a/data/themes/jewelry/charcreate.xml b/data/themes/jewelry/charcreate.xml new file mode 100644 index 000000000..394cb94a0 --- /dev/null +++ b/data/themes/jewelry/charcreate.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<skinset name="Default" image="window.png"> + <widget type="Window" xpos="260" ypos="0"> + <option name="captionoffsetx" value="20" /> + <option name="captionoffsety" value="7" /> + <option name="titlebarBold" value="1" /> + <option name="titlebarHeight" value="35" /> + <option name="padding" value="10" /> + <option name="stickySpacing" value="6" /> + <option name="labelPadding" value="2" /> + + <!-- Top Row --> + <part type="top-left-corner" xpos="0" ypos="0" width="30" height="53" /> + <part type="top-edge" xpos="31" ypos="0" width="48" height="53" /> + <part type="top-right-corner" xpos="80" ypos="0" width="30" height="53" /> + + <!-- Middle Row --> + <part type="left-edge" xpos="0" ypos="54" width="30" height="24" /> + <part type="bg-quad" xpos="31" ypos="54" width="48" height="24" /> + <part type="right-edge" xpos="80" ypos="54" width="30" height="24" /> + + <!-- Bottom Row --> + <part type="bottom-left-corner" xpos="0" ypos="79" width="30" height="28" /> + <part type="bottom-edge" xpos="31" ypos="79" width="48" height="28" /> + <part type="bottom-right-corner" xpos="80" ypos="79" width="30" height="28" /> + + <part type="closeImage" xpos="-163" ypos="0" width="22" height="22" /> + <part type="closeImageHighlighted" xpos="-138" ypos="0" width="22" height="22" /> + <part type="stickyImageUp" xpos="-130" ypos="51" width="19" height="22" /> + <part type="stickyImageDown" xpos="-99" ypos="51" width="19" height="22" /> + </widget> +</skinset> diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index e38e1ebae..4c3b917a9 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -245,14 +245,15 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, mActionButton->setPosition(385, 100); mRotateButton->setPosition(415, 100); - mNameLabel->setPosition(5, 2); - mNameField->setDimension( - Rect(60, 2, 300, mNameField->getHeight())); - - const int leftX = 120; - const int rightX = 300; - const int labelX = 5; - const int nameX = 145; + mNameLabel->setPosition(mPadding, 2); + mNameField->setDimension(Rect(60, 2, + 300, mNameField->getHeight())); + + const int labelPadding = getOption("labelPadding", 2); + const int leftX = 120 + mPadding; + const int rightX = 300 + mPadding; + const int labelX = mPadding; + const int nameX = leftX + mPrevHairColorButton->getWidth() + labelPadding; int y = 30; mPrevHairColorButton->setPosition(leftX, y); @@ -564,18 +565,19 @@ void CharCreateDialog::setAttributes(const StringVect &labels, { mAttributeLabel[i] = new Label(this, labels[i]); mAttributeLabel[i]->setWidth(70); - mAttributeLabel[i]->setPosition(5, y + i * 24); + mAttributeLabel[i]->setPosition(mPadding, y + i * 24); mAttributeLabel[i]->adjustSize(); add(mAttributeLabel[i]); mAttributeSlider[i] = new Slider(this, min, max, 1.0); - mAttributeSlider[i]->setDimension(Rect(140, y + i * 24, 150, 12)); + mAttributeSlider[i]->setDimension(Rect(140 + mPadding, y + i * 24, + 150, 12)); mAttributeSlider[i]->setActionEventId("statslider"); mAttributeSlider[i]->addActionListener(this); add(mAttributeSlider[i]); mAttributeValue[i] = new Label(this, toString(min)); - mAttributeValue[i]->setPosition(295, y + i * 24); + mAttributeValue[i]->setPosition(295 + mPadding, y + i * 24); add(mAttributeValue[i]); } |