Commit f5718611 authored by DailyShana's avatar DailyShana

update

we should guide users to use right click
parent c8eb0b1b
......@@ -1468,6 +1468,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case irr::EMIE_RMOUSE_LEFT_UP: {
if(mainGame->dInfo.isReplay)
break;
s32 x = event.MouseInput.X;
s32 y = event.MouseInput.Y;
irr::core::position2di pos(x, y);
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(pos) == mainGame->btnCancelOrFinish)
mainGame->chkHideHintButton->setChecked(true);
if(mainGame->gameConf.control_mode == 1 && event.MouseInput.X > 300) {
mainGame->ignore_chain = event.MouseInput.isRightPressed();
mainGame->always_chain = false;
......@@ -1611,8 +1617,18 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break;
s32 x = event.MouseInput.X;
s32 y = event.MouseInput.Y;
hovered_location = 0;
irr::core::position2di pos(x, y);
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(pos) == mainGame->btnCancelOrFinish) {
mainGame->stTip->setVisible(true);
wchar_t formatBuffer[2048];
myswprintf(formatBuffer, dataManager.GetSysString(1700), mainGame->btnCancelOrFinish->getText());
irr::core::dimension2d<unsigned int> dtip = mainGame->textFont->getDimension(formatBuffer) + irr::core::dimension2d<unsigned int>(10, 10);
mainGame->stTip->setRelativePosition(recti(x - 10 - dtip.Width, y - 10 - dtip.Height, x - 10, y - 10));
mainGame->stTip->setText(formatBuffer);
} else
mainGame->stTip->setVisible(false);
hovered_location = 0;
if(x < 300)
break;
ClientCard* mcard = 0;
......
......@@ -367,10 +367,6 @@ bool Game::Initialize() {
stHintMsg->setBackgroundColor(0xc0ffffff);
stHintMsg->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stHintMsg->setVisible(false);
stTip = env->addStaticText(L"", rect<s32>(0, 0, 150, 150), false, true, 0, -1, true);
stTip->setBackgroundColor(0xc0ffffff);
stTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stTip->setVisible(false);
//cmd menu
wCmdMenu = env->addWindow(rect<s32>(10, 10, 110, 179), false, L"");
wCmdMenu->setDrawTitlebar(false);
......@@ -547,6 +543,11 @@ bool Game::Initialize() {
//leave/surrender/exit
btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L"");
btnLeaveGame->setVisible(false);
//tip
stTip = env->addStaticText(L"", rect<s32>(0, 0, 150, 150), false, true, 0, -1, true);
stTip->setBackgroundColor(0xc0ffffff);
stTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stTip->setVisible(false);
device->setEventReceiver(&menuHandler);
LoadConfig();
env->getSkin()->setFont(guiFont);
......
......@@ -392,6 +392,8 @@
!system 1622 [%ls]错过时点
!system 1623 投掷硬币结果:
!system 1624 投掷骰子结果:
#tips
!system 1700 可以用鼠标右键%ls
#victory reason
!victory 0x0 投降
!victory 0x1 LP变成0
......
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