mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Added Translator support for the UI elements created from xml, access with "@string/key".
--HG-- branch : dev
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <eepp/window/window.hpp>
|
||||
#include <eepp/window/cursorhelper.hpp>
|
||||
#include <eepp/system/pack.hpp>
|
||||
#include <eepp/system/translator.hpp>
|
||||
|
||||
namespace pugi {
|
||||
class xml_node;
|
||||
@@ -52,14 +53,6 @@ class EE_API UIManager {
|
||||
|
||||
const Uint32& getLastPressTrigger() const;
|
||||
|
||||
void clipPlaneEnable( const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height );
|
||||
|
||||
void clipPlaneDisable();
|
||||
|
||||
void clipEnable( const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height );
|
||||
|
||||
void clipDisable();
|
||||
|
||||
void clipSmartEnable( UIControl * ctrl, const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height );
|
||||
|
||||
void clipSmartDisable( UIControl * ctrl );
|
||||
@@ -132,17 +125,23 @@ class EE_API UIManager {
|
||||
void loadLayoutFromPack( Pack * pack, const std::string& FilePackPath, UIControl * parent = NULL );
|
||||
|
||||
void loadLayoutNodes( pugi::xml_node node, UIControl * parent );
|
||||
|
||||
void setTranslator( Translator translator );
|
||||
|
||||
Translator& getTranslator();
|
||||
|
||||
String getTranslatorString( const std::string& str );
|
||||
protected:
|
||||
friend class UIControl;
|
||||
friend class UIWindow;
|
||||
|
||||
EE::Window::Window * mWindow;
|
||||
Input * mKM;
|
||||
EE::Window::Window *mWindow;
|
||||
Input * mKM;
|
||||
UIWindow * mControl;
|
||||
UIControl * mFocusControl;
|
||||
UIControl * mOverControl;
|
||||
UIControl * mFocusControl;
|
||||
UIControl * mOverControl;
|
||||
UIControl * mDownControl;
|
||||
UIControl * mLossFocusControl;
|
||||
UIControl * mLossFocusControl;
|
||||
std::list<UIWindow*> mWindowsList;
|
||||
std::list<UIControl*> mCloseList;
|
||||
|
||||
@@ -151,8 +150,8 @@ class EE_API UIManager {
|
||||
Uint32 mResizeCb;
|
||||
|
||||
Uint32 mFlags;
|
||||
Color mHighlightFocusColor;
|
||||
Color mHighlightOverColor;
|
||||
Color mHighlightFocusColor;
|
||||
Color mHighlightOverColor;
|
||||
Vector2i mMouseDownPos;
|
||||
|
||||
bool mInit;
|
||||
@@ -161,6 +160,8 @@ class EE_API UIManager {
|
||||
bool mControlDragging;
|
||||
bool mUseGlobalCursors;
|
||||
|
||||
Translator mTranslator;
|
||||
|
||||
UIManager();
|
||||
|
||||
void inputCallback( InputEvent * Event );
|
||||
|
||||
Reference in New Issue
Block a user