forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'scrawl/master'
commit
39b6659045
@ -1,169 +0,0 @@
|
||||
#include "list.hpp"
|
||||
|
||||
#include <MyGUI_Gui.h>
|
||||
#include <MyGUI_Button.h>
|
||||
#include <MyGUI_ImageBox.h>
|
||||
#include <MyGUI_ScrollBar.h>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
||||
namespace Widgets
|
||||
{
|
||||
|
||||
MWList::MWList() :
|
||||
mClient(0)
|
||||
, mScrollView(0)
|
||||
, mItemHeight(0)
|
||||
{
|
||||
}
|
||||
|
||||
void MWList::initialiseOverride()
|
||||
{
|
||||
Base::initialiseOverride();
|
||||
|
||||
assignWidget(mClient, "Client");
|
||||
if (mClient == 0)
|
||||
mClient = this;
|
||||
|
||||
mScrollView = mClient->createWidgetReal<MyGUI::ScrollView>(
|
||||
"MW_ScrollView", MyGUI::FloatCoord(0.0, 0.0, 1.0, 1.0),
|
||||
MyGUI::Align::Top | MyGUI::Align::Left | MyGUI::Align::Stretch, getName() + "_ScrollView");
|
||||
}
|
||||
|
||||
void MWList::addItem(const std::string& name)
|
||||
{
|
||||
mItems.push_back(name);
|
||||
}
|
||||
|
||||
void MWList::addSeparator()
|
||||
{
|
||||
mItems.push_back("");
|
||||
}
|
||||
|
||||
void MWList::adjustSize()
|
||||
{
|
||||
redraw();
|
||||
}
|
||||
|
||||
void MWList::redraw(bool scrollbarShown)
|
||||
{
|
||||
const int _scrollBarWidth = 20; // fetch this from skin?
|
||||
const int scrollBarWidth = scrollbarShown ? _scrollBarWidth : 0;
|
||||
const int spacing = 3;
|
||||
size_t viewPosition = -mScrollView->getViewOffset().top;
|
||||
|
||||
while (mScrollView->getChildCount())
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mScrollView->getChildAt(0));
|
||||
}
|
||||
|
||||
mItemHeight = 0;
|
||||
int i=0;
|
||||
for (std::vector<std::string>::const_iterator it=mItems.begin();
|
||||
it!=mItems.end(); ++it)
|
||||
{
|
||||
if (*it != "")
|
||||
{
|
||||
if (mListItemSkin.empty())
|
||||
throw std::runtime_error("MWList needs a ListItemSkin property");
|
||||
MyGUI::Button* button = mScrollView->createWidget<MyGUI::Button>(
|
||||
mListItemSkin, MyGUI::IntCoord(0, mItemHeight, mScrollView->getSize().width - scrollBarWidth - 2, 24),
|
||||
MyGUI::Align::Left | MyGUI::Align::Top, getName() + "_item_" + (*it));
|
||||
button->setCaption((*it));
|
||||
button->getSubWidgetText()->setWordWrap(true);
|
||||
button->getSubWidgetText()->setTextAlign(MyGUI::Align::Left);
|
||||
button->eventMouseWheel += MyGUI::newDelegate(this, &MWList::onMouseWheel);
|
||||
button->eventMouseButtonClick += MyGUI::newDelegate(this, &MWList::onItemSelected);
|
||||
|
||||
int height = button->getTextSize().height;
|
||||
button->setSize(MyGUI::IntSize(button->getSize().width, height));
|
||||
button->setUserData(i);
|
||||
|
||||
mItemHeight += height + spacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
MyGUI::ImageBox* separator = mScrollView->createWidget<MyGUI::ImageBox>("MW_HLine",
|
||||
MyGUI::IntCoord(2, mItemHeight, mScrollView->getWidth() - scrollBarWidth - 4, 18),
|
||||
MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch);
|
||||
separator->setNeedMouseFocus(false);
|
||||
|
||||
mItemHeight += 18 + spacing;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
// Canvas size must be expressed with VScroll disabled, otherwise MyGUI would expand the scroll area when the scrollbar is hidden
|
||||
mScrollView->setVisibleVScroll(false);
|
||||
mScrollView->setCanvasSize(mClient->getSize().width, std::max(mItemHeight, mClient->getSize().height));
|
||||
mScrollView->setVisibleVScroll(true);
|
||||
|
||||
if (!scrollbarShown && mItemHeight > mClient->getSize().height)
|
||||
redraw(true);
|
||||
|
||||
size_t viewRange = mScrollView->getCanvasSize().height;
|
||||
if(viewPosition > viewRange)
|
||||
viewPosition = viewRange;
|
||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, viewPosition * -1));
|
||||
}
|
||||
|
||||
void MWList::setPropertyOverride(const std::string &_key, const std::string &_value)
|
||||
{
|
||||
if (_key == "ListItemSkin")
|
||||
mListItemSkin = _value;
|
||||
else
|
||||
Base::setPropertyOverride(_key, _value);
|
||||
}
|
||||
|
||||
bool MWList::hasItem(const std::string& name)
|
||||
{
|
||||
return (std::find(mItems.begin(), mItems.end(), name) != mItems.end());
|
||||
}
|
||||
|
||||
unsigned int MWList::getItemCount()
|
||||
{
|
||||
return mItems.size();
|
||||
}
|
||||
|
||||
std::string MWList::getItemNameAt(unsigned int at)
|
||||
{
|
||||
assert(at < mItems.size() && "List item out of bounds");
|
||||
return mItems[at];
|
||||
}
|
||||
|
||||
void MWList::removeItem(const std::string& name)
|
||||
{
|
||||
assert( std::find(mItems.begin(), mItems.end(), name) != mItems.end() );
|
||||
mItems.erase( std::find(mItems.begin(), mItems.end(), name) );
|
||||
}
|
||||
|
||||
void MWList::clear()
|
||||
{
|
||||
mItems.clear();
|
||||
}
|
||||
|
||||
void MWList::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
||||
{
|
||||
//NB view offset is negative
|
||||
if (mScrollView->getViewOffset().top + _rel*0.3 > 0)
|
||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, 0));
|
||||
else
|
||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, mScrollView->getViewOffset().top + _rel*0.3));
|
||||
}
|
||||
|
||||
void MWList::onItemSelected(MyGUI::Widget* _sender)
|
||||
{
|
||||
std::string name = _sender->castType<MyGUI::Button>()->getCaption();
|
||||
int id = *_sender->getUserData<int>();
|
||||
eventItemSelected(name, id);
|
||||
eventWidgetSelected(_sender);
|
||||
}
|
||||
|
||||
MyGUI::Widget* MWList::getItemWidget(const std::string& name)
|
||||
{
|
||||
return mScrollView->findWidget (getName() + "_item_" + name);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
#ifndef MWGUI_LIST_HPP
|
||||
#define MWGUI_LIST_HPP
|
||||
|
||||
#include <MyGUI_ScrollView.h>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
namespace Widgets
|
||||
{
|
||||
/**
|
||||
* \brief a very simple list widget that supports word-wrapping entries
|
||||
* \note if the width or height of the list changes, you must call adjustSize() method
|
||||
*/
|
||||
class MWList : public MyGUI::Widget
|
||||
{
|
||||
MYGUI_RTTI_DERIVED(MWList)
|
||||
public:
|
||||
MWList();
|
||||
|
||||
typedef MyGUI::delegates::CMultiDelegate2<const std::string&, int> EventHandle_StringInt;
|
||||
typedef MyGUI::delegates::CMultiDelegate1<MyGUI::Widget*> EventHandle_Widget;
|
||||
|
||||
/**
|
||||
* Event: Item selected with the mouse.
|
||||
* signature: void method(std::string itemName, int index)
|
||||
*/
|
||||
EventHandle_StringInt eventItemSelected;
|
||||
|
||||
/**
|
||||
* Event: Item selected with the mouse.
|
||||
* signature: void method(MyGUI::Widget* sender)
|
||||
*/
|
||||
EventHandle_Widget eventWidgetSelected;
|
||||
|
||||
|
||||
/**
|
||||
* Call after the size of the list changed, or items were inserted/removed
|
||||
*/
|
||||
void adjustSize();
|
||||
|
||||
void addItem(const std::string& name);
|
||||
void addSeparator(); ///< add a seperator between the current and the next item.
|
||||
void removeItem(const std::string& name);
|
||||
bool hasItem(const std::string& name);
|
||||
unsigned int getItemCount();
|
||||
std::string getItemNameAt(unsigned int at); ///< \attention if there are separators, this method will return "" at the place where the separator is
|
||||
void clear();
|
||||
|
||||
MyGUI::Widget* getItemWidget(const std::string& name);
|
||||
///< get widget for an item name, useful to set up tooltip
|
||||
|
||||
virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
|
||||
|
||||
protected:
|
||||
void initialiseOverride();
|
||||
|
||||
void redraw(bool scrollbarShown = false);
|
||||
|
||||
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
|
||||
void onItemSelected(MyGUI::Widget* _sender);
|
||||
|
||||
private:
|
||||
MyGUI::ScrollView* mScrollView;
|
||||
MyGUI::Widget* mClient;
|
||||
std::string mListItemSkin;
|
||||
|
||||
std::vector<std::string> mItems;
|
||||
|
||||
int mItemHeight; // height of all items
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,165 @@
|
||||
#include "list.hpp"
|
||||
|
||||
#include <MyGUI_Gui.h>
|
||||
#include <MyGUI_Button.h>
|
||||
#include <MyGUI_ImageBox.h>
|
||||
#include <MyGUI_ScrollBar.h>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
MWList::MWList() :
|
||||
mClient(0)
|
||||
, mScrollView(0)
|
||||
, mItemHeight(0)
|
||||
{
|
||||
}
|
||||
|
||||
void MWList::initialiseOverride()
|
||||
{
|
||||
Base::initialiseOverride();
|
||||
|
||||
assignWidget(mClient, "Client");
|
||||
if (mClient == 0)
|
||||
mClient = this;
|
||||
|
||||
mScrollView = mClient->createWidgetReal<MyGUI::ScrollView>(
|
||||
"MW_ScrollView", MyGUI::FloatCoord(0.0, 0.0, 1.0, 1.0),
|
||||
MyGUI::Align::Top | MyGUI::Align::Left | MyGUI::Align::Stretch, getName() + "_ScrollView");
|
||||
}
|
||||
|
||||
void MWList::addItem(const std::string& name)
|
||||
{
|
||||
mItems.push_back(name);
|
||||
}
|
||||
|
||||
void MWList::addSeparator()
|
||||
{
|
||||
mItems.push_back("");
|
||||
}
|
||||
|
||||
void MWList::adjustSize()
|
||||
{
|
||||
redraw();
|
||||
}
|
||||
|
||||
void MWList::redraw(bool scrollbarShown)
|
||||
{
|
||||
const int _scrollBarWidth = 20; // fetch this from skin?
|
||||
const int scrollBarWidth = scrollbarShown ? _scrollBarWidth : 0;
|
||||
const int spacing = 3;
|
||||
size_t viewPosition = -mScrollView->getViewOffset().top;
|
||||
|
||||
while (mScrollView->getChildCount())
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mScrollView->getChildAt(0));
|
||||
}
|
||||
|
||||
mItemHeight = 0;
|
||||
int i=0;
|
||||
for (std::vector<std::string>::const_iterator it=mItems.begin();
|
||||
it!=mItems.end(); ++it)
|
||||
{
|
||||
if (*it != "")
|
||||
{
|
||||
if (mListItemSkin.empty())
|
||||
return;
|
||||
MyGUI::Button* button = mScrollView->createWidget<MyGUI::Button>(
|
||||
mListItemSkin, MyGUI::IntCoord(0, mItemHeight, mScrollView->getSize().width - scrollBarWidth - 2, 24),
|
||||
MyGUI::Align::Left | MyGUI::Align::Top, getName() + "_item_" + (*it));
|
||||
button->setCaption((*it));
|
||||
button->getSubWidgetText()->setWordWrap(true);
|
||||
button->getSubWidgetText()->setTextAlign(MyGUI::Align::Left);
|
||||
button->eventMouseWheel += MyGUI::newDelegate(this, &MWList::onMouseWheel);
|
||||
button->eventMouseButtonClick += MyGUI::newDelegate(this, &MWList::onItemSelected);
|
||||
|
||||
int height = button->getTextSize().height;
|
||||
button->setSize(MyGUI::IntSize(button->getSize().width, height));
|
||||
button->setUserData(i);
|
||||
|
||||
mItemHeight += height + spacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
MyGUI::ImageBox* separator = mScrollView->createWidget<MyGUI::ImageBox>("MW_HLine",
|
||||
MyGUI::IntCoord(2, mItemHeight, mScrollView->getWidth() - scrollBarWidth - 4, 18),
|
||||
MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch);
|
||||
separator->setNeedMouseFocus(false);
|
||||
|
||||
mItemHeight += 18 + spacing;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
// Canvas size must be expressed with VScroll disabled, otherwise MyGUI would expand the scroll area when the scrollbar is hidden
|
||||
mScrollView->setVisibleVScroll(false);
|
||||
mScrollView->setCanvasSize(mClient->getSize().width, std::max(mItemHeight, mClient->getSize().height));
|
||||
mScrollView->setVisibleVScroll(true);
|
||||
|
||||
if (!scrollbarShown && mItemHeight > mClient->getSize().height)
|
||||
redraw(true);
|
||||
|
||||
size_t viewRange = mScrollView->getCanvasSize().height;
|
||||
if(viewPosition > viewRange)
|
||||
viewPosition = viewRange;
|
||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, viewPosition * -1));
|
||||
}
|
||||
|
||||
void MWList::setPropertyOverride(const std::string &_key, const std::string &_value)
|
||||
{
|
||||
if (_key == "ListItemSkin")
|
||||
mListItemSkin = _value;
|
||||
else
|
||||
Base::setPropertyOverride(_key, _value);
|
||||
}
|
||||
|
||||
bool MWList::hasItem(const std::string& name)
|
||||
{
|
||||
return (std::find(mItems.begin(), mItems.end(), name) != mItems.end());
|
||||
}
|
||||
|
||||
unsigned int MWList::getItemCount()
|
||||
{
|
||||
return mItems.size();
|
||||
}
|
||||
|
||||
std::string MWList::getItemNameAt(unsigned int at)
|
||||
{
|
||||
assert(at < mItems.size() && "List item out of bounds");
|
||||
return mItems[at];
|
||||
}
|
||||
|
||||
void MWList::removeItem(const std::string& name)
|
||||
{
|
||||
assert( std::find(mItems.begin(), mItems.end(), name) != mItems.end() );
|
||||
mItems.erase( std::find(mItems.begin(), mItems.end(), name) );
|
||||
}
|
||||
|
||||
void MWList::clear()
|
||||
{
|
||||
mItems.clear();
|
||||
}
|
||||
|
||||
void MWList::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
||||
{
|
||||
//NB view offset is negative
|
||||
if (mScrollView->getViewOffset().top + _rel*0.3 > 0)
|
||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, 0));
|
||||
else
|
||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, mScrollView->getViewOffset().top + _rel*0.3));
|
||||
}
|
||||
|
||||
void MWList::onItemSelected(MyGUI::Widget* _sender)
|
||||
{
|
||||
std::string name = _sender->castType<MyGUI::Button>()->getCaption();
|
||||
int id = *_sender->getUserData<int>();
|
||||
eventItemSelected(name, id);
|
||||
eventWidgetSelected(_sender);
|
||||
}
|
||||
|
||||
MyGUI::Widget* MWList::getItemWidget(const std::string& name)
|
||||
{
|
||||
return mScrollView->findWidget (getName() + "_item_" + name);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
#ifndef MWGUI_LIST_HPP
|
||||
#define MWGUI_LIST_HPP
|
||||
|
||||
#include <MyGUI_ScrollView.h>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
/**
|
||||
* \brief a very simple list widget that supports word-wrapping entries
|
||||
* \note if the width or height of the list changes, you must call adjustSize() method
|
||||
*/
|
||||
class MWList : public MyGUI::Widget
|
||||
{
|
||||
MYGUI_RTTI_DERIVED(MWList)
|
||||
public:
|
||||
MWList();
|
||||
|
||||
typedef MyGUI::delegates::CMultiDelegate2<const std::string&, int> EventHandle_StringInt;
|
||||
typedef MyGUI::delegates::CMultiDelegate1<MyGUI::Widget*> EventHandle_Widget;
|
||||
|
||||
/**
|
||||
* Event: Item selected with the mouse.
|
||||
* signature: void method(std::string itemName, int index)
|
||||
*/
|
||||
EventHandle_StringInt eventItemSelected;
|
||||
|
||||
/**
|
||||
* Event: Item selected with the mouse.
|
||||
* signature: void method(MyGUI::Widget* sender)
|
||||
*/
|
||||
EventHandle_Widget eventWidgetSelected;
|
||||
|
||||
|
||||
/**
|
||||
* Call after the size of the list changed, or items were inserted/removed
|
||||
*/
|
||||
void adjustSize();
|
||||
|
||||
void addItem(const std::string& name);
|
||||
void addSeparator(); ///< add a seperator between the current and the next item.
|
||||
void removeItem(const std::string& name);
|
||||
bool hasItem(const std::string& name);
|
||||
unsigned int getItemCount();
|
||||
std::string getItemNameAt(unsigned int at); ///< \attention if there are separators, this method will return "" at the place where the separator is
|
||||
void clear();
|
||||
|
||||
MyGUI::Widget* getItemWidget(const std::string& name);
|
||||
///< get widget for an item name, useful to set up tooltip
|
||||
|
||||
virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
|
||||
|
||||
protected:
|
||||
void initialiseOverride();
|
||||
|
||||
void redraw(bool scrollbarShown = false);
|
||||
|
||||
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
|
||||
void onItemSelected(MyGUI::Widget* _sender);
|
||||
|
||||
private:
|
||||
MyGUI::ScrollView* mScrollView;
|
||||
MyGUI::Widget* mClient;
|
||||
std::string mListItemSkin;
|
||||
|
||||
std::vector<std::string> mItems;
|
||||
|
||||
int mItemHeight; // height of all items
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,74 @@
|
||||
#include "numericeditbox.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
void NumericEditBox::initialiseOverride()
|
||||
{
|
||||
Base::initialiseOverride();
|
||||
eventEditTextChange += MyGUI::newDelegate(this, &NumericEditBox::onEditTextChange);
|
||||
|
||||
mValue = 0;
|
||||
setCaption("0");
|
||||
}
|
||||
|
||||
void NumericEditBox::shutdownOverride()
|
||||
{
|
||||
Base::shutdownOverride();
|
||||
eventEditTextChange -= MyGUI::newDelegate(this, &NumericEditBox::onEditTextChange);
|
||||
}
|
||||
|
||||
void NumericEditBox::onEditTextChange(MyGUI::EditBox *sender)
|
||||
{
|
||||
std::string newCaption = sender->getCaption();
|
||||
if (newCaption.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
mValue = boost::lexical_cast<int>(newCaption);
|
||||
int capped = std::min(mMaxValue, std::max(mValue, mMinValue));
|
||||
if (capped != mValue)
|
||||
{
|
||||
mValue = capped;
|
||||
setCaption(MyGUI::utility::toString(mValue));
|
||||
}
|
||||
}
|
||||
catch (boost::bad_lexical_cast&)
|
||||
{
|
||||
setCaption(MyGUI::utility::toString(mValue));
|
||||
}
|
||||
|
||||
eventValueChanged(mValue);
|
||||
}
|
||||
|
||||
void NumericEditBox::setValue(int value)
|
||||
{
|
||||
if (value != mValue)
|
||||
{
|
||||
setCaption(MyGUI::utility::toString(value));
|
||||
mValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
void NumericEditBox::setMinValue(int minValue)
|
||||
{
|
||||
mMinValue = minValue;
|
||||
}
|
||||
|
||||
void NumericEditBox::setMaxValue(int maxValue)
|
||||
{
|
||||
mMaxValue = maxValue;
|
||||
}
|
||||
|
||||
void NumericEditBox::onKeyLostFocus(MyGUI::Widget* _new)
|
||||
{
|
||||
Base::onKeyLostFocus(_new);
|
||||
setCaption(MyGUI::utility::toString(mValue));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
#ifndef OPENMW_NUMERIC_EDIT_BOX_H
|
||||
#define OPENMW_NUMERIC_EDIT_BOX_H
|
||||
|
||||
#include <MyGUI_EditBox.h>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief A variant of the EditBox that only allows integer inputs
|
||||
*/
|
||||
class NumericEditBox : public MyGUI::EditBox
|
||||
{
|
||||
MYGUI_RTTI_DERIVED(NumericEditBox)
|
||||
|
||||
public:
|
||||
NumericEditBox()
|
||||
: mValue(0), mMinValue(std::numeric_limits<int>().min()),
|
||||
mMaxValue(std::numeric_limits<int>().max())
|
||||
{}
|
||||
|
||||
void initialiseOverride();
|
||||
void shutdownOverride();
|
||||
|
||||
typedef MyGUI::delegates::CMultiDelegate1<int> EventHandle_ValueChanged;
|
||||
EventHandle_ValueChanged eventValueChanged;
|
||||
|
||||
/// @note Does not trigger eventValueChanged
|
||||
void setValue (int value);
|
||||
|
||||
void setMinValue(int minValue);
|
||||
void setMaxValue(int maxValue);
|
||||
private:
|
||||
void onEditTextChange(MyGUI::EditBox* sender);
|
||||
void onKeyLostFocus(MyGUI::Widget* _new);
|
||||
|
||||
int mValue;
|
||||
|
||||
int mMinValue;
|
||||
int mMaxValue;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,57 @@
|
||||
#include "tags.hpp"
|
||||
|
||||
#include <MyGUI_Colour.h>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
bool replaceTag(const MyGUI::UString& tag, MyGUI::UString& out, const std::map<std::string,std::string>& fallbackSettings)
|
||||
{
|
||||
std::string fontcolour = "fontcolour=";
|
||||
size_t fontcolourLength = fontcolour.length();
|
||||
|
||||
std::string fontcolourhtml = "fontcolourhtml=";
|
||||
size_t fontcolourhtmlLength = fontcolourhtml.length();
|
||||
|
||||
if (tag.compare(0, fontcolourLength, fontcolour) == 0)
|
||||
{
|
||||
std::string fallbackName = "FontColor_color_" + tag.substr(fontcolourLength);
|
||||
std::map<std::string, std::string>::const_iterator it = fallbackSettings.find(fallbackName);
|
||||
if (it == fallbackSettings.end())
|
||||
throw std::runtime_error("Unknown fallback name: " + fallbackName);
|
||||
std::string str = it->second;
|
||||
|
||||
std::string ret[3];
|
||||
unsigned int j=0;
|
||||
for(unsigned int i=0;i<str.length();++i){
|
||||
if(str[i]==',') j++;
|
||||
else if (str[i] != ' ') ret[j]+=str[i];
|
||||
}
|
||||
MyGUI::Colour col (MyGUI::utility::parseInt(ret[0])/255.f,MyGUI::utility::parseInt(ret[1])/255.f,MyGUI::utility::parseInt(ret[2])/255.f);
|
||||
out = col.print();
|
||||
return true;
|
||||
}
|
||||
else if (tag.compare(0, fontcolourhtmlLength, fontcolourhtml) == 0)
|
||||
{
|
||||
std::string fallbackName = "FontColor_color_" + tag.substr(fontcolourhtmlLength);
|
||||
std::map<std::string, std::string>::const_iterator it = fallbackSettings.find(fallbackName);
|
||||
if (it == fallbackSettings.end())
|
||||
throw std::runtime_error("Unknown fallback name: " + fallbackName);
|
||||
std::string str = it->second;
|
||||
|
||||
std::string ret[3];
|
||||
unsigned int j=0;
|
||||
for(unsigned int i=0;i<str.length();++i){
|
||||
if(str[i]==',') j++;
|
||||
else if (str[i] != ' ') ret[j]+=str[i];
|
||||
}
|
||||
std::stringstream html;
|
||||
html << "#" << std::hex << MyGUI::utility::parseInt(ret[0]) << MyGUI::utility::parseInt(ret[1]) << MyGUI::utility::parseInt(ret[2]);
|
||||
out = html.str();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
#ifndef OPENMW_WIDGETS_TAGS_H
|
||||
#define OPENMW_WIDGETS_TAGS_H
|
||||
|
||||
#include <MyGUI_UString.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
/// Try to replace a tag. Returns true on success and writes the result to \a out.
|
||||
bool replaceTag (const MyGUI::UString& tag, MyGUI::UString& out, const std::map<std::string,std::string>& fallbackSettings);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,25 @@
|
||||
#include "widgets.hpp"
|
||||
|
||||
#include <MyGUI_FactoryManager.h>
|
||||
|
||||
#include "list.hpp"
|
||||
#include "numericeditbox.hpp"
|
||||
#include "box.hpp"
|
||||
#include "imagebutton.hpp"
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
void registerAllWidgets()
|
||||
{
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::MWList>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::HBox>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::VBox>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::AutoSizedTextBox>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::AutoSizedEditBox>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::AutoSizedButton>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::ImageButton>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<Gui::NumericEditBox>("Widget");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
#ifndef OPENMW_COMPONENTS_WIDGETS_H
|
||||
#define OPENMW_COMPONENTS_WIDGETS_H
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
/// Register all widgets from this component with MyGUI's factory manager.
|
||||
void registerAllWidgets();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MyGUI>
|
||||
<MyGUI type="Widgets">
|
||||
<!-- New widget class definitions -->
|
||||
<Widget name="ImageButton">
|
||||
<Property key="DefaultSkin" value="ImageBox"/>
|
||||
<Property key="Skin" value="ImageBox" group="Plugin" name="ImageButton"/>
|
||||
<Property key="Parent" value="true"/>
|
||||
<Property key="Child" value="true"/>
|
||||
<Parameter key="ImageHighlighted" value="String"/>
|
||||
<Parameter key="ImagePushed" value="String"/>
|
||||
<Parameter key="ImageNormal" value="String"/>
|
||||
</Widget>
|
||||
<Widget name="VBox">
|
||||
<Property key="DefaultSkin" value=""/>
|
||||
<Property key="Skin" value="" group="Plugin" name="VBox"/>
|
||||
<Property key="Parent" value="true"/>
|
||||
<Property key="Child" value="true"/>
|
||||
<Parameter key="Spacing" value="1 int"/>
|
||||
<Parameter key="Padding" value="1 int"/>
|
||||
<Parameter key="AutoResize" value="Bool"/>
|
||||
</Widget>
|
||||
<Widget name="HBox">
|
||||
<Property key="DefaultSkin" value=""/>
|
||||
<Property key="Skin" value="" group="Plugin" name="HBox"/>
|
||||
<Property key="Parent" value="true"/>
|
||||
<Property key="Child" value="true"/>
|
||||
<Parameter key="Spacing" value="1 int"/>
|
||||
<Parameter key="Padding" value="1 int"/>
|
||||
<Parameter key="AutoResize" value="Bool"/>
|
||||
</Widget>
|
||||
<Widget name="AutoSizedButton">
|
||||
<Property key="Base" value="Button"/>
|
||||
<Property key="DefaultSkin" value="MW_Button"/>
|
||||
<Property key="Skin" value="MW_Button" group="Plugin" name="AutoSizedButton"/>
|
||||
<Property key="Parent" value="true"/>
|
||||
<Property key="Child" value="true"/>
|
||||
<Parameter key="ExpandDirection" value="Align"/>
|
||||
</Widget>
|
||||
<Widget name="AutoSizedTextBox">
|
||||
<Property key="Base" value="TextBox"/>
|
||||
<Property key="DefaultSkin" value="SandText"/>
|
||||
<Property key="Skin" value="SandText" group="Plugin" name="AutoSizedTextBox"/>
|
||||
<Property key="Parent" value="true"/>
|
||||
<Property key="Child" value="true"/>
|
||||
<Parameter key="ExpandDirection" value="Align"/>
|
||||
</Widget>
|
||||
<Widget name="AutoSizedEditBox">
|
||||
<Property key="Base" value="EditBox"/>
|
||||
<Property key="DefaultSkin" value="SandText"/>
|
||||
<Property key="Skin" value="SandText" group="Plugin" name="AutoSizedEditBox"/>
|
||||
<Property key="Parent" value="true"/>
|
||||
<Property key="Child" value="true"/>
|
||||
<Parameter key="ExpandDirection" value="Align"/>
|
||||
</Widget>
|
||||
<Widget name="MWList">
|
||||
<Property key="DefaultSkin" value="MW_SimpleList"/>
|
||||
<Property key="Skin" value="MW_SimpleList" group="Plugin" name="MWList"/>
|
||||
<Property key="Parent" value="true"/>
|
||||
<Property key="Child" value="true"/>
|
||||
<Parameter key="ListItemSkin" value="Skin"/>
|
||||
</Widget>
|
||||
</MyGUI>
|
||||
<MyGUI type="Plugin">
|
||||
<Plugin>
|
||||
<Source>./Plugin_MyGUI_OpenMW_Resources</Source>
|
||||
<Source build="Debug">./Plugin_MyGUI_OpenMW_Resources_d</Source>
|
||||
</Plugin>
|
||||
</MyGUI>
|
||||
</MyGUI>
|
@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Skin" version="3.2.1">
|
||||
<Skin name = "TextBox" size = "16 16">
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
<Resource type="ResourceSkin" name="TextBox" size="16 16">
|
||||
<Property key="FontHeight" value = "16" />
|
||||
<Property key="TextAlign" value = "ALIGN_DEFAULT" />
|
||||
<Property key="TextColour" value = "0.7 0.7 0.7" />
|
||||
|
||||
<BasisSkin type="SimpleText" offset = "0 0 16 16" align = "ALIGN_STRETCH"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name = "ImageBox" size = "16 16">
|
||||
<BasisSkin type="MainSkin" offset = "0 0 16 16"/>
|
||||
</Skin>
|
||||
|
||||
<Skin name = "RotatingSkin" size = "16 16">
|
||||
<Resource type="ResourceSkin" name="RotatingSkin" size="16 16">
|
||||
<BasisSkin type="RotatingSkin" offset="0 0 16 16" align="Stretch"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Resource type="ResourceSkin" name="ImageBox" size="16 16">
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 16"/>
|
||||
</Resource>
|
||||
</MyGUI>
|
||||
|
@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Skin" version="3.2.1">
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
|
||||
|
||||
<!-- Console Input -->
|
||||
|
||||
<Skin name="MW_EditClient" size="10 10">
|
||||
<Resource type="ResourceSkin" name="MW_EditClient" size="10 10">
|
||||
<Property key="FontName" value="MonoFont"/>
|
||||
<Property key="TextAlign" value="Left VCenter"/>
|
||||
<Property key="TextColour" value="1 1 1"/>
|
||||
<BasisSkin type="EditText" offset="0 0 10 10" align="Stretch"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_ConsoleCommand" size="29 28">
|
||||
<Resource type="ResourceSkin" name="MW_ConsoleCommand" size="29 28">
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 29 26" align="Bottom Stretch"/>
|
||||
<Child type="TextBox" skin="MW_EditClient" offset="4 2 19 22" align="Bottom Stretch" name="Client"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
</MyGUI>
|
||||
|
@ -1,37 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Layout">
|
||||
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 600 128" name="_Main">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MyGUI type="Layout" version="3.2.0">
|
||||
<Widget type="Window" skin="MW_Dialog" position="0 0 600 128" layer="Windows" name="_Main">
|
||||
<Property key="Visible" value="false"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 4 592 24" name="LabelText" align="Left Top HStretch">
|
||||
<Widget type="TextBox" skin="SandText" position="4 4 592 24" align="Left Top HStretch" name="LabelText">
|
||||
<Property key="TextAlign" value="Center"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 30 507 24" name="ItemText" align="Left Top HStretch">
|
||||
<Widget type="TextBox" skin="SandText" position="4 30 521 24" align="Left Top HStretch" name="ItemText">
|
||||
<Property key="TextAlign" value="Right"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="EditBox" skin="MW_TextEdit" position="520 30 52 24" name="ItemEdit" align="Right Top">
|
||||
<Widget type="NumericEditBox" skin="MW_TextEdit" position="535 30 50 24" align="Right Top" name="ItemEdit">
|
||||
<Property key="TextAlign" value="Center"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="MWScrollBar" skin="MW_HScroll" position="28 60 544 18" name="CountSlider" align="Left Top HStretch">
|
||||
<Widget type="MWScrollBar" skin="MW_HScroll" position="7 61 578 18" align="Left Top HStretch" name="CountSlider">
|
||||
<Property key="MoveToClick" value="true"/>
|
||||
</Widget>
|
||||
|
||||
|
||||
<Widget type="HBox" position="0 86 572 24" align="Right Bottom">
|
||||
<Widget type="Widget">
|
||||
<Widget type="HBox" skin="" position="0 88 585 24" align="Right Bottom">
|
||||
<Widget type="Widget" skin="" position="0 12 0 0">
|
||||
<UserString key="HStretch" value="true"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="417 90 60 24" name="CancelButton" align="Right Top">
|
||||
<Property key="Caption" value="#{sCancel}"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="512 90 60 24" name="OkButton" align="Right Top">
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="4 0 53 24" align="Right Top" name="OkButton">
|
||||
<Property key="Caption" value="#{sOk}"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="61 0 78 24" align="Right Top" name="CancelButton">
|
||||
<Property key="Caption" value="#{sCancel}"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
</Widget>
|
||||
<CodeGeneratorSettings/>
|
||||
</MyGUI>
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Skin" version="3.2.1">
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
|
||||
<Skin name="MW_DispositionEdit" size="0 0 50 50">
|
||||
<Resource type="ResourceSkin" name="MW_DispositionEdit" size="0 0 50 50">
|
||||
<Property key="FontName" value="Default"/>
|
||||
<Property key="TextAlign" value="Center"/>
|
||||
<Property key="Static" value="1"/>
|
||||
<Property key="WordWrap" value="true"/>
|
||||
<Property key="TextShadow" value="true"/>
|
||||
<Child type="TextBox" skin="SandText" offset="0 0 0 -4" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
</MyGUI>
|
||||
|
@ -1,109 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Skin" version="3.2.1">
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
<!-- Energy bar frame graphics -->
|
||||
<Skin name="HUD_Bar_Top" size="64 2" texture="textures\menu_small_energy_bar_top.dds">
|
||||
<Resource type="ResourceSkin" name="HUD_Bar_Top" size="64 2" texture="textures\menu_small_energy_bar_top.dds">
|
||||
<BasisSkin type="MainSkin" offset="0 0 64 2">
|
||||
<State name="normal" offset="0 0 64 2"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="HUD_Bar_Bottom" size="64 2" texture="textures\menu_small_energy_bar_bottom.dds">
|
||||
</Resource>
|
||||
<Resource type="ResourceSkin" name="HUD_Bar_Bottom" size="64 2" texture="textures\menu_small_energy_bar_bottom.dds">
|
||||
<BasisSkin type="MainSkin" offset="0 0 64 2">
|
||||
<State name="normal" offset="0 0 64 2"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="HUD_Bar_Side" size="2 8" texture="textures\menu_small_energy_bar_vert.dds">
|
||||
</Resource>
|
||||
<Resource type="ResourceSkin" name="HUD_Bar_Side" size="2 8" texture="textures\menu_small_energy_bar_vert.dds">
|
||||
<BasisSkin type="MainSkin" offset="0 0 2 8">
|
||||
<State name="normal" offset="0 0 2 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<!-- Progress bar track, various colors -->
|
||||
<Skin name="MW_BarTrack_Red" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Resource type="ResourceSkin" name="MW_BarTrack_Red" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="#{fontcolour=health}"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BarTrack_Green" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
</Resource>
|
||||
<Resource type="ResourceSkin" name="MW_BarTrack_Green" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="#{fontcolour=fatigue}"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BarTrack_Blue" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
</Resource>
|
||||
<Resource type="ResourceSkin" name="MW_BarTrack_Blue" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="#{fontcolour=magic}"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
<Skin name="MW_BarTrack_Yellow" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
</Resource>
|
||||
<Resource type="ResourceSkin" name="MW_BarTrack_Yellow" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="1 1 0"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
|
||||
<Skin name="MW_BarTrack_Magic" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Resource type="ResourceSkin" name="MW_BarTrack_Magic" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="#{fontcolour=magic_fill}"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_BarTrack_Weapon" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Resource type="ResourceSkin" name="MW_BarTrack_Weapon" size="4 8" texture="textures\menu_bar_gray.dds" >
|
||||
<Property key="Colour" value="#{fontcolour=weapon_fill}"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
|
||||
<State name="normal" offset="0 0 16 8"/>
|
||||
</BasisSkin>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_EnergyBar_Magic" size="64 12">
|
||||
<Resource type="ResourceSkin" name="MW_EnergyBar_Magic" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BarTrack_Magic"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
<Skin name="MW_EnergyBar_Weapon" size="64 12">
|
||||
</Resource>
|
||||
<Resource type="ResourceSkin" name="MW_EnergyBar_Weapon" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BarTrack_Weapon"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_EnergyBar_Red" size="64 12">
|
||||
<Resource type="ResourceSkin" name="MW_EnergyBar_Red" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BarTrack_Red"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_EnergyBar_Green" size="64 12">
|
||||
<Resource type="ResourceSkin" name="MW_EnergyBar_Green" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BarTrack_Green"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_EnergyBar_Blue" size="64 12">
|
||||
<Resource type="ResourceSkin" name="MW_EnergyBar_Blue" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BarTrack_Blue"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_EnergyBar_Yellow" size="64 12">
|
||||
<Resource type="ResourceSkin" name="MW_EnergyBar_Yellow" size="64 12">
|
||||
<Property key="TrackSkin" value="MW_BarTrack_Yellow"/>
|
||||
<Property key="TrackWidth" value="1"/>
|
||||
|
||||
<Child type="Widget" skin="MW_Box" offset="0 0 64 12" align="Stretch"/>
|
||||
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
</MyGUI>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Skin" version="3.2.1">
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
</MyGUI>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Skin" version="3.2.1">
|
||||
<Skin name="MW_MapView" size="516 516">
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
<Resource type="ResourceSkin" name="MW_MapView" size="516 516">
|
||||
<Child type="Widget" skin="" offset="0 0 516 516" align="Stretch" name="Client"/>
|
||||
|
||||
<!-- invisible scroll bars, needed for setting the view offset -->
|
||||
<Child type="MWScrollBar" skin="" offset="0 0 0 0" align="Default" name="VScroll"/>
|
||||
<Child type="MWScrollBar" skin="" offset="0 0 0 0" align="Default" name="HScroll"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
</MyGUI>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Skin" version="3.2.1">
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
|
||||
<Skin name="MW_ScrollView" size="516 516">
|
||||
<Resource type="ResourceSkin" name="MW_ScrollView" size="516 516">
|
||||
<Child type="Widget" skin="" offset="0 0 502 516" align="Stretch" name="Client"/>
|
||||
<Child type="MWScrollBar" skin="MW_VScroll" offset="498 3 14 509" align="Right Top VStretch" name="VScroll"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
<Skin name="MW_ScrollViewH" size="516 516">
|
||||
<Resource type="ResourceSkin" name="MW_ScrollViewH" size="516 516">
|
||||
<Child type="Widget" skin="" offset="0 0 516 502" align="Stretch" name="Client"/>
|
||||
<Child type="MWScrollBar" skin="MW_HScroll" offset="3 498 509 14" align="Left Bottom HStretch" name="HScroll"/>
|
||||
</Skin>
|
||||
</Resource>
|
||||
|
||||
</MyGUI>
|
||||
|
Loading…
Reference in New Issue