Merge with develop
--HG-- branch : experimental-ui-scaling
This commit is contained in:
commit
375cedb09e
34 changed files with 815 additions and 136 deletions
|
@ -242,6 +242,9 @@ external_stlport
|
|||
nel_tools*
|
||||
ryzom_tools*
|
||||
|
||||
#personal projects
|
||||
personal/
|
||||
|
||||
#Dumps
|
||||
*.dmp
|
||||
|
||||
|
|
2
.hgtags
2
.hgtags
|
@ -12,3 +12,5 @@ bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3
|
|||
153e0b605c9e0c83ba05b6428c62838b49cc84b2 ryzom-patch-3.0.1
|
||||
4300cc14aad098b1f86ea4c55577b7fa4a4cb5d2 ryzom-patch-3.1.0
|
||||
043aaeb3d8a2a54177581b57bda87a9deaad510e ryzom-patch-3.1.0-april_patch
|
||||
00dde390a394fce9da06c2f3264140282158d39f 3.3.0
|
||||
dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom-patch-3.3.1
|
||||
|
|
|
@ -475,6 +475,10 @@ IF(WITH_STUDIO)
|
|||
ADD_SUBDIRECTORY(studio)
|
||||
ENDIF()
|
||||
|
||||
IF(WITH_PERSONAL)
|
||||
ADD_SUBDIRECTORY(personal)
|
||||
ENDIF()
|
||||
|
||||
# To build the documention, you will have to enable it
|
||||
# and then do the equivalent of "make DoxygenDoc".
|
||||
IF(BUILD_DOCUMENTATION)
|
||||
|
|
|
@ -66,6 +66,8 @@ namespace NLGUI
|
|||
std::vector< std::string > trustedDomains;
|
||||
/// Maximum concurrent MultiCurl connections per CGroupHTML instance
|
||||
sint32 curlMaxConnections;
|
||||
/// cacert.pem location
|
||||
std::string curlCABundle;
|
||||
|
||||
SWebOptions(): curlMaxConnections(2)
|
||||
{
|
||||
|
@ -104,6 +106,10 @@ namespace NLGUI
|
|||
sint32 MaxHeight;
|
||||
};
|
||||
|
||||
// ImageDownload system
|
||||
enum TDataType {ImgType= 0, BnpType};
|
||||
enum TImageType {NormalImage=0, OverImage};
|
||||
|
||||
// Constructor
|
||||
CGroupHTML(const TCtorParam ¶m);
|
||||
~CGroupHTML();
|
||||
|
@ -149,6 +155,10 @@ namespace NLGUI
|
|||
|
||||
// End of the paragraph
|
||||
void endParagraph();
|
||||
|
||||
// add image download (used by view_bitmap.cpp to load web images)
|
||||
void addImageDownload(const std::string &url, CViewBase *img, const CStyleParams &style = CStyleParams(), const TImageType type = NormalImage);
|
||||
std::string localImageName(const std::string &url);
|
||||
|
||||
// Timeout
|
||||
void setTimeout(float tm) {_TimeoutValue= std::max(0.f, tm);}
|
||||
|
@ -720,6 +730,8 @@ namespace NLGUI
|
|||
return 0;
|
||||
return _Indent.back();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Current node is a title
|
||||
bool _Title;
|
||||
|
@ -809,10 +821,6 @@ namespace NLGUI
|
|||
private:
|
||||
// decode all HTML entities
|
||||
static ucstring decodeHTMLEntities(const ucstring &str);
|
||||
|
||||
// ImageDownload system
|
||||
enum TDataType {ImgType= 0, BnpType};
|
||||
enum TImageType {NormalImage=0, OverImage};
|
||||
|
||||
struct CDataImageDownload
|
||||
{
|
||||
|
@ -855,8 +863,6 @@ namespace NLGUI
|
|||
|
||||
void initImageDownload();
|
||||
void checkImageDownload();
|
||||
void addImageDownload(const std::string &url, CViewBase *img, const CStyleParams &style = CStyleParams(), const TImageType type = NormalImage);
|
||||
std::string localImageName(const std::string &url);
|
||||
std::string getAbsoluteUrl(const std::string &url);
|
||||
|
||||
bool isTrustedDomain(const std::string &domain);
|
||||
|
|
|
@ -885,7 +885,7 @@ namespace NLGUI
|
|||
}
|
||||
if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel && _Vertical)
|
||||
{
|
||||
moveTrackY (eventDesc.getWheel() * 12);
|
||||
moveTargetY (-(eventDesc.getWheel() * 12));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1226,6 +1226,12 @@ namespace NLGUI
|
|||
if(hReal <= maxHReal)
|
||||
return;
|
||||
|
||||
if (_TargetStepY > 1)
|
||||
{
|
||||
sint sign = (0 < dy) - (dy < 0);
|
||||
dy = sign * max(1, (dy / _TargetStepY)) * _TargetStepY;
|
||||
}
|
||||
|
||||
// compute the new ofsY.
|
||||
sint32 ofsY= _Target->getOfsY();
|
||||
ofsY+= dy;
|
||||
|
|
|
@ -1005,7 +1005,6 @@ namespace NLGUI
|
|||
{
|
||||
case KeyESCAPE:
|
||||
_CurrentHistoricIndex= -1;
|
||||
CWidgetManager::getInstance()->setCaptureKeyboard(NULL);
|
||||
// stop selection
|
||||
_CurrSelection = NULL;
|
||||
_CursorAtPreviousLineEnd = false;
|
||||
|
@ -1014,6 +1013,7 @@ namespace NLGUI
|
|||
setInputString(ucstring(""));
|
||||
triggerOnChangeAH();
|
||||
}
|
||||
CWidgetManager::getInstance()->setCaptureKeyboard(NULL);
|
||||
break;
|
||||
case KeyTAB:
|
||||
makeTopWindow();
|
||||
|
|
|
@ -395,13 +395,18 @@ namespace NLGUI
|
|||
return false;
|
||||
}
|
||||
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
// https://
|
||||
if (toLower(download.url.substr(0, 8)) == "https://")
|
||||
{
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, &CCurlCertificates::sslCtxFunction);
|
||||
}
|
||||
#else
|
||||
if (!options.curlCABundle.empty())
|
||||
{
|
||||
curl_easy_setopt(curl, CURLOPT_CAINFO, options.curlCABundle.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
download.data = new CCurlWWWData(curl, download.url);
|
||||
download.fp = fp;
|
||||
|
@ -1565,6 +1570,8 @@ namespace NLGUI
|
|||
{
|
||||
if ((*it).first == "template")
|
||||
templateName = (*it).second;
|
||||
else if ((*it).first == "display" && (*it).second == "inline-block")
|
||||
_BlockLevelElement.back() = false;
|
||||
else
|
||||
tmplParams.push_back(TTmplParam((*it).first, (*it).second));
|
||||
}
|
||||
|
@ -4022,13 +4029,6 @@ namespace NLGUI
|
|||
|
||||
void CGroupHTML::endParagraph()
|
||||
{
|
||||
// Remove previous paragraph if empty
|
||||
if (_Paragraph && (_Paragraph->getNumChildren() == 0))
|
||||
{
|
||||
_Paragraph->getParent ()->delGroup(_Paragraph);
|
||||
_Paragraph = NULL;
|
||||
}
|
||||
|
||||
_Paragraph = NULL;
|
||||
|
||||
paragraphChange ();
|
||||
|
@ -4038,13 +4038,6 @@ namespace NLGUI
|
|||
|
||||
void CGroupHTML::newParagraph(uint beginSpace)
|
||||
{
|
||||
// Remove previous paragraph if empty
|
||||
if (_Paragraph && (_Paragraph->getNumChildren() == 0))
|
||||
{
|
||||
_Paragraph->getParent ()->delGroup(_Paragraph);
|
||||
_Paragraph = NULL;
|
||||
}
|
||||
|
||||
// Add a new paragraph
|
||||
CGroupParagraph *newParagraph = new CGroupParagraph(CViewBase::TCtorParam());
|
||||
newParagraph->setResizeFromChildH(true);
|
||||
|
@ -4884,13 +4877,6 @@ namespace NLGUI
|
|||
if (!group)
|
||||
return;
|
||||
|
||||
// Remove previous paragraph if empty
|
||||
if (_Paragraph && (_Paragraph->getNumChildren() == 0))
|
||||
{
|
||||
_Paragraph->getParent ()->delGroup(_Paragraph);
|
||||
_Paragraph = NULL;
|
||||
}
|
||||
|
||||
registerAnchor(group);
|
||||
|
||||
if (!_DivName.empty())
|
||||
|
@ -5354,13 +5340,18 @@ namespace NLGUI
|
|||
return;
|
||||
}
|
||||
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
// https://
|
||||
if (toLower(url.substr(0, 8)) == "https://")
|
||||
{
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, &CCurlCertificates::sslCtxFunction);
|
||||
}
|
||||
#else
|
||||
if (!options.curlCABundle.empty())
|
||||
{
|
||||
curl_easy_setopt(curl, CURLOPT_CAINFO, options.curlCABundle.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// do not follow redirects, we have own handler
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 0);
|
||||
|
@ -5841,6 +5832,8 @@ namespace NLGUI
|
|||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||
std::string html = ls.toString(1);
|
||||
|
||||
// Always trust domain if rendered from lua
|
||||
_TrustedDomain = true;
|
||||
renderHtmlString(html);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1305,7 +1305,7 @@ namespace NLGUI
|
|||
CInterfaceGroup *currParent = _Parent;
|
||||
while (currParent)
|
||||
{
|
||||
if (currParent->moveSBTrackY (this, eventDesc.getWheel()*12))
|
||||
if (currParent->moveSBTargetY (this, -(eventDesc.getWheel()*12)))
|
||||
return true;
|
||||
currParent = currParent->getParent();
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/group_container_base.h"
|
||||
#include "nel/gui/group_html.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
@ -452,7 +453,19 @@ namespace NLGUI
|
|||
// ----------------------------------------------------------------------------
|
||||
void CViewBitmap::setTexture(const std::string & TxName)
|
||||
{
|
||||
_TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false);
|
||||
if (TxName.find("://") != string::npos || TxName.find("//") == 0)
|
||||
{
|
||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:webig:content:html"));
|
||||
if (groupHtml) {
|
||||
string localname = groupHtml->localImageName(TxName);
|
||||
if (!CFile::fileExists(localname))
|
||||
localname = "web_del.tga";
|
||||
_TextureId.setTexture (localname.c_str(), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false);
|
||||
groupHtml->addImageDownload(TxName, dynamic_cast<CViewBase*>(this));
|
||||
}
|
||||
}
|
||||
else
|
||||
_TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
@ -895,8 +895,8 @@ namespace NLGUI
|
|||
return maxw;
|
||||
else
|
||||
{
|
||||
sint parentWidth = std::min(_Parent->getMaxWReal(), _Parent->getWReal());
|
||||
return std::min(parentWidth-(sint)(_XReal-_Parent->getXReal()), maxw);
|
||||
sint parentWidth = std::min(_Parent->getMaxWReal(), _Parent->getWReal() - _Parent->getMarginLeft());
|
||||
return std::min(parentWidth-(sint)(_XReal-(_Parent->getXReal()-_Parent->getMarginLeft())), (sint)_LineMaxW);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1356,10 +1356,14 @@ bool CBitmap::decompressDXT1(bool alpha)
|
|||
{
|
||||
for(k=0; k<4; k++)
|
||||
{
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k]= c[bits&3].R;
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+1]= c[bits&3].G;
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+2]= c[bits&3].B;
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+3]= c[bits&3].A;
|
||||
uint32 index = pixelsCount + (j*wtmp+k)*4;
|
||||
// incase input image does not have proper width/height
|
||||
if (index+3 > mipMapSz) break;
|
||||
|
||||
dataTmp[m][index+0]= c[bits&3].R;
|
||||
dataTmp[m][index+1]= c[bits&3].G;
|
||||
dataTmp[m][index+2]= c[bits&3].B;
|
||||
dataTmp[m][index+3]= c[bits&3].A;
|
||||
bits>>=2;
|
||||
}
|
||||
}
|
||||
|
@ -1466,10 +1470,14 @@ bool CBitmap::decompressDXT3()
|
|||
{
|
||||
for(k=0; k<4; k++)
|
||||
{
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k]= c[bits&3].R;
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+1]= c[bits&3].G;
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+2]= c[bits&3].B;
|
||||
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+3]= alpha[4*j+k];
|
||||
uint32 index = pixelsCount + (j*wtmp+k)*4;
|
||||
// incase input image does not have proper width/height
|
||||
if (index+3 > mipMapSz) break;
|
||||
|
||||
dataTmp[m][index+0]= c[bits&3].R;
|
||||
dataTmp[m][index+1]= c[bits&3].G;
|
||||
dataTmp[m][index+2]= c[bits&3].B;
|
||||
dataTmp[m][index+3]= alpha[4*j+k];
|
||||
bits>>=2;
|
||||
}
|
||||
}
|
||||
|
@ -1602,10 +1610,14 @@ bool CBitmap::decompressDXT5()
|
|||
{
|
||||
for(k=0; k<4; k++)
|
||||
{
|
||||
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +0]= c[bits&3].R;
|
||||
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +1]= c[bits&3].G;
|
||||
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +2]= c[bits&3].B;
|
||||
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +3]= (uint8) alpha[codeAlpha[4*j+k]];
|
||||
uint32 index = pixelsCount + (j*wtmp+k)*4;
|
||||
// incase input image does not have proper width/height
|
||||
if (index+3 > mipMapSz) break;
|
||||
|
||||
dataTmp[m][index+0]= c[bits&3].R;
|
||||
dataTmp[m][index+1]= c[bits&3].G;
|
||||
dataTmp[m][index+2]= c[bits&3].B;
|
||||
dataTmp[m][index+3]= (uint8) alpha[codeAlpha[4*j+k]];
|
||||
bits>>=2;
|
||||
}
|
||||
}
|
||||
|
|
9
code/personal/README.md
Normal file
9
code/personal/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
cmake option to include CMakeLists.txt from this directory is `-DWITH_PERSONAL=ON`
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
ADD_SUBDIRECTORY(example)
|
||||
```
|
||||
|
|
@ -52,6 +52,11 @@ ForgetPwdURL = "http://shard.ryzomcore.org/ams/?page=forgot_password";
|
|||
LoginSupportURL = "https://plus.google.com/u/0/communities/103798956862568269036";
|
||||
InstallWebPage = "";
|
||||
|
||||
// Full path and filename where cURL can find certificate bundle file
|
||||
// cacert.pem file can be downloaded from https://curl.haxx.se/docs/caextract.html
|
||||
// and added to client data path or system specific bundle can be used
|
||||
// Ubuntu has "/etc/ssl/certs/ca-certificates.crt"
|
||||
//CurlCABundle = "cacert.pem";
|
||||
|
||||
////////////////
|
||||
// INTERFACES //
|
||||
|
@ -315,6 +320,10 @@ CameraSpeedMin = 2.0;
|
|||
CameraSpeedMax = 100.0;
|
||||
CameraResetSpeed = 10.0; // Speed in radian/s
|
||||
|
||||
// Default values for map
|
||||
MaxMapScale = 2.0;
|
||||
R2EDMaxMapScale = 8.0;
|
||||
|
||||
//////////////////
|
||||
// SOUND CONFIG //
|
||||
//////////////////
|
||||
|
|
|
@ -436,6 +436,9 @@
|
|||
<variable entry="UI:TEMP:GUILD:BACK:NAME"
|
||||
type="sint64"
|
||||
value="0" />
|
||||
<variable entry="UI:VARIABLES:GUILD_COST" type="sint32"
|
||||
value="100000" />
|
||||
|
||||
<!-- INIT FLAGS CREATION PARAMS -->
|
||||
<proc id="init_guild_creation">
|
||||
<action handler="set"
|
||||
|
@ -466,7 +469,7 @@
|
|||
<group id="bot_chat_create_guild"
|
||||
style="bot_chat_window"
|
||||
posref="BL TL"
|
||||
w="254"
|
||||
w="400"
|
||||
x="352"
|
||||
y="200"
|
||||
active="false"
|
||||
|
@ -488,7 +491,7 @@
|
|||
h="16"
|
||||
posref="TL TL"></group>
|
||||
<group id="content"
|
||||
w="246"
|
||||
w="398"
|
||||
child_resize_h="true"
|
||||
child_resize_hmargin="4"
|
||||
x="0"
|
||||
|
@ -498,40 +501,19 @@
|
|||
<instance template="bc_border_text"
|
||||
id="intro"
|
||||
w="0"
|
||||
y="-4"
|
||||
y="0"
|
||||
text_id="SERVER:BOTCHAT:CREATE_GUILD" />
|
||||
<!-- GUILD ICON -->
|
||||
<ctrl type="sheet"
|
||||
id="blason"
|
||||
posref="BL TL"
|
||||
x="0"
|
||||
y="-16"
|
||||
posparent="intro"
|
||||
nature="guild_flag"
|
||||
value="UI:TEMP:GUILD_CREATION"
|
||||
dragable="false"
|
||||
color="255 255 255 255" />
|
||||
<view type="text"
|
||||
id="guild_blason"
|
||||
posref="TL BL"
|
||||
posparent="blason"
|
||||
x="0"
|
||||
y="0"
|
||||
color="255 255 255 255"
|
||||
fontsize="10"
|
||||
shadow="true"
|
||||
hardtext="uiGuildBlason" />
|
||||
<!-- NAME OF GUILD -->
|
||||
<instance template="edit_box_widget"
|
||||
id="edit"
|
||||
posparent="blason"
|
||||
posref="MR ML"
|
||||
x="4"
|
||||
w="200"
|
||||
y="0"
|
||||
h="20"
|
||||
posparent="intro"
|
||||
posref="TL TL"
|
||||
x="0"
|
||||
w="380"
|
||||
y="-24"
|
||||
h="12"
|
||||
text_x="0"
|
||||
text_y="-1"
|
||||
text_y="0"
|
||||
text_ref="ML ML"
|
||||
fontsize="12"
|
||||
prompt=""
|
||||
|
@ -543,13 +525,15 @@
|
|||
enter_recover_focus="false"
|
||||
reset_focus_on_hide="true"
|
||||
max_historic="0"
|
||||
title="uiGuildNameWarning"
|
||||
tooltip="uiGuildNameWarning"
|
||||
entry_type="text" />
|
||||
<view type="text"
|
||||
id="guild_name"
|
||||
posparent="edit"
|
||||
posref="TL BL"
|
||||
x="0"
|
||||
y="5"
|
||||
y="0"
|
||||
color="255 255 255 255"
|
||||
fontsize="10"
|
||||
shadow="true"
|
||||
|
@ -558,11 +542,15 @@
|
|||
<instance template="edit_box_widget"
|
||||
id="desc"
|
||||
posref="BL TL"
|
||||
multi_line="true"
|
||||
max_num_chars="200"
|
||||
y="-24"
|
||||
posparent="blason"
|
||||
posparent="edit"
|
||||
child_resize_h="true"
|
||||
w="238"
|
||||
onenter="" />
|
||||
w="380"
|
||||
onenter=""
|
||||
title="uiGuildDescWarning"
|
||||
tooltip="uiGuildDescWarning" />
|
||||
<view type="text"
|
||||
id="guild_desc"
|
||||
posparent="desc"
|
||||
|
@ -578,10 +566,32 @@
|
|||
id="back"
|
||||
posparent="desc"
|
||||
posref="BM TM"
|
||||
w="180"
|
||||
h="77"
|
||||
w="300"
|
||||
h="120"
|
||||
x="0"
|
||||
y="-24" />
|
||||
<!-- GUILD ICON -->
|
||||
<ctrl type="sheet"
|
||||
id="blason"
|
||||
posref="TL TL"
|
||||
x="5"
|
||||
y="-18"
|
||||
posparent="back"
|
||||
nature="guild_flag"
|
||||
value="UI:TEMP:GUILD_CREATION"
|
||||
dragable="false"
|
||||
color="255 255 255 255" />
|
||||
<view type="text"
|
||||
id="guild_blason"
|
||||
posref="TL BL"
|
||||
posparent="blason"
|
||||
x="0"
|
||||
y="0"
|
||||
color="255 255 255 255"
|
||||
fontsize="10"
|
||||
shadow="true"
|
||||
hardtext="uiGuildBlason" />
|
||||
<!-- GUILD ICON Desinger -->
|
||||
<view type="text"
|
||||
id="guild_blason_design"
|
||||
posref="TL BL"
|
||||
|
@ -595,7 +605,7 @@
|
|||
<ctrl type="sheet"
|
||||
id="back_layer"
|
||||
posref="TL TL"
|
||||
x="4"
|
||||
x="100"
|
||||
y="-18"
|
||||
posparent="back"
|
||||
nature="guild_flag"
|
||||
|
@ -603,13 +613,6 @@
|
|||
global_color="false"
|
||||
onclick_l="enter_modal"
|
||||
params_l="group=ui:interface:guild_flag_back" />
|
||||
<view type="bitmap"
|
||||
id="fore_sheet"
|
||||
posparent="back_layer"
|
||||
posref="TR TL"
|
||||
x="4"
|
||||
y="0"
|
||||
texture="W_slot_blason.tga" />
|
||||
<view type="text"
|
||||
id="blason_back"
|
||||
posref="TL BL"
|
||||
|
@ -623,9 +626,9 @@
|
|||
<view type="text"
|
||||
id="blason_fore"
|
||||
posref="TL BL"
|
||||
posparent="fore_sheet"
|
||||
x="0"
|
||||
y="0"
|
||||
posparent="back"
|
||||
x="100"
|
||||
y="-80"
|
||||
color="255 255 255 255"
|
||||
fontsize="10"
|
||||
shadow="true"
|
||||
|
@ -633,8 +636,9 @@
|
|||
<ctrl type="button"
|
||||
button_type="push_button"
|
||||
id="fore_flag"
|
||||
posparent="fore_sheet"
|
||||
posparent="blason_fore"
|
||||
posref="TL TL"
|
||||
y="-16"
|
||||
tx_normal="W_slot_blason_over.tga"
|
||||
tx_over="W_slot_blason_over.tga"
|
||||
tx_pushed="W_slot_blason_over.tga"
|
||||
|
@ -648,9 +652,9 @@
|
|||
id="fore_layer"
|
||||
posref="TL TL"
|
||||
x="1"
|
||||
y="-1"
|
||||
y="-16"
|
||||
render_layer="5"
|
||||
posparent="fore_sheet"
|
||||
posparent="blason_fore"
|
||||
texture="Guild_Symbol_S_08.tga"
|
||||
scale="true"
|
||||
w="32"
|
||||
|
@ -663,7 +667,7 @@
|
|||
tooltip="uiGuildBlasonColor1"
|
||||
posref="TL TL"
|
||||
posparent="back"
|
||||
x="80"
|
||||
x="150"
|
||||
y="-19" />
|
||||
<instance template="tgcw_color2"
|
||||
id="col_2"
|
||||
|
@ -678,21 +682,29 @@
|
|||
id="negative"
|
||||
text="uiNegativeSymbol"
|
||||
posparent="back"
|
||||
posref="BM BM"
|
||||
x="0"
|
||||
y="4" />
|
||||
posref="BL BL"
|
||||
x="150"
|
||||
y="15" />
|
||||
<group id="pipo"
|
||||
w="238"
|
||||
w="390"
|
||||
h="8"
|
||||
x="0"
|
||||
y="0"
|
||||
posparent="back"
|
||||
posref="BM TM" />
|
||||
<instance template="argent"
|
||||
id="GuildCreatMoney"
|
||||
posparent="pipo"
|
||||
posref="BL TL"
|
||||
x="5"
|
||||
y="-14"
|
||||
tooltip="uiGuildCostInfo"
|
||||
value="UI:VARIABLES:GUILD_COST" />
|
||||
<instance template="button_ok_cancel"
|
||||
posparent="pipo"
|
||||
posref="BR TR"
|
||||
x="-4"
|
||||
y="-4"
|
||||
y="-14"
|
||||
ok_text="uiBotCreateGuild"
|
||||
onclick_ok="enter_guild_creation"
|
||||
onclick_ok_param="guild=ui:interface:bot_chat_create_guild:content:edit:eb|icon=ui:interface:bot_chat_create_guild:content:blason|desc=ui:interface:bot_chat_create_guild:content:desc:eb"
|
||||
|
|
|
@ -124,6 +124,9 @@
|
|||
|
||||
<command name="setuiscale" action="set_ui_scale" params="scale=$"/>
|
||||
|
||||
<command name="mapsearch" action="proc" params="map_search_show_set|+" />
|
||||
<command name="mapsearch" action="proc" params="map_search_show" />
|
||||
|
||||
<!-- WebIG -->
|
||||
<command name="go" action="browse" params="name=ui:interface:webig:content:html|url=home"/>
|
||||
<command name="webdev" action="browse" params="name=ui:interface:webig:content:html|url=http://localhost/index.html"/>
|
||||
|
|
|
@ -97,7 +97,6 @@
|
|||
<action id="pa_free" name="uimGcmFree" handler="beast_order" params="order=free|beast_index=@UI:GCM_BEAST_SELECTED"/>
|
||||
<action id="pa_enter_stable" name="uimGcmEnterStable" handler="beast_order" params="order=enter_stable|beast_index=@UI:GCM_BEAST_SELECTED"/>
|
||||
<action id="extract_rm" name="uimGcmExtractRM" handler="context_extract_rm" params="" />
|
||||
<action id="quit_team" name="uimGcmQuitTeam" handler="context_quit_team" params="" />
|
||||
<action id="info" name="uimGcmInfo" handler="open_title_help" params="from=target" />
|
||||
<action id="build_totem" name="uimGcmChooseBuilding" handler="build_totem" params="" />
|
||||
|
||||
|
@ -107,6 +106,9 @@
|
|||
<action id="move" name="uimGcmMove" handler="context_move" params="" />
|
||||
<action id="stop" name="uimGcmStopMove" handler="context_stop" params="" />
|
||||
<action id="unseat" name="uimUnmount" handler="beast_order" params="order=unmount|beast_index=0" />
|
||||
|
||||
<separator/>
|
||||
<action id="quit_team" name="uimGcmQuitTeam" handler="context_quit_team" params="" />
|
||||
</group>
|
||||
|
||||
<!-- TEMPORARY FOR TESTS -->
|
||||
|
|
|
@ -234,6 +234,8 @@
|
|||
<group type="menu" id="options_macro" exit_click_b="true" extends="base_menu" >
|
||||
<action name="uimMacroExec" handler="macros_exec" />
|
||||
<action name="uimMacroEdit" handler="macros_edit" />
|
||||
<action name="uimMacroCopy" handler="macros_copy" />
|
||||
<separator/>
|
||||
<action name="uimMacroDel" handler="macros_del" />
|
||||
</group>
|
||||
|
||||
|
@ -324,6 +326,8 @@
|
|||
<action name="uimMCMoveUp" handler="new_macro_cmd_move_up" />
|
||||
<action name="uimMCMoveDown" handler="new_macro_cmd_move_down" />
|
||||
<action name="uimMCEdit" handler="new_macro_cmd_edit" />
|
||||
<action name="uimMCCopy" handler="new_macro_cmd_copy" />
|
||||
<separator/>
|
||||
<action name="uimMCDel" handler="new_macro_cmd_delete" />
|
||||
</group>
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
<action id="teleport" name="uiTeleport" handler="map_teleport" params=""/>
|
||||
<action id="create_at_user_pos" name="uiCreateUserLMAtUserPos" handler="create_user_landmark_at_user_pos" params=""/>
|
||||
<separator/>
|
||||
<action id="search" name="uiMapSearch" handler="proc" params="map_search_show"/>
|
||||
<separator/>
|
||||
<action id="center" name="uiMenuCenter" handler="map_center" params="map=ui:interface:map:content:map_content:actual_map"/>
|
||||
</group>
|
||||
|
||||
|
@ -144,6 +146,7 @@
|
|||
<!-- * USER MAP * -->
|
||||
<!-- ******************************************************************** -->
|
||||
|
||||
<variable entry="UI:VARIABLES:ISACTIVE:MAP_SEARCH" type="sint32" value="0" />
|
||||
|
||||
<proc id="map_proc_active">
|
||||
<action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:MAP|value=1" />
|
||||
|
@ -155,10 +158,77 @@
|
|||
<action handler="lua" params="if (r2 and r2.Mode == 'Edit') then r2.ToolUI:updateToggleWindowButtons() end" />
|
||||
</proc>
|
||||
|
||||
<proc id="map_search_toggle">
|
||||
<action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:MAP_SEARCH|value=not(@UI:VARIABLES:ISACTIVE:MAP_SEARCH)"/>
|
||||
<action handler="proc" params="map_search_focus" cond="@UI:VARIABLES:ISACTIVE:MAP_SEARCH"/>
|
||||
<action handler="proc" params="map_search_reset" cond="not(@UI:VARIABLES:ISACTIVE:MAP_SEARCH)"/>
|
||||
</proc>
|
||||
|
||||
<proc id="map_search_focus">
|
||||
<action handler="set_keyboard_focus" params="target=ui:interface:map:content:map_content:lm_search:search:eb|select_all=true" />
|
||||
</proc>
|
||||
|
||||
<proc id="map_search_reset">
|
||||
<action handler="proc" params="map_search_setfilter" />
|
||||
</proc>
|
||||
|
||||
<proc id="map_search_show">
|
||||
<action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:MAP_SEARCH|value=1" />
|
||||
<action handler="proc" params="map_search_focus" />
|
||||
</proc>
|
||||
|
||||
<proc id="map_search_hide">
|
||||
<action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:MAP_SEARCH|value=0" />
|
||||
</proc>
|
||||
|
||||
<proc id="map_search_setfilter">
|
||||
<action handler="set" params="target_property=ui:interface:map:content:map_content:lm_search:search:eb:input_string|value='@0'" />
|
||||
<action handler="land_mark_filter" params="map=ui:interface:map:content:map_content:actual_map|text=@0" />
|
||||
</proc>
|
||||
|
||||
<!-- set search string from /mapsearch command -->
|
||||
<proc id="map_search_show_set">
|
||||
<action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:MAP_SEARCH|value=1" />
|
||||
<action handler="proc" params="map_search_setfilter|@0" />
|
||||
</proc>
|
||||
|
||||
<!-- hide search if focus was lost and input is empty (esc key) -->
|
||||
<proc id="map_search_focuslost">
|
||||
<action handler="proc" params="map_search_hide"
|
||||
cond="eq(getprop('ui:interface:map:content:map_content:lm_search:search:eb:input_string'),'')" />
|
||||
</proc>
|
||||
|
||||
<proc id="map_search_onchange">
|
||||
<action handler="land_mark_filter" params="map=ui:interface:map:content:map_content:actual_map|group=@0" />
|
||||
</proc>
|
||||
|
||||
<define id="map_min_size" value="256" />
|
||||
|
||||
<!-- used to override onclick handler -->
|
||||
<proc id="dummy_proc" />
|
||||
|
||||
<template name="lm_search_result" keep="true" active="true" id="" x="0" y="0" w="0" h="17" posparent="parent" posref="TL TL"
|
||||
hardtext="" fontsize="10" y_text="-2" onclick_l="lua" params_l="" tooltip="" index="0">
|
||||
|
||||
<group id="#id" active="#active" x="#x" y="#y" w="#w" h="#h" posparent="#posparent" posref="#posref" sizeref="w">
|
||||
|
||||
<ctrl type="button" id="over" sizeref="wh" w="0" h="0" posref="MM MM"
|
||||
scale="true" tx_normal="blank.tga" tx_over="blank.tga" color="0 0 0 0" col_over="255 255 255 127"
|
||||
onclick_l="land_mark_result_selected" params_l="map=ui:interface:map:content:map_content:actual_map|index=#index"
|
||||
onclick_r="proc" params_r="dummy_proc"
|
||||
tooltip="#tooltip" />
|
||||
|
||||
<view type="bitmap" id="icon" posref="ML ML" w="16" h="16"
|
||||
scale="true" color="255 255 255 255" global_color="false" texture="blank.tga" />
|
||||
|
||||
<view type="text" id="title" posref="TL TL" x="16" y="#y_text"
|
||||
color="255 255 255 255" global_color="true" fontsize="#fontsize" shadow="true" hardtext="#hardtext"
|
||||
auto_clamp="true" over_extend_view_text="false" over_extend_parent_rect="false" />
|
||||
|
||||
</group>
|
||||
|
||||
</template>
|
||||
|
||||
<group id="map" type="container" posref="BL TL" min_w="%map_min_size" max_w="16384" w="256" h="256" x="352" y="200" min_h="%map_min_size" max_h="16384"
|
||||
resizer="true" pop_max_h="16384" pop_min_h="%map_min_size" pop_max_w="16384" pop_min_w="%map_min_size"
|
||||
openable="false" opened="true"
|
||||
|
@ -191,8 +261,10 @@
|
|||
<!-- center on player -->
|
||||
<ctrl type="button" id="center" button_type="push_button" posparent="zoom_out" posref="TR TL" y="0" x="4" tx_normal="w_center_map.tga" tx_pushed="W_button_16_over.tga" tx_over="W_button_16_over.tga"
|
||||
onclick_l="map_center" params_l="map=ui:interface:map:content:map_content:actual_map" tooltip="uittCenter" />
|
||||
<ctrl type="button" id="lm_search_btn" button_type="push_button" posparent="center" posref="TR TL" y="0" x="4" tx_normal="w_help_1.tga" tx_pushed="W_button_16_over.tga" tx_over="W_button_16_over.tga"
|
||||
onclick_l="proc" params_l="map_search_toggle" tooltip="uittMapSearch" />
|
||||
|
||||
<view type="text" id="time" x="12" y="0" posparent="center" posref="MR ML" color="255 255 255 255" fontsize="12" shadow="true" hardtext="" />
|
||||
<view type="text" id="time" x="12" y="0" posparent="lm_search_btn" posref="MR ML" color="255 255 255 255" fontsize="12" shadow="true" hardtext="" />
|
||||
<view type="text" id="weather" x="8" y="-16" posref="TL TL" color="255 255 255 255" fontsize="12" shadow="true" hardtext="" />
|
||||
<ctrl type="tooltip" id="weather_tt" posparent="weather" sizeref="wh" w="0" h="0" tooltip="" tooltip_parent="ctrl" tooltip_posref="BL TL" />
|
||||
|
||||
|
@ -316,11 +388,53 @@
|
|||
selection_axis_color = "0 0 0 127"
|
||||
|
||||
compass="ui:interface:compass"
|
||||
scale_max="2"
|
||||
scale_max_r2="8"
|
||||
/>
|
||||
<!-- border around the map -->
|
||||
|
||||
/>
|
||||
<!-- border around the map -->
|
||||
|
||||
<group id="lm_search"
|
||||
posparent="back"
|
||||
posref="TR TR"
|
||||
sizeref="h"
|
||||
x="-2"
|
||||
y="-2"
|
||||
h="-4"
|
||||
child_resize_w="true">
|
||||
|
||||
<view type="bitmap" id="bg" posref="ML ML" sizeref="wh" h="25"
|
||||
scale="true" color="100 100 100 120" global_color="false" texture="blank.tga" />
|
||||
|
||||
<instance template="edit_box_widget"
|
||||
id="search"
|
||||
posref="TR TR"
|
||||
w="150"
|
||||
clear_on_escape="true"
|
||||
enter_recover_focus="false"
|
||||
on_focus_lost="proc" on_focus_lost_params="map_search_focuslost"
|
||||
onenter=""
|
||||
onchange="proc" onchange_params="map_search_onchange|ui:interface:map:content:map_content:lm_search:search:eb" />
|
||||
|
||||
<ctrl type="button"
|
||||
id="reset"
|
||||
button_type="push_button"
|
||||
posparent="search"
|
||||
posref="ML MR"
|
||||
x="-2"
|
||||
tx_normal="w_close_0.tga"
|
||||
tx_pushed="w_close_0.tga"
|
||||
tx_over="W_button_16_over"
|
||||
onclick_l="proc" params_l="map_search_toggle"
|
||||
tooltip="" />
|
||||
<view type="text" id="lm_count" posparent="search" posref="BR TR" x="-2" color="200 200 200 255" fontsize="10" shadow="true" hardtext="0" />
|
||||
|
||||
<group id="result" posref="TR TR" x="0" y="-25" w="0" h="-20" over="true" sizeref="wh">
|
||||
<group id="rows" x="10" w="-10" y="0" sizeref="w" posref="TL TL" child_resize_h="true" child_resize_hmargin="4" max_h="0" max_sizeref="h" max_sizeparent="parent">
|
||||
<group id="lm_result" type="list" x="0" y="0" posref="TL TL" sizeref="w" dynamic_display_size="true" />
|
||||
</group>
|
||||
<ctrl style="skin_scroll" id="sv" posref="TL TL" x="0" y="0" target="rows" />
|
||||
</group>
|
||||
</group>
|
||||
<link expr="@UI:VARIABLES:ISACTIVE:MAP_SEARCH" target="lm_search:active" />
|
||||
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
|
@ -409,8 +523,7 @@
|
|||
|
||||
player_pos_tex="player_pos.tga"
|
||||
|
||||
scale_max="2"
|
||||
/>
|
||||
/>
|
||||
<!-- border around the map -->
|
||||
|
||||
</group>
|
||||
|
|
|
@ -433,6 +433,7 @@ CClientConfig::CClientConfig()
|
|||
WebIgTrustedDomains.push_back(WebIgMainDomain);
|
||||
|
||||
CurlMaxConnections = 2;
|
||||
CurlCABundle.clear();
|
||||
|
||||
RingReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes_ring/index.php";
|
||||
ReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes/index.php";
|
||||
|
@ -606,6 +607,9 @@ CClientConfig::CClientConfig()
|
|||
CameraSpeedMax = 1.0f;
|
||||
CameraResetSpeed = 2.0f;
|
||||
|
||||
MaxMapScale = 2.0f;
|
||||
R2EDMaxMapScale = 8.0f;
|
||||
|
||||
// VERBOSES
|
||||
VerboseVP = false;
|
||||
VerboseAnimUser = false;
|
||||
|
@ -1091,6 +1095,8 @@ void CClientConfig::setValues()
|
|||
if (ClientCfg.CurlMaxConnections < 0)
|
||||
ClientCfg.CurlMaxConnections = 2;
|
||||
|
||||
READ_STRING_FV(CurlCABundle);
|
||||
|
||||
///////////////
|
||||
// ANIMATION //
|
||||
// AnimatedAngleThreshold
|
||||
|
@ -1473,6 +1479,9 @@ void CClientConfig::setValues()
|
|||
READ_FLOAT_FV(CameraDistance)
|
||||
}
|
||||
|
||||
// Default values for CGroupMap
|
||||
READ_FLOAT_FV(MaxMapScale);
|
||||
READ_FLOAT_FV(R2EDMaxMapScale);
|
||||
|
||||
/////////////
|
||||
// SHADOWS //
|
||||
|
|
|
@ -315,6 +315,7 @@ struct CClientConfig
|
|||
std::vector<string> WebIgTrustedDomains;
|
||||
|
||||
sint32 CurlMaxConnections;
|
||||
string CurlCABundle;
|
||||
|
||||
///////////////
|
||||
// ANIMATION //
|
||||
|
@ -598,6 +599,10 @@ struct CClientConfig
|
|||
float CameraSpeedMax;
|
||||
float CameraResetSpeed;
|
||||
|
||||
// Default values for CGroupMap
|
||||
float MaxMapScale;
|
||||
float R2EDMaxMapScale;
|
||||
|
||||
//////////////
|
||||
// VERBOSES //
|
||||
bool VerboseVP;
|
||||
|
|
|
@ -3055,6 +3055,7 @@ void CEntityCL::updateVisiblePostPos(const NLMISC::TTime &/* currentTimeInMs */,
|
|||
if (!instance.empty())
|
||||
{
|
||||
_SelectionFX.cast (instance);
|
||||
_SelectionFX.setLoadBalancingGroup("SelectionFx");
|
||||
if (_SelectionFX.empty())
|
||||
{
|
||||
// shape found, but not a particle system
|
||||
|
@ -3083,6 +3084,7 @@ void CEntityCL::updateVisiblePostPos(const NLMISC::TTime &/* currentTimeInMs */,
|
|||
if (!instance.empty())
|
||||
{
|
||||
_MouseOverFX.cast (instance);
|
||||
_MouseOverFX.setLoadBalancingGroup("SelectionFx");
|
||||
if (_MouseOverFX.empty())
|
||||
{
|
||||
// shape found, but not a particle system
|
||||
|
|
|
@ -593,6 +593,8 @@ void initMainLoop()
|
|||
Scene->setGroupLoadMaxPolygon("Skin", ClientCfg.SkinNbMaxPoly);
|
||||
Scene->setGroupLoadMaxPolygon("Fx", ClientCfg.FxNbMaxPoly);
|
||||
Scene->setMaxSkeletonsInNotCLodForm(ClientCfg.NbMaxSkeletonNotCLod);
|
||||
// separate group for mouse/target selection reticle
|
||||
Scene->setGroupLoadMaxPolygon("SelectionFx", 10000);
|
||||
// enable Scene Lighting
|
||||
Scene->enableLightingSystem(true);
|
||||
Scene->setAmbientGlobal(CRGBA::Black);
|
||||
|
|
|
@ -1548,12 +1548,48 @@ void CDBCtrlSheet::setupDisplayAsPhrase(const std::vector<NLMISC::CSheetId> &bri
|
|||
|
||||
// Get the best SBrick to display.
|
||||
CSheetId rootBrickSheetId= bricks[0];
|
||||
|
||||
{
|
||||
CSheetId bestBrickSheetId= pBM->getSabrinaCom().getPhraseBestDisplayBrick(bricks);
|
||||
setupDisplayAsSBrick (rootBrickSheetId.asInt(), bestBrickSheetId.asInt() );
|
||||
}
|
||||
|
||||
// Override background if type is forace extraction/prospection and ecosystem brick is used
|
||||
{
|
||||
BRICK_FAMILIES::TBrickFamily family = pBM->getSabrinaCom().getPhraseForageFamily(bricks);
|
||||
std::string icon;
|
||||
switch(family)
|
||||
{
|
||||
case BRICK_FAMILIES::BHFEMA:
|
||||
case BRICK_FAMILIES::BHFPMA:
|
||||
icon = "bk_matis_brick.tga";
|
||||
break;
|
||||
case BRICK_FAMILIES::BHFEMB:
|
||||
case BRICK_FAMILIES::BHFPMB:
|
||||
icon = "bk_fyros_brick.tga";
|
||||
break;
|
||||
case BRICK_FAMILIES::BHFEMC:
|
||||
case BRICK_FAMILIES::BHFPMC:
|
||||
icon = "bk_zorai_brick.tga";
|
||||
break;
|
||||
case BRICK_FAMILIES::BHFEMD:
|
||||
case BRICK_FAMILIES::BHFPMD:
|
||||
icon = "bk_tryker_brick.tga";
|
||||
break;
|
||||
case BRICK_FAMILIES::BHFEME:
|
||||
case BRICK_FAMILIES::BHFPME:
|
||||
icon = "bk_generic_brick.tga";
|
||||
break;
|
||||
default:
|
||||
icon = "";
|
||||
break;
|
||||
}
|
||||
if (!icon.empty())
|
||||
{
|
||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||
_DispBackBmpId = rVR.getTextureIdFromName(icon);
|
||||
}
|
||||
}
|
||||
|
||||
// not so beautiful to display .sphrase name in progression, and in botchat
|
||||
if(_ActualType==SheetType_SPhraseId)
|
||||
{
|
||||
|
|
|
@ -426,6 +426,8 @@ CGroupMap::CGroupMap(const TCtorParam ¶m)
|
|||
//
|
||||
_TargetLM = NULL;
|
||||
_HomeLM = NULL;
|
||||
_LandmarkFilter.clear();
|
||||
_MatchedLandmarks.clear();
|
||||
//
|
||||
_ScaleMax = 8.f;
|
||||
_ScaleMaxR2 = 8.f;
|
||||
|
@ -711,9 +713,11 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|||
}
|
||||
|
||||
//
|
||||
_ScaleMax = ClientCfg.MaxMapScale;
|
||||
ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max" );
|
||||
if (ptr) fromString((const char *) ptr, _ScaleMax);
|
||||
//
|
||||
_ScaleMaxR2 = ClientCfg.R2EDMaxMapScale;
|
||||
ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max_r2" );
|
||||
if (ptr) fromString((const char *) ptr, _ScaleMaxR2);
|
||||
//
|
||||
|
@ -900,9 +904,19 @@ void CGroupMap::updateCoords()
|
|||
// bool newLandMarkShown = false;
|
||||
uint i;
|
||||
for (i = 0; i < _ContinentLM.size(); ++i)
|
||||
setupFromZoom(_ContinentLM[i], _ContinentLM[i]->Type, _MeterPerPixel);
|
||||
{
|
||||
if (_ContinentLM[i]->SearchMatch)
|
||||
_ContinentLM[i]->setActive(true);
|
||||
else
|
||||
setupFromZoom(_ContinentLM[i], _ContinentLM[i]->Type, _MeterPerPixel);
|
||||
}
|
||||
for (i = 0; i < _ContinentText.size(); ++i)
|
||||
setupFromZoom(_ContinentText[i], _ContinentText[i]->Type, _MeterPerPixel);
|
||||
{
|
||||
if (_ContinentText[i]->SearchMatch)
|
||||
_ContinentText[i]->setActive(true);
|
||||
else
|
||||
setupFromZoom(_ContinentText[i], _ContinentText[i]->Type, _MeterPerPixel);
|
||||
}
|
||||
//
|
||||
updateLandMarkList(_ContinentLM);
|
||||
updateLandMarkTextList(_ContinentText);
|
||||
|
@ -2235,6 +2249,31 @@ void CGroupMap::centerOnPlayer()
|
|||
computeOffsets();
|
||||
invalidateCoords();
|
||||
}
|
||||
//============================================================================================================
|
||||
void CGroupMap::centerOnWorldPos(const CVector2f &worldPos)
|
||||
{
|
||||
CVector2f mapPos;
|
||||
worldToMap(mapPos, worldPos);
|
||||
|
||||
sint32 sx, sy;
|
||||
mapToScreen(sx, sy, mapPos);
|
||||
|
||||
sint32 x, y, w, h;
|
||||
computeMapRectInsideGroup(x, y, w, h);
|
||||
|
||||
sint32 dx, dy;
|
||||
if (sx < getXReal())
|
||||
dx = -(getXReal() - sx + w/2);
|
||||
else
|
||||
dx = sx - getXReal() - w/2;
|
||||
|
||||
if (sy < getYReal())
|
||||
dy = -(getYReal() - sy + h/2);
|
||||
else
|
||||
dy = sy - getYReal() - h/2;
|
||||
|
||||
pan(dx, dy);
|
||||
}
|
||||
|
||||
//============================================================================================================
|
||||
void CGroupMap::setScale(float newUserScale, const NLMISC::CVector2f &/* center */)
|
||||
|
@ -2257,7 +2296,6 @@ void CGroupMap::setScale(float newScale)
|
|||
setScale(newScale, mapCoords);
|
||||
}
|
||||
|
||||
|
||||
//============================================================================================================
|
||||
void CGroupMap::updateLandMarkList(TLandMarkButtonVect &lmVect)
|
||||
{
|
||||
|
@ -2289,6 +2327,63 @@ void CGroupMap::updateLandMarkTextList(TLandMarkTextVect &lmVect)
|
|||
}
|
||||
}
|
||||
|
||||
//============================================================================================================
|
||||
void CGroupMap::updateMatchedLandmarks()
|
||||
{
|
||||
CInterfaceGroup *gc = getParentContainer();
|
||||
if (!gc) return;
|
||||
|
||||
// visible landmark count
|
||||
CViewText *pVT = dynamic_cast<CViewText *>(gc->getView("lm_count"));
|
||||
if (pVT)
|
||||
{
|
||||
// show total landmark count if search filter has not been set
|
||||
uint c = _MatchedLandmarks.size();
|
||||
if (c == 0 && _LandmarkFilter.size() == 0)
|
||||
c = _UserLM.size();
|
||||
|
||||
pVT->setText(toString(c));
|
||||
}
|
||||
|
||||
// list of matched landmarks
|
||||
CGroupList *pL = dynamic_cast<CGroupList *>(gc->getGroup("lm_result"));
|
||||
if (!pL) return;
|
||||
|
||||
pL->clearGroups();
|
||||
|
||||
if (_LandmarkFilter.size() == 0) return;
|
||||
|
||||
// create result list
|
||||
for(uint k = 0; k < _MatchedLandmarks.size(); ++k)
|
||||
{
|
||||
std::vector<std::pair<string,string> > params;
|
||||
params.clear();
|
||||
params.push_back(std::pair<string,string>("id", toString("lm%d", k)));
|
||||
params.push_back(std::pair<string,string>("tooltip", _MatchedLandmarks[k].Title.toUtf8()));
|
||||
params.push_back(std::pair<string,string>("index", toString(k)));
|
||||
|
||||
CInterfaceGroup *g = CWidgetManager::getInstance()->getParser()->createGroupInstance("lm_search_result", pL->getId(), params);
|
||||
if (g)
|
||||
{
|
||||
pL->addChild(g);
|
||||
|
||||
CViewText* t = dynamic_cast<CViewText *>(g->getView("title"));
|
||||
if (t)
|
||||
{
|
||||
t->setSingleLineTextFormatTaged(_MatchedLandmarks[k].Title);
|
||||
}
|
||||
|
||||
CViewBitmap* b = dynamic_cast<CViewBitmap *>(g->getView("icon"));
|
||||
if (b)
|
||||
{
|
||||
b->setTexture(_MatchedLandmarks[k].Options.LandMarkTexNormal);
|
||||
b->setColor(_MatchedLandmarks[k].Options.ColorNormal);
|
||||
}
|
||||
}
|
||||
}
|
||||
pL->invalidateCoords();
|
||||
}
|
||||
|
||||
//============================================================================================================
|
||||
void CGroupMap::removeLandMarks(TLandMarkButtonVect &lm)
|
||||
{
|
||||
|
@ -2306,6 +2401,9 @@ void CGroupMap::removeLandMarks(TLandMarkButtonVect &lm)
|
|||
//============================================================================================================
|
||||
void CGroupMap::createLMWidgets(const std::vector<CContLandMark> &lms)
|
||||
{
|
||||
// disable any match in "world" mode
|
||||
bool notWorldMode = _CurMap->Name != "world";
|
||||
|
||||
for (uint32 k = 0; k < lms.size(); ++k)
|
||||
{
|
||||
const CContLandMark &rCLM =lms[k];
|
||||
|
@ -2314,6 +2412,12 @@ void CGroupMap::createLMWidgets(const std::vector<CContLandMark> &lms)
|
|||
worldToMap(mapPos, rCLM.Pos);
|
||||
|
||||
const ucstring ucsTmp(CStringManagerClient::getPlaceLocalizedName(rCLM.TitleTextID));
|
||||
const ucstring lcTitle = toLower(ucsTmp);
|
||||
|
||||
bool searchMatch = notWorldMode && _LandmarkFilter.size() > 0 && filterLandmark(lcTitle);
|
||||
if (searchMatch)
|
||||
_MatchedLandmarks.push_back(SMatchedLandmark(rCLM.Pos, ucsTmp, _ContinentLMOptions));
|
||||
|
||||
// Add button if not a region nor a place
|
||||
if ((rCLM.Type != CContLandMark::Region) && (rCLM.Type != CContLandMark::Place) &&
|
||||
(rCLM.Type != CContLandMark::Street))
|
||||
|
@ -2323,6 +2427,7 @@ void CGroupMap::createLMWidgets(const std::vector<CContLandMark> &lms)
|
|||
else
|
||||
addLandMark(_ContinentLM, mapPos, CI18N::get("uiStable"), _ContinentLMOptions);
|
||||
_ContinentLM.back()->Type = rCLM.Type;
|
||||
_ContinentLM.back()->SearchMatch = searchMatch;
|
||||
}
|
||||
else // just add a text
|
||||
{
|
||||
|
@ -2341,6 +2446,7 @@ void CGroupMap::createLMWidgets(const std::vector<CContLandMark> &lms)
|
|||
pNewText->setShadowColor(CRGBA(0,0,0,255));
|
||||
pNewText->setModulateGlobalColor(false);
|
||||
pNewText->Type = rCLM.Type;
|
||||
pNewText->SearchMatch = searchMatch;
|
||||
_ContinentText.push_back(pNewText);
|
||||
addView(pNewText);
|
||||
}
|
||||
|
@ -2369,6 +2475,7 @@ void CGroupMap::createLMWidgets(const std::vector<CContLandMark> &lms)
|
|||
void CGroupMap::createContinentLandMarks()
|
||||
{
|
||||
uint32 k;
|
||||
_MatchedLandmarks.clear();
|
||||
|
||||
if (_MapMode != MapMode_Normal) return;
|
||||
if (_CurMap == NULL) return;
|
||||
|
@ -2387,22 +2494,35 @@ void CGroupMap::createContinentLandMarks()
|
|||
if (_CurMap->Name == "world")
|
||||
{
|
||||
createLMWidgets(ContinentMngr.WorldMap);
|
||||
invalidateCoords();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_CurContinent == NULL) return;
|
||||
|
||||
// Continent Landmarks
|
||||
createLMWidgets(_CurContinent->ContLandMarks);
|
||||
// User Landmarks
|
||||
for(k = 0; k < _CurContinent->UserLandMarks.size(); ++k)
|
||||
else if (_CurContinent)
|
||||
{
|
||||
NLMISC::CVector2f mapPos;
|
||||
worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos);
|
||||
// Continent Landmarks
|
||||
createLMWidgets(_CurContinent->ContLandMarks);
|
||||
// User Landmarks
|
||||
for(k = 0; k < _CurContinent->UserLandMarks.size(); ++k)
|
||||
{
|
||||
NLMISC::CVector2f mapPos;
|
||||
worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos);
|
||||
|
||||
addLandMark(_UserLM, mapPos, _CurContinent->UserLandMarks[k].Title, getUserLandMarkOptions(k));
|
||||
CLandMarkOptions options = getUserLandMarkOptions(k);
|
||||
addLandMark(_UserLM, mapPos, _CurContinent->UserLandMarks[k].Title, options);
|
||||
|
||||
if (_LandmarkFilter.size() > 0)
|
||||
{
|
||||
if (filterLandmark(_CurContinent->UserLandMarks[k].Title))
|
||||
{
|
||||
_MatchedLandmarks.push_back(SMatchedLandmark(_CurContinent->UserLandMarks[k].Pos, _CurContinent->UserLandMarks[k].Title, options));
|
||||
}
|
||||
else
|
||||
{
|
||||
_UserLM.back()->setActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateMatchedLandmarks();
|
||||
invalidateCoords();
|
||||
}
|
||||
|
||||
|
@ -2421,6 +2541,20 @@ static void hideTeleportButtonsInPopupMenuIfNotEnoughPriv()
|
|||
if(ie) ie->setActive(showTeleport);
|
||||
}
|
||||
|
||||
//============================================================================================================
|
||||
void CGroupMap::setLandmarkFilter(const std::string &s)
|
||||
{
|
||||
_LandmarkFilter.clear();
|
||||
|
||||
if (!s.empty()) {
|
||||
ucstring ucs;
|
||||
ucs.fromUtf8(s);
|
||||
splitUCString(toLower(s), ucstring(" "), _LandmarkFilter);
|
||||
}
|
||||
|
||||
// recreate landmarks
|
||||
createContinentLandMarks();
|
||||
}
|
||||
|
||||
//============================================================================================================
|
||||
void CGroupMap::updateUserLandMarks()
|
||||
|
@ -2440,6 +2574,10 @@ void CGroupMap::updateUserLandMarks()
|
|||
worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos);
|
||||
|
||||
addLandMark(_UserLM, mapPos, _CurContinent->UserLandMarks[k].Title, getUserLandMarkOptions(k));
|
||||
|
||||
// hide landmark if not matching filter
|
||||
if (!filterLandmark(_CurContinent->UserLandMarks[k].Title))
|
||||
_UserLM.back()->setActive(false);
|
||||
}
|
||||
invalidateCoords();
|
||||
|
||||
|
@ -2482,6 +2620,22 @@ void CGroupMap::updateLandMarkButton(CLandMarkButton *lmb, const CLandMarkOption
|
|||
lmb->setColorPushed(options.ColorPushed);
|
||||
}
|
||||
|
||||
//============================================================================================================
|
||||
bool CGroupMap::filterLandmark(const ucstring &title) const
|
||||
{
|
||||
if (_LandmarkFilter.size() > 0)
|
||||
{
|
||||
ucstring lcTitle = toLower(title);
|
||||
for(uint i = 0; i< _LandmarkFilter.size(); ++i) {
|
||||
if (lcTitle.find(_LandmarkFilter[i]) == ucstring::npos) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//============================================================================================================
|
||||
void CGroupMap::addLandMark(TLandMarkButtonVect &destList, const NLMISC::CVector2f &pos, const ucstring &title, const CLandMarkOptions &options)
|
||||
{
|
||||
|
@ -2965,6 +3119,30 @@ void CGroupMap::targetLandmark(CCtrlButton *lm)
|
|||
}
|
||||
}
|
||||
|
||||
//=========================================================================================================
|
||||
void CGroupMap::targetLandmarkResult(uint32 index)
|
||||
{
|
||||
if (index > _MatchedLandmarks.size()) return;
|
||||
|
||||
CCompassTarget ct;
|
||||
ct.Pos = _MatchedLandmarks[index].Pos;
|
||||
ct.Name = _MatchedLandmarks[index].Title;
|
||||
// type sets compass arrow color
|
||||
ct.setType(CCompassTarget::UserLandMark);
|
||||
|
||||
centerOnWorldPos(ct.Pos);
|
||||
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId(_CompassId));
|
||||
if (gc)
|
||||
{
|
||||
gc->setActive(true);
|
||||
gc->setTarget(ct);
|
||||
gc->blink();
|
||||
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================================================
|
||||
void CGroupMap::getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos)
|
||||
{
|
||||
|
@ -3159,6 +3337,51 @@ SMap *CGroupMap::getParentMap(SMap *map)
|
|||
// ACTION HANDLERS //
|
||||
/////////////////////
|
||||
|
||||
//=========================================================================================================
|
||||
// Set landmark filter
|
||||
class CAHLandMarkFilter : public IActionHandler
|
||||
{
|
||||
virtual void execute (CCtrlBase * /* pCaller */, const string ¶ms )
|
||||
{
|
||||
string id = getParam(params, "map");
|
||||
|
||||
CGroupMap* map = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId(id));
|
||||
if (!map) return;
|
||||
|
||||
string text = getParam(params, "text");
|
||||
if (text.empty() && params.find("text=") == std::string::npos)
|
||||
{
|
||||
string group = getParam(params, "group");
|
||||
CGroupEditBox* eb = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(group));
|
||||
if (!eb) return;
|
||||
|
||||
text = eb->getInputString().toUtf8();
|
||||
}
|
||||
|
||||
map->setLandmarkFilter(text);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER(CAHLandMarkFilter, "land_mark_filter");
|
||||
|
||||
//=========================================================================================================
|
||||
// Landmark selected from result list
|
||||
class CAHLandMarkResultSelected : public IActionHandler
|
||||
{
|
||||
virtual void execute (CCtrlBase * /* pCaller */, const string ¶ms)
|
||||
{
|
||||
string id = getParam(params, "map");
|
||||
CGroupMap* map = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId(id));
|
||||
if (!map) return;
|
||||
|
||||
sint index;
|
||||
string nr = getParam(params, "index");
|
||||
if (!fromString(nr, index)) return;
|
||||
|
||||
map->targetLandmarkResult(index);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER(CAHLandMarkResultSelected, "land_mark_result_selected");
|
||||
|
||||
//=========================================================================================================
|
||||
// A land mark button has been pushed
|
||||
class CAHLandMarkSelected : public IActionHandler
|
||||
|
|
|
@ -139,6 +139,9 @@ public:
|
|||
|
||||
// center the map on the player
|
||||
void centerOnPlayer();
|
||||
// center current map on world coords (if not out of map bounds)
|
||||
void centerOnWorldPos(const NLMISC::CVector2f &worldPos);
|
||||
|
||||
void setPlayerPos(const NLMISC::CVector2f &p) { _PlayerPos = p; }
|
||||
NLMISC::CVector2f getPlayerPos() const { return _PlayerPos; }
|
||||
// test if player is currently panning the map
|
||||
|
@ -169,12 +172,16 @@ public:
|
|||
CLandMarkOptions getUserLandMarkOptions(uint32 lmindex) const;
|
||||
// target the given landmark
|
||||
void targetLandmark(CCtrlButton *lm);
|
||||
void targetLandmarkResult(uint32 index);
|
||||
// get the world position of a landmark or return vector Null if not found
|
||||
void getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos);
|
||||
|
||||
//Remove and re-create UserLandMarks
|
||||
void updateUserLandMarks();
|
||||
|
||||
// set landmarks visibility based text query
|
||||
void setLandmarkFilter(const std::string &s);
|
||||
|
||||
// set the selection axis pos & visibility
|
||||
void setSelectionAxis(bool active, const NLMISC::CVector2f &worldPos = NLMISC::CVector2f::Null);
|
||||
|
||||
|
@ -262,6 +269,7 @@ private:
|
|||
NLMISC::CVector2f Pos;
|
||||
CContLandMark::TContLMType Type;
|
||||
bool HandleEvents;
|
||||
bool SearchMatch;
|
||||
public:
|
||||
virtual bool handleEvent (const NLGUI::CEventDescriptor& event)
|
||||
{
|
||||
|
@ -279,6 +287,7 @@ private:
|
|||
Type = CContLandMark::Unknown;
|
||||
Pos.set(0.f, 0.f);
|
||||
HandleEvents = true;
|
||||
SearchMatch = false;
|
||||
}
|
||||
};
|
||||
typedef std::vector<CLandMarkButton*> TLandMarkButtonVect;
|
||||
|
@ -289,12 +298,14 @@ private:
|
|||
public:
|
||||
NLMISC::CVector2f Pos;
|
||||
CContLandMark::TContLMType Type;
|
||||
bool SearchMatch;
|
||||
|
||||
CLandMarkText(const TCtorParam ¶m)
|
||||
: CViewText(param)
|
||||
{
|
||||
Type = CContLandMark::Unknown;
|
||||
Pos.set(0.f, 0.f);
|
||||
SearchMatch = false;
|
||||
}
|
||||
};
|
||||
typedef std::vector<CLandMarkText*> TLandMarkTextVect;
|
||||
|
@ -448,6 +459,20 @@ private:
|
|||
typedef std::set<IDeco *> TDecos;
|
||||
TDecos _Decos;
|
||||
|
||||
// filter keywords
|
||||
std::vector<ucstring> _LandmarkFilter;
|
||||
struct SMatchedLandmark
|
||||
{
|
||||
SMatchedLandmark(const NLMISC::CVector2f pos, const ucstring &title, CLandMarkOptions opts)
|
||||
: Pos(pos), Title(title), Options(opts)
|
||||
{}
|
||||
NLMISC::CVector2f Pos;
|
||||
ucstring Title;
|
||||
|
||||
CLandMarkOptions Options;
|
||||
};
|
||||
std::vector<SMatchedLandmark> _MatchedLandmarks;
|
||||
|
||||
//////////////////////
|
||||
// Respawn handling //
|
||||
// //////////////// //
|
||||
|
@ -486,6 +511,7 @@ private:
|
|||
*/
|
||||
void updateLandMarkList(TLandMarkButtonVect &lm);
|
||||
void updateLandMarkTextList(TLandMarkTextVect &lm);
|
||||
void updateMatchedLandmarks();
|
||||
//
|
||||
void removeLandMarks(TLandMarkButtonVect &lm);
|
||||
/** create landmarks from the continent (and remove previous ones)
|
||||
|
@ -501,6 +527,9 @@ private:
|
|||
// update a landmark button
|
||||
void updateLandMarkButton(CLandMarkButton *lmb, const CLandMarkOptions &options);
|
||||
|
||||
// Test title against landmark filter
|
||||
bool filterLandmark(const ucstring &title) const;
|
||||
|
||||
// update the scale depending on the window size and the user scale
|
||||
void updateScale();
|
||||
|
||||
|
|
|
@ -471,6 +471,16 @@ CInterfaceManager::CInterfaceManager()
|
|||
CGroupHTML::options.appName = getUserAgentName();
|
||||
CGroupHTML::options.appVersion = getUserAgentVersion();
|
||||
CGroupHTML::options.curlMaxConnections = ClientCfg.CurlMaxConnections;
|
||||
if (!ClientCfg.CurlCABundle.empty())
|
||||
{
|
||||
string filename = CPath::lookup(ClientCfg.CurlCABundle, false);
|
||||
if (!filename.empty())
|
||||
{
|
||||
filename = CPath::getFullPath(filename, false);
|
||||
CGroupHTML::options.curlCABundle = filename;
|
||||
nlinfo("curl ca bundle '%s'", filename.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS );
|
||||
interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater();
|
||||
|
|
|
@ -491,6 +491,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
|
|||
luabind::module(L)
|
||||
[
|
||||
LUABIND_FUNC(getDbProp),
|
||||
LUABIND_FUNC(getDbProp64),
|
||||
LUABIND_FUNC(setDbProp),
|
||||
LUABIND_FUNC(addDbProp),
|
||||
LUABIND_FUNC(delDbProp),
|
||||
|
@ -2570,6 +2571,22 @@ sint32 CLuaIHMRyzom::getDbProp(const std::string &dbProp)
|
|||
}
|
||||
}
|
||||
|
||||
sint64 CLuaIHMRyzom::getDbProp64(const std::string &dbProp)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_getDbProp)
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp(dbProp, false);
|
||||
|
||||
if (node)
|
||||
return node->getValue64();
|
||||
else
|
||||
{
|
||||
debugInfo(toString("getDbProp(): '%s' dbProp Not found", dbProp.c_str()));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CLuaIHMRyzom::setDbProp(const std::string &dbProp, sint32 value)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_setDbProp)
|
||||
|
|
|
@ -120,6 +120,7 @@ private:
|
|||
///////////////////////////// Standard Lua stuff ends here //////////////////////////////////////////////
|
||||
|
||||
static sint32 getDbProp(const std::string &dbProp); // return 0 if not found.
|
||||
static sint64 getDbProp64(const std::string &dbProp); // return 0 if not found.
|
||||
static void setDbProp(const std::string &dbProp, sint32 value); // Nb: the db prop is not created if not present.
|
||||
static void addDbProp(const std::string &dbProp, sint32 value); // Nb: the db prop is created if not present.
|
||||
static void delDbProp(const std::string &dbProp);
|
||||
|
|
|
@ -777,6 +777,25 @@ public:
|
|||
};
|
||||
REGISTER_ACTION_HANDLER( CHandlerNewMacroCmdEdit, "new_macro_cmd_edit");
|
||||
|
||||
// ***************************************************************************
|
||||
// Called from context menu when we right click on a command of the new_macro container
|
||||
class CHandlerNewMacroCmdCopy: public IActionHandler
|
||||
{
|
||||
public:
|
||||
virtual void execute(CCtrlBase *pCaller, const string &/* Params */)
|
||||
{
|
||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||
sint nCmdNb = getCmdNbFromId(pCaller->getId());
|
||||
pMCM->CurrentEditMacro.addCommand(pMCM->CurrentEditMacro.Commands[nCmdNb].Name,
|
||||
pMCM->CurrentEditMacro.Commands[nCmdNb].Params,
|
||||
nCmdNb);
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CMacroCmdManager::getInstance()->EditCmd->deactivate();
|
||||
CAHManager::getInstance()->runActionHandler("new_macro_open",NULL);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER( CHandlerNewMacroCmdCopy, "new_macro_cmd_copy");
|
||||
|
||||
// ***************************************************************************
|
||||
// Called from context menu when we right click on a command of the new_macro container
|
||||
class CHandlerNewMacroCmdDelete: public IActionHandler
|
||||
|
@ -1087,6 +1106,29 @@ public:
|
|||
};
|
||||
REGISTER_ACTION_HANDLER( CHandlerMacrosEdit, "macros_edit");
|
||||
|
||||
// ***************************************************************************
|
||||
// Called from context menu on a macro
|
||||
class CHandlerMacrosCopy : public IActionHandler
|
||||
{
|
||||
public:
|
||||
virtual void execute(CCtrlBase *pCaller, const string &/* Params */)
|
||||
{
|
||||
sint nMacNb = getMacroFromId(pCaller->getId());
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||
|
||||
// duplicate selected macro
|
||||
CMacroCmd m = pMCM->getMacros()[nMacNb];
|
||||
m.ID = -1;
|
||||
m.Combo.Key = KeyCount;
|
||||
m.Combo.KeyButtons = noKeyButton;
|
||||
pMCM->addMacro(m, nMacNb+1);
|
||||
|
||||
CAHManager::getInstance()->runActionHandler("macros_open",NULL);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER( CHandlerMacrosCopy, "macros_copy");
|
||||
|
||||
// ***************************************************************************
|
||||
// Called from context menu on a macro
|
||||
class CHandlerMacrosDel : public IActionHandler
|
||||
|
|
|
@ -58,9 +58,37 @@
|
|||
<!-- ##### Root template matcher (cpp-server) ####### -->
|
||||
<!-- ######################################################### -->
|
||||
<xsl:template match="database_description" mode="cpp-server">
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// WARNING : this is a generated file, don't change it !
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// WARNING : this is a generated file, don't change it !
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "database_<xsl:value-of select="translate($bank, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>.h"
|
||||
|
||||
|
@ -125,8 +153,35 @@ void CBankAccessor_<xsl:value-of select="@name"/>::init()
|
|||
|
||||
#ifndef INCLUDED_<xsl:value-of select="concat($filename, '_', $bank)"/>_H
|
||||
#define INCLUDED_<xsl:value-of select="concat($filename, '_', $bank)"/>_H
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// WARNING : this is a generated file, don't change it !
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// WARNING : this is a generated file, don't change it !
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nel/misc/string_common.h"
|
||||
|
@ -693,4 +748,4 @@ void <xsl:call-template name="makeFullClassName"/>::init(ICDBStructNode *parent<
|
|||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace PVP_CLAN
|
|||
NL_STRING_CONVERSION_TABLE_ENTRY(Matis)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(Tryker)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(Zorai)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(Marauder)
|
||||
NL_END_STRING_CONVERSION_TABLE(TPVPClan, PVPClanConversion, Unknown)
|
||||
|
||||
TPVPClan fromString(const std::string & str)
|
||||
|
@ -69,6 +70,7 @@ namespace PVP_CLAN
|
|||
factionIndexes[Matis] = CStaticFames::getInstance().getFactionIndex("matis");
|
||||
factionIndexes[Tryker] = CStaticFames::getInstance().getFactionIndex("tryker");
|
||||
factionIndexes[Zorai] = CStaticFames::getInstance().getFactionIndex("zorai");
|
||||
factionIndexes[Marauder] = CStaticFames::getInstance().getFactionIndex("black_kami");
|
||||
|
||||
for (uint i = BeginClans; i <= EndClans; i++)
|
||||
nlassert( factionIndexes[i] != CStaticFames::INVALID_FACTION_INDEX );
|
||||
|
@ -84,7 +86,7 @@ namespace PVP_CLAN
|
|||
{
|
||||
// These names are in order of the enum TPVPClan
|
||||
// The first two clans, "None" and "Neutral", don't count. Subtract 2 from the lookup.
|
||||
std::string FactionNames[] = { "kami","karavan","fyros","matis","tryker","zorai" };
|
||||
std::string FactionNames[] = { "kami","karavan","fyros","matis","tryker","zorai","marauder" };
|
||||
|
||||
for (int looper = BeginClans; looper <= EndClans; looper += 1)
|
||||
{
|
||||
|
@ -111,6 +113,7 @@ namespace PVP_CLAN
|
|||
factionSheetIds[Matis] = "matis.faction";
|
||||
factionSheetIds[Tryker] = "tryker.faction";
|
||||
factionSheetIds[Zorai] = "zorai.faction";
|
||||
factionSheetIds[Marauder] = "marauder.faction";
|
||||
|
||||
for (uint i = BeginClans; i <= EndClans; i++)
|
||||
nlassert( factionSheetIds[i] != NLMISC::CSheetId::Unknown );
|
||||
|
|
|
@ -44,7 +44,9 @@ namespace PVP_CLAN
|
|||
Zorai,
|
||||
|
||||
EndCivs = Zorai, // end of civs
|
||||
EndClans = Zorai, // end of clans
|
||||
|
||||
Marauder,
|
||||
EndClans = Marauder, // end of clans
|
||||
|
||||
Unknown,
|
||||
NbClans = Unknown,
|
||||
|
|
|
@ -140,6 +140,55 @@ TOOL_TYPE::TCraftingToolType CSabrinaCom::getPhraseFaberPlanToolType(const std:
|
|||
return TOOL_TYPE::Unknown;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
BRICK_FAMILIES::TBrickFamily CSabrinaCom::getPhraseForageFamily(const std::vector<NLMISC::CSheetId> &phraseBricks) const
|
||||
{
|
||||
if(phraseBricks.empty())
|
||||
return BRICK_FAMILIES::Unknown;
|
||||
|
||||
BRICK_TYPE::EBrickType bType= _BC->getBrickType(phraseBricks[0]);
|
||||
if ( (bType == BRICK_TYPE::FORAGE_PROSPECTION) || (bType == BRICK_TYPE::FORAGE_EXTRACTION) )
|
||||
{
|
||||
for ( uint i=1; i<phraseBricks.size(); ++i ) // skip the root brick (index 0)
|
||||
{
|
||||
const CSheetId& brickId = phraseBricks[i];
|
||||
|
||||
uint indexInFamily;
|
||||
BRICK_FAMILIES::TBrickFamily brickFamily = _BC->getBrickFamily( brickId, indexInFamily );
|
||||
// FPMA=prospection, FEMA=extraction
|
||||
if ((brickFamily == BRICK_FAMILIES::BHFPMA || brickFamily == BRICK_FAMILIES::BHFEMA))
|
||||
{
|
||||
// remapping need to be used because prospection ecosystem families
|
||||
// have resource speciality inserted right in the middle
|
||||
// luckily indexInFamily and TBrickFamily is defined in the same order
|
||||
BRICK_FAMILIES::TBrickFamily bf = (BRICK_FAMILIES::TBrickFamily)(brickFamily + indexInFamily - 1);
|
||||
// A:matis, B:fyros, C:zorai, D:tryker, E:prime roots
|
||||
switch (bf) {
|
||||
case BRICK_FAMILIES::BHFPMA:
|
||||
case BRICK_FAMILIES::BHFPMB:
|
||||
return bf;
|
||||
case BRICK_FAMILIES::BHFPRMFMA:
|
||||
return BRICK_FAMILIES::BHFPMC;
|
||||
case BRICK_FAMILIES::BHFPRMFMB:
|
||||
return BRICK_FAMILIES::BHFPMD;
|
||||
case BRICK_FAMILIES::BHFPRMFMC:
|
||||
return BRICK_FAMILIES::BHFPME;
|
||||
case BRICK_FAMILIES::BHFEMA:
|
||||
case BRICK_FAMILIES::BHFEMB:
|
||||
case BRICK_FAMILIES::BHFEMC:
|
||||
case BRICK_FAMILIES::BHFEMD:
|
||||
case BRICK_FAMILIES::BHFEME:
|
||||
return bf;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return BRICK_FAMILIES::Unknown;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
NLMISC::CSheetId CSabrinaCom::getPhraseBestDisplayBrick(const std::vector<NLMISC::CSheetId> &phraseBricks) const
|
||||
{
|
||||
|
|
|
@ -91,6 +91,9 @@ public:
|
|||
/// For Faber.
|
||||
TOOL_TYPE::TCraftingToolType getPhraseFaberPlanToolType(const std::vector<NLMISC::CSheetId> &phraseBricks) const;
|
||||
|
||||
//// For Display, if ecosystem is in use, then return it
|
||||
BRICK_FAMILIES::TBrickFamily getPhraseForageFamily(const std::vector<NLMISC::CSheetId> &phraseBricks) const;
|
||||
|
||||
/// For Display. Return the brick (should be in phrase) used to display the phrase as icon
|
||||
NLMISC::CSheetId getPhraseBestDisplayBrick(const std::vector<NLMISC::CSheetId> &phraseBricks) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue