Commit 4b82daa8 authored by mercury233's avatar mercury233

Merge branch 'resize' into test

parents 8c348697 0e6376ba
...@@ -1414,13 +1414,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1414,13 +1414,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
if(event.MouseInput.isLeftPressed()) if(event.MouseInput.isLeftPressed())
break; break;
s32 x = event.MouseInput.X; if(mainGame->gameConf.control_mode == 1 && event.MouseInput.X > 300 * mainGame->xScale) {
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 && x > 300 * mainGame->xScale) {
mainGame->ignore_chain = event.MouseInput.isRightPressed(); mainGame->ignore_chain = event.MouseInput.isRightPressed();
mainGame->always_chain = false; mainGame->always_chain = false;
mainGame->chain_when_avail = false; mainGame->chain_when_avail = false;
......
...@@ -1093,7 +1093,7 @@ void Game::LoadConfig() { ...@@ -1093,7 +1093,7 @@ void Game::LoadConfig() {
gameConf.chkIgnoreDeckChanges = 0; gameConf.chkIgnoreDeckChanges = 0;
gameConf.defaultOT = 1; gameConf.defaultOT = 1;
gameConf.enable_bot_mode = 0; gameConf.enable_bot_mode = 0;
gameConf.quick_animation = 1; gameConf.quick_animation = 0;
gameConf.enable_sound = true; gameConf.enable_sound = true;
gameConf.sound_volume = 0.5; gameConf.sound_volume = 0.5;
gameConf.enable_music = true; gameConf.enable_music = true;
...@@ -1165,6 +1165,8 @@ void Game::LoadConfig() { ...@@ -1165,6 +1165,8 @@ void Game::LoadConfig() {
gameConf.defaultOT = atoi(valbuf); gameConf.defaultOT = atoi(valbuf);
} else if(!strcmp(strbuf, "enable_bot_mode")) { } else if(!strcmp(strbuf, "enable_bot_mode")) {
gameConf.enable_bot_mode = atoi(valbuf); gameConf.enable_bot_mode = atoi(valbuf);
} else if(!strcmp(strbuf, "quick_animation")) {
gameConf.quick_animation = atoi(valbuf);
} else if(!strcmp(strbuf, "window_maximized")) { } else if(!strcmp(strbuf, "window_maximized")) {
gameConf.window_maximized = atoi(valbuf) > 0; gameConf.window_maximized = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "window_width")) { } else if(!strcmp(strbuf, "window_width")) {
...@@ -1247,6 +1249,7 @@ void Game::SaveConfig() { ...@@ -1247,6 +1249,7 @@ void Game::SaveConfig() {
fprintf(fp, "ignore_deck_changes = %d\n", (chkIgnoreDeckChanges->isChecked() ? 1 : 0)); fprintf(fp, "ignore_deck_changes = %d\n", (chkIgnoreDeckChanges->isChecked() ? 1 : 0));
fprintf(fp, "default_ot = %d\n", gameConf.defaultOT); fprintf(fp, "default_ot = %d\n", gameConf.defaultOT);
fprintf(fp, "enable_bot_mode = %d\n", gameConf.enable_bot_mode); fprintf(fp, "enable_bot_mode = %d\n", gameConf.enable_bot_mode);
fprintf(fp, "quick_animation = %d\n", gameConf.quick_animation);
fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0)); fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0));
fprintf(fp, "window_width = %d\n", gameConf.window_width); fprintf(fp, "window_width = %d\n", gameConf.window_width);
fprintf(fp, "window_height = %d\n", gameConf.window_height); fprintf(fp, "window_height = %d\n", gameConf.window_height);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
use_d3d = 0 use_d3d = 0
use_image_scale = 1 use_image_scale = 1
antialias = 2 antialias = 2
errorlog = 1 errorlog = 3
nickname = YGO233 Player nickname = YGO233 Player
gamename = Game gamename = Game
lastdeck = new lastdeck = new
...@@ -13,7 +13,7 @@ serverport = 7911 ...@@ -13,7 +13,7 @@ serverport = 7911
lasthost = s1.ygo233.com lasthost = s1.ygo233.com
lastport = 233 lastport = 233
automonsterpos = 0 automonsterpos = 0
autospellpos = 1 autospellpos = 0
randompos = 0 randompos = 0
autochain = 0 autochain = 0
waitchain = 0 waitchain = 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