|
|
@ -39,215 +39,6 @@ using namespace NLMISC;
|
|
|
|
extern CEntityAnimationManager *EAM;
|
|
|
|
extern CEntityAnimationManager *EAM;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// CInterfaceLayer
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
COptionsLayer::COptionsLayer()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TxId_TL = TxId_T = TxId_TR = TxId_L = TxId_R = TxId_Blank = TxId_BL = TxId_B = -2;
|
|
|
|
|
|
|
|
TxId_BR = TxId_BL_Open = TxId_B_Open = TxId_BR_Open = TxId_EL_Open = TxId_EM_Open = TxId_ER_Open =-2;
|
|
|
|
|
|
|
|
Tile_Blank = 0;
|
|
|
|
|
|
|
|
Tile_M_Header = Tile_M_Scrollbar = 0;
|
|
|
|
|
|
|
|
Tile_T = Tile_B = Tile_L = Tile_R = 0;
|
|
|
|
|
|
|
|
Tile_B_Open = Tile_EM_Open = Tile_M_Open = 0;
|
|
|
|
|
|
|
|
Scrollbar_Offset_X = 4;
|
|
|
|
|
|
|
|
Scrollbar_W = 8;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
COptionsLayer::~COptionsLayer()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
bool COptionsLayer::parse (xmlNodePtr cur)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!CInterfaceOptions::parse (cur))
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
|
|
|
|
|
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tile_Blank = getValSInt32("tile_blank");
|
|
|
|
|
|
|
|
Tile_M_Header = getValSInt32("tile_m_header");
|
|
|
|
|
|
|
|
Tile_M_Scrollbar = getValSInt32("tile_m_scrollbar");
|
|
|
|
|
|
|
|
Tile_T = getValSInt32("tile_t");
|
|
|
|
|
|
|
|
Tile_B = getValSInt32("tile_b");
|
|
|
|
|
|
|
|
Tile_L = getValSInt32("tile_l");
|
|
|
|
|
|
|
|
Tile_R = getValSInt32("tile_r");
|
|
|
|
|
|
|
|
Tile_B_Open = getValSInt32("tile_b_open");
|
|
|
|
|
|
|
|
Tile_EM_Open = getValSInt32("tile_em_open");
|
|
|
|
|
|
|
|
Tile_M_Open = getValSInt32("tile_m_open");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scrollbar_Offset_X = getValSInt32("scrollbar_offset_x");
|
|
|
|
|
|
|
|
Scrollbar_W = getValSInt32("scrollbar_size_w");
|
|
|
|
|
|
|
|
TxId_B_Scrollbar = rVR.getTextureIdFromName (getValStr("scrollbar_tx_b"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_B_Scrollbar, W_B_Scrollbar, H_B_Scrollbar);
|
|
|
|
|
|
|
|
TxId_M_Scrollbar = rVR.getTextureIdFromName (getValStr("scrollbar_tx_m"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_M_Scrollbar, W_M_Scrollbar, H_M_Scrollbar);
|
|
|
|
|
|
|
|
TxId_T_Scrollbar = rVR.getTextureIdFromName (getValStr("scrollbar_tx_t"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_T_Scrollbar, W_T_Scrollbar, H_T_Scrollbar);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TxId_L_Header = rVR.getTextureIdFromName (getValStr("tx_l_header"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_L_Header, W_L_Header, H_L_Header);
|
|
|
|
|
|
|
|
TxId_M_Header = rVR.getTextureIdFromName (getValStr("tx_m_header"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_M_Header, W_M_Header, H_M_Header);
|
|
|
|
|
|
|
|
TxId_R_Header = rVR.getTextureIdFromName (getValStr("tx_r_header"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_R_Header, W_R_Header, H_R_Header);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TxId_TL = rVR.getTextureIdFromName (getValStr("tx_tl"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_TL, W_TL, H_TL);
|
|
|
|
|
|
|
|
TxId_T = rVR.getTextureIdFromName (getValStr("tx_t"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_T, W_T, H_T);
|
|
|
|
|
|
|
|
TxId_TR = rVR.getTextureIdFromName (getValStr("tx_tr"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_TR, W_TR, H_TR);
|
|
|
|
|
|
|
|
TxId_L = rVR.getTextureIdFromName (getValStr("tx_l"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_L, W_L, H_L);
|
|
|
|
|
|
|
|
TxId_R = rVR.getTextureIdFromName (getValStr("tx_r"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_R, W_R, H_R);
|
|
|
|
|
|
|
|
TxId_Blank = rVR.getTextureIdFromName (getValStr("tx_blank"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_Blank, W_Blank, H_Blank);
|
|
|
|
|
|
|
|
TxId_BL = rVR.getTextureIdFromName (getValStr("tx_bl"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_BL, W_BL, H_BL);
|
|
|
|
|
|
|
|
TxId_B = rVR.getTextureIdFromName (getValStr("tx_b"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_B, W_B, H_B);
|
|
|
|
|
|
|
|
TxId_BR = rVR.getTextureIdFromName (getValStr("tx_br"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_BR, W_BR, H_BR);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
TxId_BL_Open = rVR.getTextureIdFromName (getValStr("tx_bl_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_BL_Open, W_BL_Open, H_BL_Open);
|
|
|
|
|
|
|
|
TxId_B_Open = rVR.getTextureIdFromName (getValStr("tx_b_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_B_Open, W_B_Open, H_B_Open);
|
|
|
|
|
|
|
|
TxId_BR_Open = rVR.getTextureIdFromName (getValStr("tx_br_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_BR_Open, W_BR_Open, H_BR_Open);
|
|
|
|
|
|
|
|
TxId_EL_Open = rVR.getTextureIdFromName (getValStr("tx_el_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_EL_Open, W_EL_Open, H_EL_Open);
|
|
|
|
|
|
|
|
TxId_EM_Open = rVR.getTextureIdFromName (getValStr("tx_em_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_EM_Open, W_EM_Open, H_EM_Open);
|
|
|
|
|
|
|
|
TxId_ER_Open = rVR.getTextureIdFromName (getValStr("tx_er_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_ER_Open, W_ER_Open, H_ER_Open);
|
|
|
|
|
|
|
|
TxId_M_Open = rVR.getTextureIdFromName (getValStr("tx_m_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_M_Open, W_M_Open, H_M_Open);
|
|
|
|
|
|
|
|
TxId_E_Open = rVR.getTextureIdFromName (getValStr("tx_e_open"));
|
|
|
|
|
|
|
|
rVR.getTextureSizeFromId(TxId_E_Open, W_E_Open, H_E_Open);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TxId_TL_HighLight = rVR.getTextureIdFromName (getValStr("tx_tl_highlight"));
|
|
|
|
|
|
|
|
TxId_T_HighLight = rVR.getTextureIdFromName (getValStr("tx_t_highlight"));
|
|
|
|
|
|
|
|
TxId_TR_HighLight = rVR.getTextureIdFromName (getValStr("tx_tr_highlight"));
|
|
|
|
|
|
|
|
TxId_L_HighLight = rVR.getTextureIdFromName (getValStr("tx_l_highlight"));
|
|
|
|
|
|
|
|
TxId_R_HighLight = rVR.getTextureIdFromName (getValStr("tx_r_highlight"));
|
|
|
|
|
|
|
|
TxId_BL_HighLight = rVR.getTextureIdFromName (getValStr("tx_bl_highlight"));
|
|
|
|
|
|
|
|
TxId_B_HighLight = rVR.getTextureIdFromName (getValStr("tx_b_highlight"));
|
|
|
|
|
|
|
|
TxId_BR_HighLight = rVR.getTextureIdFromName (getValStr("tx_br_highlight"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
HeaderH = getValSInt32("header_h");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
COptionsContainerInsertion::COptionsContainerInsertion()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TxId_R_Arrow = -2;
|
|
|
|
|
|
|
|
TxId_L_Arrow = -2;
|
|
|
|
|
|
|
|
TxId_T_Arrow = -2;
|
|
|
|
|
|
|
|
TxId_B_Arrow = -2;
|
|
|
|
|
|
|
|
TxId_InsertionBar = -2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
bool COptionsContainerInsertion::parse(xmlNodePtr cur)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!CInterfaceOptions::parse (cur))
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
|
|
|
|
|
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
|
|
|
|
TxId_T_Arrow = rVR.getTextureIdFromName (getValStr("arrow_top"));
|
|
|
|
|
|
|
|
TxId_B_Arrow = rVR.getTextureIdFromName (getValStr("arrow_down"));
|
|
|
|
|
|
|
|
TxId_L_Arrow = rVR.getTextureIdFromName (getValStr("arrow_left"));
|
|
|
|
|
|
|
|
TxId_R_Arrow = rVR.getTextureIdFromName (getValStr("arrow_right"));
|
|
|
|
|
|
|
|
TxId_InsertionBar = rVR.getTextureIdFromName (getValStr("insertion_bar"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
COptionsContainerMove::COptionsContainerMove()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TrackW = -8;
|
|
|
|
|
|
|
|
TrackH = 22;
|
|
|
|
|
|
|
|
TrackY = -4;
|
|
|
|
|
|
|
|
TrackYWithTopResizer = -8;
|
|
|
|
|
|
|
|
TrackHWithTopResizer = 18;
|
|
|
|
|
|
|
|
ResizerSize = 8;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
bool COptionsContainerMove::parse(xmlNodePtr cur)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!CInterfaceOptions::parse (cur))
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
fromString(getValStr("track_w"), TrackW);
|
|
|
|
|
|
|
|
fromString(getValStr("track_h"), TrackH);
|
|
|
|
|
|
|
|
fromString(getValStr("track_y"), TrackY);
|
|
|
|
|
|
|
|
fromString(getValStr("track_y_with_top_resizer"), TrackYWithTopResizer);
|
|
|
|
|
|
|
|
fromString(getValStr("track_h_with_top_resizer"), TrackHWithTopResizer);
|
|
|
|
|
|
|
|
fromString(getValStr("resizer_size"), ResizerSize);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
COptionsList::COptionsList()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_NumParams= 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
bool COptionsList::parse (xmlNodePtr cur)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cur = cur->children;
|
|
|
|
|
|
|
|
bool ok = true;
|
|
|
|
|
|
|
|
uint id= 0;
|
|
|
|
|
|
|
|
while (cur)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( !stricmp((char*)cur->name,"param") )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CXMLAutoPtr ptr, val;
|
|
|
|
|
|
|
|
val = xmlGetProp (cur, (xmlChar*)"value");
|
|
|
|
|
|
|
|
if (!val)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
nlinfo("param with no name or no value");
|
|
|
|
|
|
|
|
ok = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string value = (string((const char*)val));
|
|
|
|
|
|
|
|
_ParamValue[toString(id)].init(value);
|
|
|
|
|
|
|
|
id++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cur = cur->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_NumParams= id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ok;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
const CInterfaceOptionValue &COptionsList::getValue(uint paramId) const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return CInterfaceOptions::getValue(toString(paramId));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
bool CMissionIconList::parse(xmlNodePtr cur)
|
|
|
|
bool CMissionIconList::parse(xmlNodePtr cur)
|
|
|
|
{
|
|
|
|
{
|
|
|
|