QTfrontend/game.cpp
changeset 8345 9d9b498cfb03
parent 8325 ecd51650d5d8
child 8350 14b938faec69
equal deleted inserted replaced
8343:aa4ea3cade3c 8345:9d9b498cfb03
    21 #include <QUuid>
    21 #include <QUuid>
    22 #include <QColor>
    22 #include <QColor>
    23 #include <QStringListModel>
    23 #include <QStringListModel>
    24 #include <QTextStream>
    24 #include <QTextStream>
    25 
    25 
       
    26 #include "hwform.h"
       
    27 #include "ui/page/pageoptions.h"
    26 #include "game.h"
    28 #include "game.h"
    27 #include "hwconsts.h"
    29 #include "hwconsts.h"
    28 #include "gameuiconfig.h"
    30 #include "gameuiconfig.h"
    29 #include "gamecfgwidget.h"
    31 #include "gamecfgwidget.h"
    30 #include "teamselect.h"
    32 #include "teamselect.h"
   270         {
   272         {
   271             if (msg.at(2) == '?')
   273             if (msg.at(2) == '?')
   272                 sendCampaignVar(msg.right(msg.size() - 3));
   274                 sendCampaignVar(msg.right(msg.size() - 3));
   273             else if (msg.at(2) == '!')
   275             else if (msg.at(2) == '!')
   274                 writeCampaignVar(msg.right(msg.size() - 3));
   276                 writeCampaignVar(msg.right(msg.size() - 3));
       
   277             break;
       
   278         }
       
   279         case 'W':
       
   280         {
       
   281             // fetch new window resolution via IPC and save it in the settings
       
   282             int size = msg.size();
       
   283             QString newResolution = QString().append(msg.mid(2)).left(size - 4);
       
   284             QStringList wh = newResolution.split('x');
       
   285             config->Form->ui.pageOptions->windowWidthEdit->setText(wh[0]);
       
   286             config->Form->ui.pageOptions->windowHeightEdit->setText(wh[1]);
   275             break;
   287             break;
   276         }
   288         }
   277         default:
   289         default:
   278         {
   290         {
   279             if (gameType == gtNet && !netSuspend)
   291             if (gameType == gtNet && !netSuspend)