You need to sign in or sign up before continuing.
Commit a13ff5ef authored by Matteo Serva's avatar Matteo Serva

partially hide the chat wall of text on mouseover

parent 543b72e2
...@@ -666,10 +666,24 @@ void Game::DrawSpec() { ...@@ -666,10 +666,24 @@ void Game::DrawSpec() {
if (attack_sv > 28) if (attack_sv > 28)
attack_sv = 0; attack_sv = 0;
} }
bool showChat=true;
if(hideChat)
{
showChat=false;
hideChatTimer = 15;
}
else if (hideChatTimer > 0)
{
showChat= false;
hideChatTimer--;
}
for(int i = 0; i < 5; ++i) { for(int i = 0; i < 5; ++i) {
static unsigned int chatColor[] = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8080ff, 0xffff4040, 0xffff4040, static unsigned int chatColor[] = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8080ff, 0xffff4040, 0xffff4040,
0xffff4040,0xff40ff40,0xff4040ff,0xff40ffff,0xffff40ff,0xffffff40,0xffffffff,0xff808080,0xff404040}; 0xffff4040,0xff40ff40,0xff4040ff,0xff40ffff,0xffff40ff,0xffffff40,0xffffffff,0xff808080,0xff404040};
if(!showChat && i >2)
continue;
if(chatTiming[i]) { if(chatTiming[i]) {
chatTiming[i]--; chatTiming[i]--;
......
...@@ -1305,6 +1305,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1305,6 +1305,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(hovered_card->location == LOCATION_HAND && !mainGame->dInfo.is_shuffling && mainGame->dInfo.curMsg != MSG_SHUFFLE_HAND) { if(hovered_card->location == LOCATION_HAND && !mainGame->dInfo.is_shuffling && mainGame->dInfo.curMsg != MSG_SHUFFLE_HAND) {
hovered_card->is_hovered = false; hovered_card->is_hovered = false;
MoveCard(hovered_card, 5); MoveCard(hovered_card, 5);
if(hovered_controler== 0)
mainGame->hideChat=false;
} }
if(hovered_card->equipTarget) if(hovered_card->equipTarget)
hovered_card->equipTarget->is_showequip = false; hovered_card->equipTarget->is_showequip = false;
...@@ -1324,6 +1326,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1324,6 +1326,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(hovered_location == LOCATION_HAND) { if(hovered_location == LOCATION_HAND) {
mcard->is_hovered = true; mcard->is_hovered = true;
MoveCard(mcard, 5); MoveCard(mcard, 5);
if(hovered_controler== 0)
mainGame->hideChat=true;
} }
if(mcard->equipTarget) if(mcard->equipTarget)
mcard->equipTarget->is_showequip = true; mcard->equipTarget->is_showequip = true;
......
...@@ -484,6 +484,8 @@ bool Game::Initialize() { ...@@ -484,6 +484,8 @@ bool Game::Initialize() {
col.setAlpha(224); col.setAlpha(224);
env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col); env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col);
} }
hideChat=false;
hideChatTimer=0;
return true; return true;
} }
void Game::MainLoop() { void Game::MainLoop() {
......
...@@ -108,6 +108,9 @@ public: ...@@ -108,6 +108,9 @@ public:
std::list<FadingUnit> fadingList; std::list<FadingUnit> fadingList;
std::vector<int> logParam; std::vector<int> logParam;
std::wstring chatMsg[5]; std::wstring chatMsg[5];
int hideChatTimer;
bool hideChat;
int chatTiming[5]; int chatTiming[5];
int chatType[5]; int chatType[5];
unsigned short linePattern; unsigned short linePattern;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment