mirror of
https://github.com/SWG-Source/client-tools.git
synced 2026-09-11 23:45:12 -04:00
remove old SOE ticket submission system in SwgClient, part of old support system
This commit is contained in:
@@ -200,7 +200,6 @@ namespace CuiActions
|
||||
MAKE_ACTION(questHelper);
|
||||
MAKE_ACTION(roadmap);
|
||||
MAKE_ACTION(expertise);
|
||||
MAKE_ACTION(ticketSubmission);
|
||||
MAKE_ACTION(harassmentMessage); // displayed right before the normal harassment form
|
||||
MAKE_ACTION(harassmentMessageFromKBSearch); // displayed before a ticket submittal from a 'Community Standards' category search
|
||||
MAKE_ACTION(droidCommand);
|
||||
|
||||
+1
-13
@@ -820,15 +820,6 @@
|
||||
<ClCompile Include="..\..\src\shared\page\SwgCuiTicketPurchase.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Optimized|Win32'">MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\shared\page\SwgCuiTicketSubmission.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Optimized|Win32'">MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\shared\page\SwgCuiTicketSubmission_Instructions.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Optimized|Win32'">MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\shared\page\SwgCuiTicketSubmission_NewTicket.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Optimized|Win32'">MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\shared\page\SwgCuiToolbar.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Optimized|Win32'">MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
@@ -1147,9 +1138,6 @@
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTcgControl.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTcgWindow.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTicketPurchase.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTicketSubmission.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTicketSubmission_Instructions.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTicketSubmission_NewTicket.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiToolbar.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTrade.h" />
|
||||
<ClInclude Include="..\..\src\shared\page\SwgCuiTrade_Panel.h" />
|
||||
@@ -1185,4 +1173,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
#include "../../src/shared/page/SwgCuiTicketSubmission.h"
|
||||
-1
@@ -1 +0,0 @@
|
||||
#include "../../src/shared/page/SwgCuiTicketSubmission_Instructions.h"
|
||||
-1
@@ -1 +0,0 @@
|
||||
#include "../../src/shared/page/SwgCuiTicketSubmission_NewTicket.h"
|
||||
@@ -117,7 +117,7 @@ m_characterButton(0),
|
||||
m_expertiseButton(0),
|
||||
m_optionsButton(0),
|
||||
m_commandsButton(0),
|
||||
m_serviceButton(0),
|
||||
//m_serviceButton(0),
|
||||
m_submenuButton(0),
|
||||
m_shipDetailsButton(0),
|
||||
m_homePortButton(0),
|
||||
@@ -152,7 +152,7 @@ m_opacityCallback (0)
|
||||
getCodeDataObject (TUIButton, m_expertiseButton, "buttonExpertise");
|
||||
getCodeDataObject (TUIButton, m_optionsButton, "buttonOptions");
|
||||
getCodeDataObject (TUIButton, m_commandsButton, "buttonCommands");
|
||||
getCodeDataObject (TUIButton, m_serviceButton, "buttonService");
|
||||
//getCodeDataObject (TUIButton, m_serviceButton, "buttonService");
|
||||
getCodeDataObject (TUIButton, m_submenuButton, "buttonMenu");
|
||||
getCodeDataObject (TUIButton, m_shipDetailsButton, "buttonShipDetails", true);
|
||||
getCodeDataObject (TUIButton, m_homePortButton, "buttonHomePort", true);
|
||||
@@ -185,7 +185,7 @@ m_opacityCallback (0)
|
||||
registerMediatorObject (*m_expertiseButton, true);
|
||||
registerMediatorObject (*m_optionsButton, true);
|
||||
registerMediatorObject (*m_commandsButton, true);
|
||||
registerMediatorObject (*m_serviceButton, true);
|
||||
//registerMediatorObject (*m_serviceButton, true);
|
||||
registerMediatorObject (*m_submenuButton, true);
|
||||
registerMediatorObject (*m_myCollectionsButton, true);
|
||||
//registerMediatorObject (*m_tcgButton, true);
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
UIButton * m_expertiseButton;
|
||||
UIButton * m_optionsButton;
|
||||
UIButton * m_commandsButton;
|
||||
UIButton * m_serviceButton;
|
||||
//UIButton * m_serviceButton;
|
||||
UIButton * m_submenuButton;
|
||||
UIButton * m_shipDetailsButton;
|
||||
UIButton * m_homePortButton;
|
||||
|
||||
+6
-9
@@ -7,9 +7,6 @@
|
||||
|
||||
#include "swgClientUserInterface/FirstSwgClientUserInterface.h"
|
||||
#include "swgClientUserInterface/SwgCuiHarassmentMessage.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission_NewTicket.h"
|
||||
|
||||
#include "clientGame/ClientObject.h"
|
||||
#include "clientGame/Game.h"
|
||||
#include "clientUserInterface/CuiActionManager.h"
|
||||
@@ -50,16 +47,16 @@ SwgCuiHarassmentMessage::SwgCuiHarassmentMessage(UIPage &page)
|
||||
//-----------------------------------------------------------------
|
||||
SwgCuiHarassmentMessage::~SwgCuiHarassmentMessage()
|
||||
{
|
||||
|
||||
|
||||
m_cancelButton = NULL;
|
||||
m_continueButton = NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
void SwgCuiHarassmentMessage::performActivate()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
@@ -74,8 +71,8 @@ void SwgCuiHarassmentMessage::OnButtonPressed(UIWidget *context)
|
||||
{
|
||||
if(m_fromKBSearch)
|
||||
{
|
||||
SwgCuiTicketSubmission::NewTicket::setTicketSubmissionEnabled(true);
|
||||
IGNORE_RETURN(CuiActionManager::performAction (CuiActions::ticketSubmission, Unicode::emptyString));
|
||||
//SwgCuiTicketSubmission::NewTicket::setTicketSubmissionEnabled(true);
|
||||
//IGNORE_RETURN(CuiActionManager::performAction (CuiActions::ticketSubmission, Unicode::emptyString));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -106,7 +103,7 @@ SwgCuiHarassmentMessage *SwgCuiHarassmentMessage::createInto(UIPage *parent)
|
||||
IGNORE_RETURN(parent->MoveChild(dupe, UIBaseObject::Top));
|
||||
dupe->Link();
|
||||
dupe->Center();
|
||||
|
||||
|
||||
SwgCuiHarassmentMessage * const creation = new SwgCuiHarassmentMessage(*dupe);
|
||||
return creation;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ m_toggleDownTimeNames (0.0f)
|
||||
CuiActionManager::addAction (CuiActions::notepad, this, false);
|
||||
CuiActionManager::addAction (CuiActions::setName, this, false);
|
||||
|
||||
CuiActionManager::addAction (CuiActions::ticketSubmission, this, false);
|
||||
//CuiActionManager::addAction (CuiActions::ticketSubmission, this, false);
|
||||
CuiActionManager::addAction (CuiActions::harassmentMessage, this, false);
|
||||
CuiActionManager::addAction (CuiActions::harassmentMessageFromKBSearch,this, false);
|
||||
CuiActionManager::addAction (CuiActions::manageShipComponents, this, false);
|
||||
@@ -1185,10 +1185,10 @@ bool SwgCuiHudAction::performAction (const std::string & id, const Unicode::Str
|
||||
SwgCuiWebBrowserManager::setURL(finalUrl.c_str(), true);
|
||||
}
|
||||
|
||||
else if (id == CuiActions::ticketSubmission) // Ticket Submission tabbed form
|
||||
{
|
||||
m_mediator.m_windowManager->spawnTicketSubmission();
|
||||
}
|
||||
//else if (id == CuiActions::ticketSubmission) // Ticket Submission tabbed form
|
||||
//{
|
||||
//m_mediator.m_windowManager->spawnTicketSubmission();
|
||||
//}
|
||||
|
||||
else if (id == CuiActions::harassmentMessage) // Message displayed prior to a harrassment report
|
||||
{
|
||||
|
||||
+52
-80
@@ -97,7 +97,6 @@
|
||||
#include "swgClientUserInterface/SwgCuiSystemMessage.h"
|
||||
#include "swgClientUserInterface/SwgCuiTargets.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketPurchase.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission.h"
|
||||
#include "swgClientUserInterface/SwgCuiToolbar.h"
|
||||
#include "swgClientUserInterface/SwgCuiTrade.h"
|
||||
#include "swgSharedNetworkMessages/ConsentRequestMessage.h"
|
||||
@@ -133,7 +132,7 @@ namespace SwgCuiHudWindowManagerNamespace
|
||||
const std::string cms_newbieTutorialRequestOpenHolocron ("openHolocron");
|
||||
const std::string cms_newbieTutorialRequestCloseHolocron ("closeHolocron");
|
||||
|
||||
bool ms_spaceChatVisible = true;
|
||||
bool ms_spaceChatVisible = true;
|
||||
}
|
||||
|
||||
using namespace SwgCuiHudWindowManagerNamespace;
|
||||
@@ -141,9 +140,9 @@ using namespace SwgCuiHudWindowManagerNamespace;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
SwgCuiHudWindowManager::ItemRequestInfo::ItemRequestInfo (const ClientObject * _containerObject, const std::string & _slotName, bool _newWindow) :
|
||||
container (),
|
||||
slotName (_slotName),
|
||||
newWindow (_newWindow)
|
||||
container (),
|
||||
slotName (_slotName),
|
||||
newWindow (_newWindow)
|
||||
{
|
||||
if (_containerObject)
|
||||
container = CachedNetworkId (*_containerObject);
|
||||
@@ -183,10 +182,10 @@ m_doubleToolbarPage(0),
|
||||
m_singleToolbar(0),
|
||||
m_doubleToolbar(0)
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
UIPage * mediatorPage = 0;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
hud.getCodeDataObject (TUIPage, mediatorPage, "SystemMessage");
|
||||
@@ -196,7 +195,7 @@ m_doubleToolbar(0)
|
||||
sysMessage->activate ();
|
||||
m_workspace->addMediator (*sysMessage);
|
||||
} //lint !e429 custodial pointer not freed or returned. The Workspace owns it.
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
hud.getCodeDataObject (TUIPage, mediatorPage, "SystemMessageNoob");
|
||||
@@ -206,7 +205,7 @@ m_doubleToolbar(0)
|
||||
sysMessageNoob->activate ();
|
||||
m_workspace->addMediator (*sysMessageNoob);
|
||||
} //lint !e429 custodial pointer not freed or returned. The Workspace owns it.
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
hud.getCodeDataObject (TUIPage, m_singleToolbarPage, "Toolbar");
|
||||
@@ -247,7 +246,7 @@ m_doubleToolbar(0)
|
||||
m_highlightMediator->activate ();
|
||||
m_workspace->addMediator (*m_highlightMediator);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
hud.getCodeDataObject (TUIPage, mediatorPage, "ButtonBar");
|
||||
@@ -259,7 +258,7 @@ m_doubleToolbar(0)
|
||||
m_buttonBar->activate ();
|
||||
m_workspace->addMediator (*m_buttonBar);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
{
|
||||
hud.getCodeDataObject (TUIPage, mediatorPage, "incap");
|
||||
@@ -269,7 +268,7 @@ m_doubleToolbar(0)
|
||||
incap->setStickyVisible (true);
|
||||
m_workspace->addMediator (*incap);
|
||||
} //lint !e429 custodial pointer not freed or returned. The Workspace owns it.
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
hud.getCodeDataObject (TUIPage, mediatorPage, "ChatWindow");
|
||||
@@ -314,7 +313,7 @@ m_doubleToolbar(0)
|
||||
if (CuiPreferences::getDpsMeterEnabled() && !Game::isHudSceneTypeSpace())
|
||||
CuiMediatorFactory::activateInWorkspace (CuiMediatorTypes::WS_DpsMeter);
|
||||
|
||||
CuiIMEManager::GetCuiIMEManager()->SetIMEIndicator(Game::isHudSceneTypeSpace() ? CuiMediatorTypes::WS_IMEIndicatorSpace : CuiMediatorTypes::WS_IMEIndicator);
|
||||
CuiIMEManager::GetCuiIMEManager()->SetIMEIndicator(Game::isHudSceneTypeSpace() ? CuiMediatorTypes::WS_IMEIndicatorSpace : CuiMediatorTypes::WS_IMEIndicator);
|
||||
|
||||
if (CuiPreferences::getVoiceShowFlybar())
|
||||
CuiMediatorFactory::activateInWorkspace(CuiMediatorTypes::WS_VoiceFlyBar);
|
||||
@@ -337,7 +336,7 @@ SwgCuiHudWindowManager::~SwgCuiHudWindowManager ()
|
||||
if (m_workspace != NULL)
|
||||
{
|
||||
m_workspace->setEffectors(0, 0);
|
||||
|
||||
|
||||
if (m_chatWindowMediator != NULL)
|
||||
{
|
||||
m_workspace->removeMediator (*m_chatWindowMediator);
|
||||
@@ -434,7 +433,7 @@ SwgCuiHudWindowManager::~SwgCuiHudWindowManager ()
|
||||
m_doubleToolbar->release();
|
||||
m_doubleToolbar = 0;
|
||||
}
|
||||
|
||||
|
||||
m_workspace = 0;
|
||||
m_blinkingMediator = 0;
|
||||
}
|
||||
@@ -492,7 +491,7 @@ void SwgCuiHudWindowManager::handlePerformDeactivate ()
|
||||
{
|
||||
if (!m_WindowManagerActive)
|
||||
return;
|
||||
|
||||
|
||||
disconnectFromMessage (Game::Messages::SCENE_CHANGED);
|
||||
disconnectFromMessage (ResourceHarvesterActivatePageMessage::MESSAGE_TYPE);
|
||||
disconnectFromMessage (UnnamedMessages::ConnectionServerConnectionClosed);
|
||||
@@ -524,17 +523,17 @@ void SwgCuiHudWindowManager::handlePerformDeactivate ()
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void SwgCuiHudWindowManager::receiveMessage(const MessageDispatch::Emitter & , const MessageDispatch::MessageBase & message)
|
||||
{
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
if (message.isType (Game::Messages::SCENE_CHANGED))
|
||||
{
|
||||
if (m_mfdStatusMediator != NULL)
|
||||
{
|
||||
m_mfdStatusMediator->setTarget (dynamic_cast<TangibleObject *>(Game::getPlayer ()));
|
||||
}
|
||||
CuiIMEManager::GetCuiIMEManager()->SetIMEIndicator(Game::isHudSceneTypeSpace() ? CuiMediatorTypes::WS_IMEIndicatorSpace : CuiMediatorTypes::WS_IMEIndicator);
|
||||
CuiIMEManager::GetCuiIMEManager()->SetIMEIndicator(Game::isHudSceneTypeSpace() ? CuiMediatorTypes::WS_IMEIndicatorSpace : CuiMediatorTypes::WS_IMEIndicator);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@@ -701,7 +700,7 @@ void SwgCuiHudWindowManager::receiveMessage(const MessageDispatch::Emitter & , c
|
||||
Archive::ReadIterator ri = NON_NULL (safe_cast<const GameNetworkMessage*> (&message))->getByteStream ().begin ();
|
||||
const NewbieTutorialHighlightUIElement newbieTutorialHighlightUIElement (ri);
|
||||
|
||||
const std::string & widgetPath = newbieTutorialHighlightUIElement.getWidgetPath();
|
||||
const std::string & widgetPath = newbieTutorialHighlightUIElement.getWidgetPath();
|
||||
if(_strnicmp(widgetPath.c_str(), "/GroundHUD.ButtonBar.buttonsComposite", 37) == 0)
|
||||
{
|
||||
if(m_buttonBar)
|
||||
@@ -809,7 +808,7 @@ void SwgCuiHudWindowManager::toggleInventory (ClientObject * container)
|
||||
m_inventory = NON_NULL (createInventory (container, std::string (), true));
|
||||
m_inventory->fetch ();
|
||||
}
|
||||
|
||||
|
||||
if (m_inventory->isActive ())
|
||||
{
|
||||
m_inventory->deactivate ();
|
||||
@@ -887,33 +886,6 @@ void SwgCuiHudWindowManager::toggleService ()
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void SwgCuiHudWindowManager::spawnTicketSubmission ()
|
||||
{
|
||||
CuiMediator * mediator = m_workspace->findMediatorByType (typeid (SwgCuiTicketSubmission));
|
||||
|
||||
if (mediator)
|
||||
{
|
||||
if (!mediator->isActive ())
|
||||
{
|
||||
mediator->activate ();
|
||||
m_workspace->focusMediator (*mediator, true);
|
||||
mediator->setEnabled (true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SwgCuiTicketSubmission * const ticketSubmission = SwgCuiTicketSubmission::createInto (&m_workspace->getPage ());
|
||||
ticketSubmission->setSettingsAutoSizeLocation (true, true);
|
||||
ticketSubmission->getPage ().Center ();
|
||||
m_workspace->addMediator (*ticketSubmission);
|
||||
ticketSubmission->activate ();
|
||||
m_workspace->focusMediator (*ticketSubmission, true);
|
||||
ticketSubmission->setEnabled (true);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void SwgCuiHudWindowManager::spawnHarassmentMessage ()
|
||||
{
|
||||
SwgCuiHarassmentMessage * mediator = safe_cast<SwgCuiHarassmentMessage *>(m_workspace->findMediatorByType (typeid (SwgCuiHarassmentMessage)));
|
||||
@@ -965,7 +937,7 @@ void SwgCuiHudWindowManager::spawnHarassmentMessageFromKBSearch ()
|
||||
void SwgCuiHudWindowManager::spawnCharacterSheet (CreatureObject *creatureToExamine)
|
||||
{
|
||||
CuiMediator * mediator = m_workspace->findMediatorByType (typeid (SwgCuiCharacterSheet));
|
||||
|
||||
|
||||
if (mediator)
|
||||
{
|
||||
SwgCuiCharacterSheet *cs = dynamic_cast<SwgCuiCharacterSheet*>(mediator);
|
||||
@@ -1078,7 +1050,7 @@ void SwgCuiHudWindowManager::spawnNewMacro (const Unicode::String& params)
|
||||
void SwgCuiHudWindowManager::spawnMissionDetails ()
|
||||
{
|
||||
CuiMediator * const mediator = m_workspace->findMediatorByType (typeid (SwgCuiMissionDetails));
|
||||
|
||||
|
||||
if (mediator)
|
||||
{
|
||||
toggleMediator (*mediator);
|
||||
@@ -1135,7 +1107,7 @@ void SwgCuiHudWindowManager::spawnCustomizationWindow(NetworkId const & objectId
|
||||
void SwgCuiHudWindowManager::spawnRatingWindow(std::string const & windowTitle, std::string const & windowText)
|
||||
{
|
||||
SwgCuiRating * const mediator = safe_cast<SwgCuiRating * const>(CuiMediatorFactory::activateInWorkspace (CuiMediatorTypes::WS_Rating));
|
||||
|
||||
|
||||
mediator->setWindowTitle(windowTitle);
|
||||
mediator->setWindowDescription(windowText);
|
||||
}
|
||||
@@ -1244,7 +1216,7 @@ void SwgCuiHudWindowManager::onTradeRequested (const NetworkId & other)
|
||||
void SwgCuiHudWindowManager::onTradeRequestDenied (const NetworkId & recipient)
|
||||
{
|
||||
const CachedNetworkId id (recipient);
|
||||
|
||||
|
||||
const ClientObject * const obj = safe_cast<ClientObject *>(id.getObject ());
|
||||
|
||||
Unicode::String result;
|
||||
@@ -1262,7 +1234,7 @@ void SwgCuiHudWindowManager::onTradeRequestDenied (const Networ
|
||||
void SwgCuiHudWindowManager::onTradeRequestDeniedPlayerBusy (const NetworkId & recipient)
|
||||
{
|
||||
const CachedNetworkId id (recipient);
|
||||
|
||||
|
||||
const ClientObject * const obj = safe_cast<ClientObject *>(id.getObject ());
|
||||
|
||||
Unicode::String result;
|
||||
@@ -1280,7 +1252,7 @@ void SwgCuiHudWindowManager::onTradeRequestDeniedPlayerBusy (const Networ
|
||||
void SwgCuiHudWindowManager::onTradeRequestDeniedPlayerUnreachable (const NetworkId & recipient)
|
||||
{
|
||||
const CachedNetworkId id (recipient);
|
||||
|
||||
|
||||
const ClientObject * const obj = safe_cast<ClientObject *>(id.getObject ());
|
||||
|
||||
Unicode::String result;
|
||||
@@ -1344,7 +1316,7 @@ void SwgCuiHudWindowManager::updateWindowManager (const float elapsedTime)
|
||||
m_pendingRequestTrade = false;
|
||||
m_pendingRequestTradeId = NetworkId::cms_invalid;
|
||||
}
|
||||
|
||||
|
||||
if (!m_pendingItemOpenInfo->empty ())
|
||||
{
|
||||
for (ItemRequestInfoVector::iterator it = m_pendingItemOpenInfo->begin (); it != m_pendingItemOpenInfo->end (); ++it)
|
||||
@@ -1354,7 +1326,7 @@ void SwgCuiHudWindowManager::updateWindowManager (const float elapsedTime)
|
||||
|
||||
if (!container)
|
||||
continue;
|
||||
|
||||
|
||||
if (info.newWindow)
|
||||
{
|
||||
|
||||
@@ -1363,26 +1335,26 @@ void SwgCuiHudWindowManager::updateWindowManager (const float elapsedTime)
|
||||
if(inputMap)
|
||||
{
|
||||
uint32 val = inputMap->getShiftState();
|
||||
if(val & CuiM_BITS_SHIFT)
|
||||
if(val & CuiM_BITS_SHIFT)
|
||||
{
|
||||
bool bLootRuleOK = true;
|
||||
CreatureObject const * const player = Game::getPlayerCreature();
|
||||
if (player)
|
||||
{
|
||||
GroupObject const * const group = safe_cast<GroupObject const *>(player->getGroup().getObject());
|
||||
if (group
|
||||
&& (group->getLootRule() == GroupObject::LR_lottery
|
||||
if (group
|
||||
&& (group->getLootRule() == GroupObject::LR_lottery
|
||||
|| group->getLootRule() == GroupObject::LR_random
|
||||
)
|
||||
)
|
||||
{
|
||||
bLootRuleOK = false;
|
||||
bLootRuleOK = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(bLootRuleOK)
|
||||
{
|
||||
ClientObject * const containedBy = const_cast<ClientObject *>(safe_cast<const ClientObject *>(ContainerInterface::getContainedByObject (*container)));
|
||||
ClientObject * const containedBy = const_cast<ClientObject *>(safe_cast<const ClientObject *>(ContainerInterface::getContainedByObject (*container)));
|
||||
if(containedBy)
|
||||
{
|
||||
CreatureObject * const creature = containedBy->asCreatureObject ();
|
||||
@@ -1393,7 +1365,7 @@ void SwgCuiHudWindowManager::updateWindowManager (const float elapsedTime)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// end handle shift click looting
|
||||
@@ -1408,7 +1380,7 @@ void SwgCuiHudWindowManager::updateWindowManager (const float elapsedTime)
|
||||
inventory = NON_NULL (createInventory (container, info.slotName, false));
|
||||
else
|
||||
CuiInventoryManager::notifyItemClosed(*container, info.slotName);
|
||||
|
||||
|
||||
inventory->activate ();
|
||||
inventory->setEnabled (true);
|
||||
m_workspace->focusMediator (*inventory, true);
|
||||
@@ -1422,11 +1394,11 @@ void SwgCuiHudWindowManager::updateWindowManager (const float elapsedTime)
|
||||
for (ItemRequestInfoVector::iterator it = m_pendingItemCloseInfo->begin (); it != m_pendingItemCloseInfo->end (); ++it)
|
||||
{
|
||||
const ItemRequestInfo & info = *it;
|
||||
|
||||
|
||||
ClientObject * const container = safe_cast<ClientObject *>(info.container.getObject ());
|
||||
if (container)
|
||||
{
|
||||
//-- there can be more than one open container UI on a given container
|
||||
//-- there can be more than one open container UI on a given container
|
||||
SwgCuiInventory::InventoryVector iv;
|
||||
SwgCuiInventory::findInventoryPagesByContainer (container->getNetworkId (), info.slotName, iv);
|
||||
|
||||
@@ -1484,13 +1456,13 @@ void SwgCuiHudWindowManager::receiveDroppedChatTab (const UIPoin
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void SwgCuiHudWindowManager::onItemOpenRequest (const CuiInventoryManager::Messages::ItemOpenRequest::Payload & msg)
|
||||
{
|
||||
{
|
||||
ClientObject * const container = msg.first;
|
||||
const std::string & slotname = msg.second;
|
||||
|
||||
|
||||
if (!container)
|
||||
return;
|
||||
|
||||
|
||||
m_pendingItemOpenInfo->push_back (ItemRequestInfo (container, slotname, false));
|
||||
}
|
||||
|
||||
@@ -1506,14 +1478,14 @@ void SwgCuiHudWindowManager::onItemOpenRequestNewWindow (const CuiInventoryManag
|
||||
|
||||
m_pendingItemOpenInfo->push_back (ItemRequestInfo (container, slotname, true));
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void SwgCuiHudWindowManager::onItemCloseAllInstances (const CuiInventoryManager::Messages::ItemCloseAllInstances::Payload & msg)
|
||||
{
|
||||
ClientObject * const container = msg.first;
|
||||
const std::string & slotname = msg.second;
|
||||
|
||||
|
||||
if (!container)
|
||||
return;
|
||||
|
||||
@@ -1537,12 +1509,12 @@ void SwgCuiHudWindowManager::onCreatureDamageTaken (const CreatureObject & creat
|
||||
{
|
||||
if (Game::isViewFirstPerson ())
|
||||
{
|
||||
int h = 0, a = 0, m = 0;
|
||||
int h = 0, a = 0, m = 0;
|
||||
creature.getAccumulatedHamDamage (h, a, m);
|
||||
|
||||
displayPlayerDamageText (h, a, m);
|
||||
}
|
||||
|
||||
|
||||
if (m_mfdStatusMediator != NULL)
|
||||
{
|
||||
m_mfdStatusMediator->getPage ().SetEnabled (false);
|
||||
@@ -1560,23 +1532,23 @@ void SwgCuiHudWindowManager::displayPlayerDamageText (int h, int a, int m)
|
||||
{
|
||||
const UIPoint & mfdLocation = m_mfdStatusMediator->getPage ().GetWorldLocation ();
|
||||
const UIPoint & centerPoint = mfdLocation + (m_mfdStatusMediator->getPage ().GetSize () / 2L);
|
||||
|
||||
|
||||
const UIPoint & screenCenter = m_workspace->getPage ().GetSize () / 2L;
|
||||
|
||||
|
||||
UIPoint pt = mfdLocation;
|
||||
|
||||
|
||||
bool leftRight = false;
|
||||
|
||||
|
||||
if (centerPoint.x < screenCenter.x)
|
||||
{
|
||||
pt.x += m_mfdStatusMediator->getPage ().GetWidth ();
|
||||
leftRight = true;
|
||||
}
|
||||
|
||||
|
||||
SwgCuiAllTargets * const allTargets = safe_cast<SwgCuiAllTargets *>(m_workspace->findMediatorByType (typeid (SwgCuiAllTargets)));
|
||||
|
||||
|
||||
NOT_NULL (allTargets);
|
||||
|
||||
|
||||
allTargets->displayDamageText (pt, leftRight, h, a, m);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-5
@@ -79,7 +79,6 @@ public:
|
||||
|
||||
void toggleCommunity ();
|
||||
void toggleService ();
|
||||
void spawnTicketSubmission ();
|
||||
void spawnHarassmentMessage ();
|
||||
void spawnHarassmentMessageFromKBSearch ();
|
||||
void spawnShipComponentManagement (NetworkId const & shipId, NetworkId const & terminalId) const;
|
||||
@@ -112,7 +111,7 @@ public:
|
||||
void onItemCloseAllInstances (const std::pair<ClientObject *, std::string> & msg);
|
||||
void onCreatureDamageTaken (const CreatureObject & creature);
|
||||
void onStartingLocationsReceived (const stdvector<std::pair <StartingLocationData, bool> >::fwd & locations);
|
||||
|
||||
|
||||
void displayPlayerDamageText (int h, int a, int m);
|
||||
|
||||
void spawnChatRoomWho (uint32 roomId);
|
||||
@@ -133,7 +132,7 @@ protected:
|
||||
void setStatusMediator(SwgCuiMfdStatus * status);
|
||||
|
||||
MessageDispatch::Callback * m_callback;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
SwgCuiHudWindowManager (const SwgCuiHudWindowManager &);
|
||||
@@ -214,5 +213,3 @@ inline CuiWorkspace & SwgCuiHudWindowManager::getWorkspace()
|
||||
//======================================================================
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ void SwgCuiService::KnowledgeBase::OnButtonPressed(UIWidget *context)
|
||||
}
|
||||
else if (context == m_didNotHelpButton)
|
||||
{
|
||||
IGNORE_RETURN(CuiActionManager::performAction(CuiActions::ticketSubmission, Unicode::emptyString));
|
||||
//IGNORE_RETURN(CuiActionManager::performAction(CuiActions::ticketSubmission, Unicode::emptyString));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-211
@@ -1,211 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission.cpp
|
||||
// Copyright Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgClientUserInterface/FirstSwgClientUserInterface.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission.h"
|
||||
|
||||
#include "clientGame/CustomerServiceManager.h"
|
||||
#include "clientUserInterface/CuiActionManager.h"
|
||||
#include "clientUserInterface/CuiActions.h"
|
||||
#include "clientUserInterface/CuiCsManagerListener.h"
|
||||
#include "clientUserInterface/CuiManager.h"
|
||||
#include "clientUserInterface/CuiMessageBox.h"
|
||||
#include "clientUserInterface/CuiStringIdsCustomerService.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission_Instructions.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission_NewTicket.h"
|
||||
#include "UIButton.h"
|
||||
#include "UIData.h"
|
||||
#include "UIDataSource.h"
|
||||
#include "UITabbedPane.h"
|
||||
|
||||
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
SwgCuiTicketSubmission::SwgCuiTicketSubmission(UIPage &page)
|
||||
: CuiMediator("SwgCuiTicketSubmission", page)
|
||||
, UIEventCallback()
|
||||
, m_bugButton(NULL)
|
||||
, m_harassmentButton(NULL)
|
||||
, m_doneButton(NULL)
|
||||
, m_instructionsMediator(NULL)
|
||||
, m_newTicketMediator(NULL)
|
||||
, m_tabs(NULL)
|
||||
{
|
||||
UIPage *subPage = NULL;
|
||||
|
||||
getCodeDataObject(TUIPage, subPage, "pageInstructions");
|
||||
m_instructionsMediator = new Instructions(*subPage, *this);
|
||||
m_instructionsMediator->fetch();
|
||||
m_mediators[M_instructions] = m_instructionsMediator;
|
||||
|
||||
getCodeDataObject(TUIPage, subPage, "pageSubmitTicket");
|
||||
m_newTicketMediator = new NewTicket(*subPage, *this);
|
||||
m_newTicketMediator->fetch();
|
||||
m_mediators[M_newTicket] = m_newTicketMediator;
|
||||
|
||||
getCodeDataObject(TUIButton, m_bugButton, "buttonBug");
|
||||
registerMediatorObject(*m_bugButton, true);
|
||||
|
||||
getCodeDataObject(TUIButton, m_harassmentButton, "buttonHarassment");
|
||||
registerMediatorObject(*m_harassmentButton, true);
|
||||
|
||||
getCodeDataObject(TUIButton, m_doneButton, "buttonDone");
|
||||
registerMediatorObject(*m_doneButton, true);
|
||||
|
||||
getCodeDataObject (TUITabbedPane, m_tabs, "tabs");
|
||||
registerMediatorObject(*m_tabs, true);
|
||||
|
||||
m_tabs->SetActiveTab(-1);
|
||||
m_tabs->SetActiveTab(M_instructions);
|
||||
|
||||
IGNORE_RETURN(setState(MS_closeable));
|
||||
IGNORE_RETURN(setState(MS_closeDeactivates));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
SwgCuiTicketSubmission::~SwgCuiTicketSubmission()
|
||||
{
|
||||
m_instructionsMediator->release();
|
||||
m_instructionsMediator = NULL;
|
||||
|
||||
m_newTicketMediator->release();
|
||||
m_newTicketMediator = NULL;
|
||||
|
||||
m_bugButton = NULL;
|
||||
m_harassmentButton = NULL;
|
||||
m_doneButton = NULL;
|
||||
m_tabs = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::performActivate()
|
||||
{
|
||||
OnTabbedPaneChanged(m_tabs);
|
||||
|
||||
CuiManager::requestPointer(true);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::performDeactivate()
|
||||
{
|
||||
CuiManager::requestPointer(false);
|
||||
|
||||
// Deactivate all the mediators
|
||||
m_instructionsMediator->deactivate();
|
||||
m_newTicketMediator->deactivate();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::OnButtonPressed(UIWidget *context)
|
||||
{
|
||||
|
||||
|
||||
if (context == m_doneButton)
|
||||
{
|
||||
deactivate();
|
||||
}
|
||||
else if(context == m_bugButton)
|
||||
{
|
||||
//open the BugSubmission page
|
||||
IGNORE_RETURN(CuiActionManager::performAction (CuiActions::bugReport, Unicode::emptyString));
|
||||
}
|
||||
else if(context == m_harassmentButton)
|
||||
{
|
||||
//open the Harassment Report page
|
||||
if (CustomerServiceManager::getServiceCategoryList().empty())
|
||||
{
|
||||
CuiMessageBox::createInfoBox(CuiStringIdsCustomerService::server_no_connection.localize());
|
||||
|
||||
}
|
||||
else if (CustomerServiceManager::getTicketList().size() >= static_cast<unsigned int>(CustomerServiceManager::getMaximumNumberOfCustomerServiceTicketsAllowed()))
|
||||
{
|
||||
CuiMessageBox::createInfoBox(CuiStringIdsCustomerService::harassment_ticket_limit.localize());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
IGNORE_RETURN(CuiActionManager::performAction (CuiActions::harassmentMessage, Unicode::emptyString));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
SwgCuiTicketSubmission *SwgCuiTicketSubmission::createInto(UIPage *parent)
|
||||
{
|
||||
NOT_NULL (parent);
|
||||
UIPage * const page = NON_NULL(safe_cast<UIPage *>(parent->GetObjectFromPath("/PDA.Service.ticketSubmission", TUIPage)));
|
||||
UIPage * const dupe = NON_NULL(safe_cast<UIPage *>(page->DuplicateObject()));
|
||||
IGNORE_RETURN(parent->AddChild(dupe));
|
||||
IGNORE_RETURN(parent->MoveChild(dupe, UIBaseObject::Top));
|
||||
dupe->Link();
|
||||
dupe->Center();
|
||||
|
||||
SwgCuiTicketSubmission * const creation = new SwgCuiTicketSubmission(*dupe);
|
||||
return creation;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::OnTabbedPaneChanged(UIWidget *context)
|
||||
{
|
||||
if (context == m_tabs)
|
||||
{
|
||||
if ((m_tabs->GetActiveTab() >= 0) &&
|
||||
(m_tabs->GetActiveTab() < static_cast<int>(M_count)))
|
||||
{
|
||||
// Deactivate all the pages
|
||||
|
||||
for (int i = 0; i < static_cast<int>(M_count); ++i)
|
||||
{
|
||||
if (i != m_tabs->GetActiveTab())
|
||||
{
|
||||
m_mediators[i]->deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
m_mediators[m_tabs->GetActiveTab()]->activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
void SwgCuiTicketSubmission::switchToInstructionsTab()
|
||||
{
|
||||
if(m_tabs != NULL)
|
||||
{
|
||||
m_tabs->SetActiveTab(M_instructions);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
void SwgCuiTicketSubmission::switchToNewTicketTab()
|
||||
{
|
||||
if (m_tabs != NULL)
|
||||
{
|
||||
m_tabs->SetActiveTab(M_newTicket);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ======================================================================
|
||||
-73
@@ -1,73 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission.h
|
||||
// Copyright Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_SwgCuiTicketSubmission_H
|
||||
#define INCLUDED_SwgCuiTicketSubmission_H
|
||||
|
||||
#include "clientUserInterface/CuiMediator.h"
|
||||
#include "UIEventCallback.h"
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
namespace MessageDispatch
|
||||
{
|
||||
class Callback;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
class SwgCuiTicketSubmission : public CuiMediator
|
||||
, public UIEventCallback
|
||||
{
|
||||
public:
|
||||
|
||||
explicit SwgCuiTicketSubmission(UIPage & page);
|
||||
|
||||
virtual void performActivate();
|
||||
virtual void performDeactivate();
|
||||
|
||||
void switchToInstructionsTab();
|
||||
void switchToNewTicketTab();
|
||||
|
||||
|
||||
static SwgCuiTicketSubmission *createInto(UIPage *parent);
|
||||
|
||||
virtual void OnTabbedPaneChanged(UIWidget *context);
|
||||
|
||||
class Instructions;
|
||||
class NewTicket;
|
||||
|
||||
private:
|
||||
|
||||
virtual void OnButtonPressed(UIWidget *context);
|
||||
|
||||
enum Mediator
|
||||
{
|
||||
M_instructions,
|
||||
M_newTicket,
|
||||
M_count
|
||||
};
|
||||
|
||||
CuiMediator *m_mediators[M_count];
|
||||
UIButton *m_bugButton;
|
||||
UIButton *m_harassmentButton;
|
||||
UIButton *m_doneButton;
|
||||
Instructions *m_instructionsMediator;
|
||||
NewTicket *m_newTicketMediator;
|
||||
|
||||
UITabbedPane *m_tabs;
|
||||
|
||||
// Disabled
|
||||
|
||||
~SwgCuiTicketSubmission();
|
||||
SwgCuiTicketSubmission(SwgCuiTicketSubmission const &rhs);
|
||||
SwgCuiTicketSubmission &operator =(SwgCuiTicketSubmission const &rhs);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // INCLUDED_SwgTicketSubmission_H
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission_Instructions.cpp
|
||||
// Copyright Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgClientUserInterface/FirstSwgClientUserInterface.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission_Instructions.h"
|
||||
#include "clientGame/CustomerServiceManager.h"
|
||||
#include "clientUserInterface/CuiActionManager.h"
|
||||
#include "clientUserInterface/CuiActions.h"
|
||||
#include "clientUserInterface/CuiCsManagerListener.h"
|
||||
#include "clientUserInterface/CuiMediatorFactory.h"
|
||||
#include "clientUserInterface/CuiMessageBox.h"
|
||||
#include "sharedMessageDispatch/Transceiver.h"
|
||||
#include "UIButton.h"
|
||||
#include "UIMessage.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission::Instructions
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
SwgCuiTicketSubmission::Instructions::Instructions(UIPage &page, SwgCuiTicketSubmission &ticketSubmissionMediator)
|
||||
: CuiMediator("SwgCuiTicketSubmission_Instructions", page)
|
||||
, m_callBack(new MessageDispatch::Callback)
|
||||
, UIEventCallback()
|
||||
, m_ticketSubmissionMediator(ticketSubmissionMediator)
|
||||
, m_bugButton(NULL)
|
||||
, m_newTicketButton(NULL)
|
||||
|
||||
|
||||
{
|
||||
|
||||
getCodeDataObject(TUIButton, m_bugButton, "buttonBug");
|
||||
registerMediatorObject(*m_bugButton, true);
|
||||
|
||||
getCodeDataObject(TUIButton, m_newTicketButton, "buttonTicket");
|
||||
registerMediatorObject(*m_newTicketButton, true);
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
SwgCuiTicketSubmission::Instructions::~Instructions()
|
||||
{
|
||||
m_bugButton = NULL;
|
||||
m_newTicketButton = NULL;
|
||||
|
||||
delete m_callBack;
|
||||
m_callBack = NULL;
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::Instructions::performActivate()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::Instructions::performDeactivate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::Instructions::OnButtonPressed(UIWidget *context)
|
||||
{
|
||||
if(context == m_bugButton)
|
||||
{
|
||||
//open the BugSubmission page
|
||||
IGNORE_RETURN(CuiActionManager::performAction (CuiActions::bugReport, Unicode::emptyString));
|
||||
}
|
||||
|
||||
else if(context == m_newTicketButton)
|
||||
{
|
||||
m_ticketSubmissionMediator.switchToNewTicketTab();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::Instructions::update(float deltaTimeSecs)
|
||||
{
|
||||
CuiMediator::update (deltaTimeSecs);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
|
||||
// ======================================================================
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission_Instructions.h
|
||||
// Copyright Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_SwgCuiTicketSubmission_Instructions_H
|
||||
#define INCLUDED_SwgCuiTicketSubmission_Instructions_H
|
||||
|
||||
#include "clientUserInterface/CuiMediator.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission.h"
|
||||
#include "UIEventCallback.h"
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
namespace MessageDispatch
|
||||
{
|
||||
class Callback;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
class SwgCuiTicketSubmission::Instructions : public CuiMediator
|
||||
, public UIEventCallback
|
||||
{
|
||||
public:
|
||||
|
||||
Instructions(UIPage &page, SwgCuiTicketSubmission &communityMediator);
|
||||
|
||||
virtual void performActivate();
|
||||
virtual void performDeactivate();
|
||||
virtual void update(float deltaTimeSecs);
|
||||
|
||||
virtual void OnButtonPressed(UIWidget *context);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
MessageDispatch::Callback *m_callBack;
|
||||
SwgCuiTicketSubmission &m_ticketSubmissionMediator;
|
||||
UIButton *m_bugButton;
|
||||
UIButton *m_newTicketButton;
|
||||
|
||||
// Disabled
|
||||
|
||||
~Instructions();
|
||||
Instructions(Instructions const &rhs);
|
||||
Instructions &operator =(Instructions const &rhs);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // INCLUDED_SwgCuiTicketSubmission_Instructions_H
|
||||
-378
@@ -1,378 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission_NewTicket.cpp
|
||||
// Copyright Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "swgClientUserInterface/FirstSwgClientUserInterface.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission_NewTicket.h"
|
||||
|
||||
#include "clientGame/ClientObject.h"
|
||||
#include "clientGame/Game.h"
|
||||
#include "clientUserInterface/CuiActionManager.h"
|
||||
#include "clientUserInterface/CuiActions.h"
|
||||
#include "clientUserInterface/CuiChatRoomManager.h"
|
||||
#include "clientUserInterface/CuiStringIdsCustomerService.h"
|
||||
#include "sharedMessageDispatch/Transceiver.h"
|
||||
#include "sharedNetworkMessages/CustomerServiceCategory.h"
|
||||
#include "sharedNetworkMessages/CustomerServiceTicket.h"
|
||||
#include "UIButton.h"
|
||||
#include "UIComboBox.h"
|
||||
#include "UIData.h"
|
||||
#include "UIText.h"
|
||||
#include <vector>
|
||||
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission_NewTicketNamespace
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
namespace SwgCuiTicketSubmission_NewTicketNamespace
|
||||
{
|
||||
bool s_ticketSubmissionEnabled = true;
|
||||
};
|
||||
|
||||
using namespace SwgCuiTicketSubmission_NewTicketNamespace;
|
||||
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission_NewTicket
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
SwgCuiTicketSubmission::NewTicket::NewTicket(UIPage &page, SwgCuiTicketSubmission &ticketSubmissionMediator)
|
||||
: CuiMediator("SwgCuiTicketSubmission_NewTicket", page)
|
||||
, m_callBack(new MessageDispatch::Callback)
|
||||
, UIEventCallback()
|
||||
, m_ticketSubmissionMediator(ticketSubmissionMediator)
|
||||
, m_submitButton(NULL)
|
||||
, m_topicComboBox(NULL)
|
||||
, m_subTopicComboBox(NULL)
|
||||
, m_commentTextBox(NULL)
|
||||
, m_submitTimer(0.0f)
|
||||
, m_enableWidgets(false)
|
||||
{
|
||||
m_callBack->connect(*this, &SwgCuiTicketSubmission::NewTicket::onRequestTicketsResponse, static_cast<CustomerServiceManager::Messages::RequestTicketsResponse *>(0));
|
||||
m_callBack->connect(*this, &SwgCuiTicketSubmission::NewTicket::onRequestTicketCategoriesResponse, static_cast<CustomerServiceManager::Messages::RequestTicketCategoriesResponse *>(0));
|
||||
|
||||
getCodeDataObject(TUIButton, m_submitButton, "buttonSubmit");
|
||||
registerMediatorObject(*m_submitButton, true);
|
||||
|
||||
getCodeDataObject(TUIComboBox, m_topicComboBox, "comboTopic");
|
||||
registerMediatorObject(*m_topicComboBox, true);
|
||||
m_topicComboBox->Clear();
|
||||
m_topicComboBox->SetSelectedIndex(-1);
|
||||
|
||||
getCodeDataObject(TUIComboBox, m_subTopicComboBox, "comboSubtopic");
|
||||
registerMediatorObject(*m_subTopicComboBox, true);
|
||||
m_subTopicComboBox->Clear();
|
||||
m_subTopicComboBox->SetSelectedIndex(-1);
|
||||
|
||||
getCodeDataObject(TUIText, m_commentTextBox, "textboxComments");
|
||||
registerMediatorObject(*m_commentTextBox, true);
|
||||
m_commentTextBox->Clear();
|
||||
|
||||
setIsUpdating(true);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
SwgCuiTicketSubmission::NewTicket::~NewTicket()
|
||||
{
|
||||
delete m_callBack;
|
||||
m_callBack = NULL;
|
||||
|
||||
m_submitButton = NULL;
|
||||
m_topicComboBox = NULL;
|
||||
m_subTopicComboBox = NULL;
|
||||
m_commentTextBox = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::performActivate()
|
||||
{
|
||||
m_enableWidgets = false;
|
||||
|
||||
m_commentTextBox->SetLocalText(Unicode::emptyString);
|
||||
|
||||
|
||||
|
||||
if (CustomerServiceManager::getServiceCategoryList().empty())
|
||||
{
|
||||
|
||||
m_topicComboBox->Clear();
|
||||
IGNORE_RETURN(m_topicComboBox->AddItem(CuiStringIdsCustomerService::querying_server.localize(), std::string("")));
|
||||
m_topicComboBox->SetSelectedIndex(0);
|
||||
}
|
||||
else if (CustomerServiceManager::getTicketList().size() >= static_cast<size_t>(CustomerServiceManager::getMaximumNumberOfCustomerServiceTicketsAllowed()))
|
||||
{
|
||||
|
||||
m_enableWidgets = false;
|
||||
|
||||
m_topicComboBox->Clear();
|
||||
IGNORE_RETURN(m_topicComboBox->AddItem(CuiStringIdsCustomerService::category_ticket_limit.localize(), std::string("")));
|
||||
m_commentTextBox->SetLocalText(CuiStringIdsCustomerService::ticket_limit_message.localize());
|
||||
m_topicComboBox->SetSelectedIndex(0);
|
||||
}
|
||||
|
||||
else if (m_topicComboBox->GetItemCount() <= 1)
|
||||
{
|
||||
populateCategories();
|
||||
}
|
||||
|
||||
// If there is some valid categories, allow ticket submission
|
||||
|
||||
if (m_topicComboBox->GetItemCount() > 1)
|
||||
{
|
||||
m_enableWidgets = true;
|
||||
}
|
||||
|
||||
|
||||
m_topicComboBox->SetEnabled(m_enableWidgets);
|
||||
m_subTopicComboBox->SetEnabled(m_enableWidgets);
|
||||
m_commentTextBox->SetEnabled(m_enableWidgets);
|
||||
|
||||
if (!m_enableWidgets)
|
||||
{
|
||||
m_subTopicComboBox->Clear();
|
||||
m_subTopicComboBox->SetSelectedIndex(-1);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::performDeactivate()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::OnGenericSelectionChanged(UIWidget *context)
|
||||
{
|
||||
|
||||
if (context == m_topicComboBox)
|
||||
{
|
||||
populateSubCategories();
|
||||
std::string categoryString;
|
||||
m_topicComboBox->GetSelectedIndexName(categoryString);
|
||||
int const category = atoi(categoryString.c_str());
|
||||
|
||||
setTicketSubmissionEnabled(true);
|
||||
if(isCommunityStandardsCategory(category))
|
||||
{
|
||||
|
||||
setTicketSubmissionEnabled(false);
|
||||
IGNORE_RETURN(CuiActionManager::performAction (CuiActions::harassmentMessageFromKBSearch, Unicode::emptyString));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::OnButtonPressed(UIWidget *context)
|
||||
{
|
||||
if (context == m_submitButton)
|
||||
{
|
||||
if ( (CustomerServiceManager::getTicketList().size() < static_cast<size_t>(CustomerServiceManager::getMaximumNumberOfCustomerServiceTicketsAllowed()))
|
||||
&& !Unicode::getTrim(m_commentTextBox->GetLocalText()).empty())
|
||||
{
|
||||
Object const *object = Game::getConstPlayer();
|
||||
|
||||
if (object != NULL)
|
||||
{
|
||||
ClientObject const *clientObject = dynamic_cast<ClientObject const *>(object);
|
||||
|
||||
if (clientObject != NULL)
|
||||
{
|
||||
std::string playerName(Unicode::wideToNarrow(clientObject->getLocalizedName()));
|
||||
|
||||
std::string categoryString;
|
||||
m_topicComboBox->GetSelectedIndexName(categoryString);
|
||||
unsigned int const category = static_cast<unsigned int>(atoi(categoryString.c_str()));
|
||||
|
||||
std::string subCategoryString;
|
||||
m_subTopicComboBox->GetSelectedIndexName(subCategoryString);
|
||||
unsigned int const subCategory = static_cast<unsigned int>(atoi(subCategoryString.c_str()));
|
||||
|
||||
Unicode::String details(Unicode::getTrim(m_commentTextBox->GetLocalText()));
|
||||
|
||||
CustomerServiceManager::requestTicketCreation(playerName, category, subCategory, details, Unicode::emptyString);
|
||||
|
||||
// Set the ticket wait timer
|
||||
|
||||
m_submitTimer = 60.0f;
|
||||
|
||||
// Let the user know the ticket was submitted
|
||||
|
||||
CuiChatRoomManager::sendPrelocalizedChat(CuiStringIdsCustomerService::create_ticket_submitted.localize());
|
||||
|
||||
// Clear the comments box so the player can't spam messages
|
||||
|
||||
m_commentTextBox->Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::populateCategories()
|
||||
{
|
||||
if (!CustomerServiceManager::getServiceCategoryList().empty())
|
||||
{
|
||||
// See if we need to populate the categories
|
||||
|
||||
setComboBoxItems(*m_topicComboBox, CustomerServiceManager::getServiceCategoryList());
|
||||
|
||||
m_commentTextBox->SetLocalText(Unicode::emptyString);
|
||||
|
||||
// Set the proper category and sub-category items
|
||||
|
||||
OnGenericSelectionChanged(m_topicComboBox);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_topicComboBox->Clear();
|
||||
m_topicComboBox->AddItem(CuiStringIdsCustomerService::no_categories_found.localize(), "");
|
||||
m_topicComboBox->SetSelectedIndex(0);
|
||||
|
||||
m_subTopicComboBox->Clear();
|
||||
m_subTopicComboBox->SetSelectedIndex(-1);
|
||||
|
||||
m_commentTextBox->SetLocalText(CuiStringIdsCustomerService::server_no_connection.localize());
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::populateSubCategories()
|
||||
{
|
||||
if ((m_topicComboBox->GetItemCount() > 0) &&
|
||||
(m_topicComboBox->GetItemCount() == static_cast<int>(CustomerServiceManager::getServiceCategoryList().size())))
|
||||
{
|
||||
unsigned int const selectedIndex = static_cast<unsigned int>(m_topicComboBox->GetSelectedIndex());
|
||||
|
||||
std::vector<CustomerServiceCategory> const &subCategories = CustomerServiceManager::getServiceCategoryList()[selectedIndex].getSubCategories();
|
||||
|
||||
setComboBoxItems(*m_subTopicComboBox, subCategories);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::onRequestTicketsResponse(CustomerServiceManager::Messages::RequestTicketsResponse::Response const &)
|
||||
{
|
||||
performActivate();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::onRequestTicketCategoriesResponse(CustomerServiceManager::Messages::RequestTicketCategoriesResponse::Response const &)
|
||||
{
|
||||
performActivate();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::setComboBoxItems(UIComboBox &comboBox, stdvector<CustomerServiceCategory>::fwd const &items) const
|
||||
{
|
||||
comboBox.Clear();
|
||||
|
||||
std::vector<CustomerServiceCategory>::const_iterator iterCategoryList = items.begin();
|
||||
|
||||
for (; iterCategoryList != items.end(); ++iterCategoryList)
|
||||
{
|
||||
Unicode::String const & categoryName = iterCategoryList->m_categoryName;
|
||||
|
||||
char categoryId[256];
|
||||
snprintf(categoryId, sizeof(categoryId), "%d", iterCategoryList->m_categoryId);
|
||||
|
||||
IGNORE_RETURN(comboBox.AddItem(categoryName, categoryId));
|
||||
}
|
||||
|
||||
if (comboBox.GetItemCount() > 0)
|
||||
{
|
||||
comboBox.SetSelectedIndex(0);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::update(float deltaTimeSecs)
|
||||
{
|
||||
if (m_submitTimer > 0.0f)
|
||||
{
|
||||
m_submitTimer -= deltaTimeSecs;
|
||||
}
|
||||
|
||||
setSubmitButtonStatus();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::setSubmitButtonStatus()
|
||||
{
|
||||
bool bTooManyTicketsAlready = !(CustomerServiceManager::getTicketList().size() < static_cast<size_t>(CustomerServiceManager::getMaximumNumberOfCustomerServiceTicketsAllowed()));
|
||||
|
||||
|
||||
if (isTicketSubmissionEnabled()
|
||||
&& !bTooManyTicketsAlready
|
||||
&& m_enableWidgets
|
||||
&& (m_submitTimer <= 0.0f))
|
||||
{
|
||||
m_submitButton->SetEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_submitButton->SetEnabled(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
bool SwgCuiTicketSubmission::NewTicket::isCommunityStandardsCategory(int category) const
|
||||
{
|
||||
|
||||
CustomerServiceManager::TicketCategoryList const &ticketCategoryList = CustomerServiceManager::getServiceCategoryList();
|
||||
CustomerServiceManager::TicketCategoryList::const_iterator iterCategoryList = ticketCategoryList.begin();
|
||||
|
||||
|
||||
for (; iterCategoryList != ticketCategoryList.end(); ++iterCategoryList)
|
||||
{
|
||||
CustomerServiceCategory const &customerServiceCategory = (*iterCategoryList);
|
||||
Unicode::String const & categoryName = customerServiceCategory.getCategoryName();
|
||||
|
||||
if (categoryName == CuiStringIdsCustomerService::category_community_standard.localize())
|
||||
{
|
||||
if(category == customerServiceCategory.getCategoryId())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void SwgCuiTicketSubmission::NewTicket::setTicketSubmissionEnabled(const bool enabled)
|
||||
{
|
||||
s_ticketSubmissionEnabled = enabled;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
bool SwgCuiTicketSubmission::NewTicket::isTicketSubmissionEnabled()
|
||||
{
|
||||
return s_ticketSubmissionEnabled;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// SwgCuiTicketSubmission_NewTicket.h
|
||||
// Copyright Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_SwgCuiTicketSubmission_NewTicket_H
|
||||
#define INCLUDED_SwgCuiTicketSubmission_NewTicket_H
|
||||
|
||||
#include "clientGame/CustomerServiceManager.h"
|
||||
#include "clientUserInterface/CuiMediator.h"
|
||||
#include "swgClientUserInterface/SwgCuiTicketSubmission.h"
|
||||
#include "UIEventCallback.h"
|
||||
|
||||
class UIButton;
|
||||
class UIComboBox;
|
||||
class UIText;
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
namespace MessageDispatch
|
||||
{
|
||||
class Callback;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
class SwgCuiTicketSubmission::NewTicket : public CuiMediator
|
||||
, public UIEventCallback
|
||||
{
|
||||
public:
|
||||
|
||||
NewTicket(UIPage &page, SwgCuiTicketSubmission &ticketSubmissionMediator);
|
||||
|
||||
virtual void performActivate();
|
||||
virtual void performDeactivate();
|
||||
|
||||
virtual void OnGenericSelectionChanged(UIWidget *context);
|
||||
virtual void OnButtonPressed(UIWidget *context);
|
||||
|
||||
void onRequestTicketsResponse(CustomerServiceManager::Messages::RequestTicketsResponse::Response const &response);
|
||||
void onRequestTicketCategoriesResponse(CustomerServiceManager::Messages::RequestTicketCategoriesResponse::Response const &response);
|
||||
|
||||
virtual void update(float deltaTimeSecs);
|
||||
|
||||
static void setTicketSubmissionEnabled(const bool enabled);
|
||||
static bool isTicketSubmissionEnabled();
|
||||
|
||||
private:
|
||||
|
||||
void setComboBoxItems(UIComboBox &comboBox, stdvector<CustomerServiceCategory>::fwd const &items) const;
|
||||
void populateCategories();
|
||||
void populateSubCategories();
|
||||
void setSubmitButtonStatus();
|
||||
|
||||
MessageDispatch::Callback *m_callBack;
|
||||
SwgCuiTicketSubmission & m_ticketSubmissionMediator;
|
||||
UIButton * m_submitButton;
|
||||
UIComboBox * m_topicComboBox;
|
||||
UIComboBox * m_subTopicComboBox;
|
||||
UIText * m_commentTextBox;
|
||||
float m_submitTimer;
|
||||
|
||||
|
||||
bool m_enableWidgets;
|
||||
|
||||
bool isCommunityStandardsCategory(int category) const;
|
||||
|
||||
// Disabled
|
||||
|
||||
~NewTicket();
|
||||
NewTicket(NewTicket const &rhs);
|
||||
NewTicket &operator =(NewTicket const &rhs);
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif // INCLUDED_SwgCuiTicketSubmission_NewTicket_H
|
||||
Reference in New Issue
Block a user