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() {
if (attack_sv > 28)
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) {
static unsigned int chatColor[] = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8080ff, 0xffff4040, 0xffff4040,
0xffff4040,0xff40ff40,0xff4040ff,0xff40ffff,0xffff40ff,0xffffff40,0xffffffff,0xff808080,0xff404040};
if(!showChat && i >2)
continue;
if(chatTiming[i]) {
chatTiming[i]--;
......
......@@ -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) {
hovered_card->is_hovered = false;
MoveCard(hovered_card, 5);
if(hovered_controler== 0)
mainGame->hideChat=false;
}
if(hovered_card->equipTarget)
hovered_card->equipTarget->is_showequip = false;
......@@ -1324,6 +1326,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(hovered_location == LOCATION_HAND) {
mcard->is_hovered = true;
MoveCard(mcard, 5);
if(hovered_controler== 0)
mainGame->hideChat=true;
}
if(mcard->equipTarget)
mcard->equipTarget->is_showequip = true;
......
......@@ -484,6 +484,8 @@ bool Game::Initialize() {
col.setAlpha(224);
env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col);
}
hideChat=false;
hideChatTimer=0;
return true;
}
void Game::MainLoop() {
......@@ -492,7 +494,7 @@ void Game::MainLoop() {
irr::core::matrix4 mProjection;
BuildProjectionMatrix(mProjection, -0.81f, 0.44f, -0.42f, 0.42f, 1.0f, 100.0f);
camera->setProjectionMatrix(mProjection);
mProjection.buildCameraLookAtMatrixLH(vector3df(3.95f, 8.0f, 7.8f), vector3df(3.95f, 0, 0), vector3df(0, 0, 1));
camera->setViewMatrixAffector(mProjection);
smgr->setAmbientLight(SColorf(1.0f, 1.0f, 1.0f));
......
......@@ -108,6 +108,9 @@ public:
std::list<FadingUnit> fadingList;
std::vector<int> logParam;
std::wstring chatMsg[5];
int hideChatTimer;
bool hideChat;
int chatTiming[5];
int chatType[5];
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