ServerStatusDialog::ServerStatusDialog(QWidget *parent) : QDialog(parent)
{
    setupUi(this);

    setWindowTitle(tr("Servers connection status"));
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

    refresh_timer_ = new QTimer(this);
    connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshStatus()));

    refreshStatus();
    refresh_timer_->start(kRefreshStatusInterval);
}
Пример #2
0
void RogueScene::changeGameStatus(GameStatus gameStatus)
{
    CCLOG("turn %d change gameStatus %d => %d", m_TurnCount, m_gameStatus, gameStatus);
    
    GameStatus beforeGameStatus = m_gameStatus;
    m_gameStatus = gameStatus;
    
    // 敵のターン開始時
    if ((beforeGameStatus == GameStatus::PLAYER_TURN || beforeGameStatus == GameStatus::PLAYER_ACTION)
        && m_gameStatus == GameStatus::ENEMY_TURN)
    {
        enemyTurn();
    }
    else if (m_gameStatus == GameStatus::PLAYER_TURN)
    {
        // カーソルはクリアする
        m_mapManager.clearCursor();
        // ターン数を進める
        m_TurnCount++;
        
        // TODO: とりあえずここで・・・
        auto pPlayer = getPlayerActorSprite(1);
        auto pPlayerDto = pPlayer->getActorDto();
        
        // 1ターンに1空腹度が減るという
        if (pPlayerDto->magicPoint > 0)
        {
            pPlayerDto->magicPoint--;
        }
        refreshStatus();
    }
}
Пример #3
0
bool PmrWorkspace::open(const QString &pPath, bool pRefreshStatus)
{
    // Open ourselves by first making sure that we are closed

    close();

    // Now, set our path and get our Git repository object ready

    mPath = pPath;

    mRootFileNode->setPath(pPath);

    if (!pPath.isEmpty()) {
        if (git_repository_open(&mGitRepository, pPath.toUtf8().constData()) == GIT_OK) {
            if (pRefreshStatus) {
                refreshStatus();
            }

            return true;
        }

        emitGitError(tr("An error occurred while trying to open the workspace."));
    }

    return false;
}
Пример #4
0
void KCMailReports::sendReports()
{
    disabledButtonState();
    reportStatus->showStatus();
    refreshStatus(KCMailProcessObject::Preparing);
    reportStatus->resetStatus();
    instance->setHostAddress("smtp.126.com");
    instance->setHostPort(25);
    instance->setMailReceiver("*****@*****.**");
    instance->setMailReceiverCaption("Kreogist Dev Team");
    instance->setMailSender("*****@*****.**");
    instance->setMailSenderPassword("moc.621@tsigoerk");
    instance->setMailSenderCaption(senderCaptions[mode]);
    instance->setMailTitle(titlePrefix[mode] + mailTitle->text());
    QString reportContent;
    reportContent.clear();
    for(QTextBlock textBlock=mailContent->document()->begin();
                   textBlock!=mailContent->document()->end();
                   textBlock=textBlock.next() )
    {
        reportContent+=textBlock.text()+"\n";
    }
    instance->setMailContent(reportContent);
    instance->sendMail();
}
Пример #5
0
KCMailReports::KCMailReports(QWidget *parent) :
    QDialog(parent)
{   
    setMinimumSize(480,320);
    mode=BugReportMode;
    titlePrefix[BugReportMode]="Bug: ";
    titlePrefix[FeedbackReportMode]="Feedback: ";
    retranslate();

    pal=palette();
    pal.setColor(QPalette::Highlight, QColor(0,0,0,255));
    setPalette(pal);

    QVBoxLayout *mainLayout=new QVBoxLayout(this);
    setLayout(mainLayout);
    mailTitle=new QLineEdit(this);
    pal=mailTitle->palette();
    pal.setColor(QPalette::Highlight, QColor(0xf7,0xcf,0x3d));
    mailTitle->setPalette(pal);
    mainLayout->addWidget(mailTitle);

    mailContent=new QPlainTextEdit(this);
    pal=mailContent->palette();
    pal.setColor(QPalette::Highlight, QColor(0xf7,0xcf,0x3d));
    mailContent->setPalette(pal);
    mainLayout->addWidget(mailContent, 1);

    buttonLayout=new QHBoxLayout();

    sendReport=new QPushButton(this);
    sendReport->setFixedHeight(30);
    pal=sendReport->palette();
    disabledButtonState();
    buttonLayout->addWidget(sendReport);
    cancelSending=new QPushButton(this);
    cancelSending->setFixedHeight(30);
    cancelSending->setText(tr("Cancel"));
    buttonLayout->addWidget(cancelSending);
    mainLayout->addLayout(buttonLayout);

    setMode(mode);
    instance=KCMailProcessObject::getInstance();
    connect(mailContent, SIGNAL(textChanged()),
            this, SLOT(buttonStatusSet()));
    connect(mailTitle, SIGNAL(textChanged(QString)),
            this, SLOT(buttonStatusSet()));
    connect(sendReport, SIGNAL(clicked()),
            this, SLOT(sendReports()));
    connect(instance, SIGNAL(statusChanged(KCMailProcessObject::SendingStatus)),
            this, SLOT(refreshStatus(KCMailProcessObject::SendingStatus)));
    connect(cancelSending, SIGNAL(clicked()),
            this, SLOT(close()));

    reportStatus=new KCMailSendingStatus(this);
    reportStatus->setGeometry(reportStatus->x(),
                              0-reportStatus->height()-30,
                              reportStatus->width(),
                              reportStatus->height());
}
Пример #6
0
void PeerListRow::lazyInitialize(const style::PeerListItem &st) {
	if (_initialized) {
		return;
	}
	_initialized = true;
	refreshName(st);
	refreshStatus();
}
Пример #7
0
void PFManagerDlg::restartClicked ( void )
{
    system("/etc/rc.d/ipfw restart");
    refreshStatus();
    if (firewallRunning)
      QMessageBox::information(this, tr("Success"), tr("Restarted successfuly!"));
    else
      QMessageBox::warning(this, tr("Failure"), tr("Failed to restart!"));
}
Пример #8
0
void AvatarWidget::setId(const ChatId &id)
{
    mId = id;
    mGxsId.clear();

    setPixmap(QPixmap());

    if (id.isNotSet()) {
        setEnabled(false);
    }
    
    refreshAvatarImage();
    refreshStatus();
}
Пример #9
0
void AvatarWidget::setGxsId(const RsGxsId &id)
{
    mId = ChatId();
    mGxsId = id;

    setPixmap(QPixmap());

    if (id.isNull()) {
        setEnabled(false);
    }

    refreshAvatarImage();
    refreshStatus();
}
Пример #10
0
MainWindow::MainWindow(QWidget *parent) :  QMainWindow(parent),  ui(new Ui::MainWindow)
{
  ui->setupUi(this);

  _model = new QOrdersModel();
  connect(_model, SIGNAL(refreshed()), this, SLOT(refreshStatus()));
  ui->view->setModel(_model);
  ui->view->hideColumn(0);
  ui->view->resizeColumnsToContents();
  ui->view->resizeRowsToContents();

  QAction* actionDeleteOrder = new QAction("Удалить наряд", ui->view);
  connect(actionDeleteOrder, SIGNAL(triggered(bool)), this, SLOT(on_actionDeleteOrder_triggered()));
  ui->view->addAction(actionDeleteOrder);
  ui->view->setContextMenuPolicy(Qt::ActionsContextMenu);

  lblOrderCount = new QLabel("");
  lblSum = new QLabel("");
  lblPeriod = new QLabel("");
  lblPeriod->setContextMenuPolicy(Qt::CustomContextMenu);
  connect(lblPeriod, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(lblPeriodShowContextMenu(QPoint)));

  ui->statusBar->addPermanentWidget(lblOrderCount);
  ui->statusBar->addPermanentWidget(lblSum);
  ui->statusBar->addPermanentWidget(lblPeriod);

  // TODO : разобраться с запоминанием флага maximized и геометрии

  if (App::theApp()->loadSetting(objectName(), "maximized", 0) == 1) {
    setWindowState(Qt::WindowMaximized);
  }
  else {
    setGeometry(App::theApp()->loadGeometry(objectName()));
  }
  refreshStatus();
}
Пример #11
0
void AvatarWidget::setId(const std::string &id, bool isGpg)
{
    mId = id;
    mFlag.isGpg = isGpg;

    if (mId == rsPeers->getOwnId()) {
        mFlag.isOwnId = true;
        setToolTip(tr("Click to change your avatar"));
    }

    setPixmap(QPixmap());

    if (mId.empty()) {
        setEnabled(false);
    }

    refreshStatus();
    updateAvatar(QString::fromStdString(mId));
}
Пример #12
0
void AvatarWidget::setFrameType(FrameType type)
{
	mFrameType = type;

	switch (mFrameType) {
	case NO_FRAME:
		disconnect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
		break;
	case NORMAL_FRAME:
		disconnect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
		break;
	case STATUS_FRAME:
		connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
		break;
	}

    //refreshAvatarImage();
    refreshStatus();
    Rshare::refreshStyleSheet(this, false);
}
Пример #13
0
//PUBLIC
LPTray::LPTray() : QSystemTrayIcon() {
    qDebug() << "Starting up Life-preserver Tray...";
    //Start up the log file watcher and connect the signals/slots
    watcher = new LPWatcher();
    connect(watcher,SIGNAL(MessageAvailable(QString)),this,SLOT(watcherMessage(QString)) );
    connect(watcher,SIGNAL(StatusUpdated()),this,SLOT(watcherMessage()) );
    //Load the tray settings file
    settings = new QSettings(QSettings::UserScope,"PCBSD", "life-preserver-tray");
    //Create the notification option widgets
    nShowAll = new QRadioButton(tr("Show all"));
    naAll = new QWidgetAction(this);
    naAll->setDefaultWidget(nShowAll);
    nShowError = new QRadioButton(tr("Warnings Only"));
    naErr = new QWidgetAction(this);
    naErr->setDefaultWidget(nShowError);
    nShowNone = new QRadioButton(tr("None"));
    naNone = new QWidgetAction(this);
    naNone->setDefaultWidget(nShowNone);
    //Create notification menu
    notificationMenu = new QMenu(tr("Popup Settings"));
    notificationMenu->setIcon( QIcon(":/images/configure.png") );
    notificationMenu->addAction(naAll);
    notificationMenu->addAction(naErr);
    notificationMenu->addAction(naNone);
    //Activate the proper notification setting widget
    QString popset = settings->value("popup-policy", "").toString();
    qDebug() << "Current Popup Policy:" << popset;
    if(popset=="all") {
        nShowAll->setChecked(true);
        popupPolicy = 2;
    }
    else if(popset=="errors") {
        nShowError->setChecked(true);
        popupPolicy = 1;
    }
    else if(popset=="none") {
        nShowNone->setChecked(true);
        popupPolicy = 0;
    }
    else {
        nShowError->setChecked(true);
        settings->setValue("popup-policy","errors"); //save the proper setting
        popupPolicy = 1;
    }
    //Now connect the popup settings signals/slots
    connect(nShowAll, SIGNAL(clicked()), this, SLOT(changePopupPolicy()) );
    connect(nShowError, SIGNAL(clicked()), this, SLOT(changePopupPolicy()) );
    connect(nShowNone, SIGNAL(clicked()), this, SLOT(changePopupPolicy()) );
    //Setup the context menu
    menu = new QMenu;
    menu->addAction(QIcon(":/images/tray-icon-idle.png"),tr("Open Life Preserver"),this,SLOT(startGUI()) );
    menu->addSeparator();
    menu->addAction(QIcon(":/images/backup-failed.png"),tr("View Messages"),this,SLOT(startMessageDialog()) );
    menu->addMenu(notificationMenu);
    menu->addAction(QIcon(":/images/refresh.png"),tr("Refresh Tray"),this,SLOT(refreshStatus()) );
    menu->addSeparator();
    menu->addAction(QIcon(":/images/application-exit.png"),tr("Close Tray"),this,SLOT(slotClose()) );
    this->setContextMenu(menu);
    //Setup initial icon for the tray
    this->setIcon( QIcon(":/images/tray-icon-idle.png") );
    //Create the messages GUI
    msgdlg = new LPMessages();
    //connect other signals/slots
    connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(slotTrayClicked(QSystemTrayIcon::ActivationReason)) );
    //Start up the watcher
    watcher->start();
    updateTrayIcon();
    updateToolTip();
}
Пример #14
0
bool RogueScene::init()
{
    // 1. super init first
    if ( !Layer::init() )
    {
        return false;
    }
    
    // 乱数
    srand((unsigned int)time(NULL));
    
    // TouchEvent settings
    auto listener = EventListenerTouchOneByOne::create();
    listener->setSwallowTouches(true);
    
    listener->onTouchBegan = CC_CALLBACK_2(RogueScene::onTouchBegan, this);
    listener->onTouchMoved = CC_CALLBACK_2(RogueScene::onTouchMoved, this);
    listener->onTouchEnded = CC_CALLBACK_2(RogueScene::onTouchEnded, this);
//    this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, this);
    this->getEventDispatcher()->addEventListenerWithFixedPriority(listener, 1);
    
    auto winSize = Director::getInstance()->getWinSize();
    
    // ---------------------
    // タイルマップを生成
    // ---------------------
    auto pTiledMap = TMXTiledMap::create("tmx/desert.tmx");
    pTiledMap->setPosition(Point::ZERO);
    this->addChild(pTiledMap, RogueScene::zTiledMapIndex, RogueScene::kTiledMapTag);
    
    m_baseMapSize = pTiledMap->getMapSize();
    m_baseTileSize = pTiledMap->getTileSize();
    m_baseContentSize = pTiledMap->getContentSize();
    
    m_mapManager.init(0, (int)m_baseMapSize.height, 0, (int)m_baseMapSize.width);

    // 使ってなかった
//    // フロントレイヤー
//    auto pFrontLayer = Layer::create();
//    pTiledMap->addChild(pFrontLayer,
//                        RogueScene::TiledMapIndex::zTiledMapFrontIndex,
//                        RogueScene::TiledMapTag::kTiledMapFrontTag);
    
    // エネミーレイヤー
    auto pEnemyLayer = Layer::create();
    pTiledMap->addChild(pEnemyLayer,
                        RogueScene::TiledMapIndex::zTiledMapEnemyBaseIndex,
                        RogueScene::TiledMapTag::kTiledMapEnemyBaseTag);
    
    // ドロップアイテムレイヤー
    auto pDropItemLayer = Layer::create();
    pTiledMap->addChild(pDropItemLayer,
                        RogueScene::TiledMapIndex::zTiledMapDropItemBaseIndex,
                        RogueScene::TiledMapTag::kTiledMapDropItemBaseTag);
    
    // 障害物をmapManagerに適応する
    auto pColisionLayer = pTiledMap->getLayer("colision");
    for (int x = 0; x < m_baseMapSize.width; x++)
    {
        for (int y = 0; y < m_baseMapSize.height; y++)
        {
            if (pColisionLayer->getTileAt(Point(x, y)))
            {
                MapIndex mapIndex = {x, y, MoveDirectionType::MOVE_NONE};
                auto tileMapIndex = mapIndexToTileIndex(mapIndex);
                m_mapManager.addObstacle(&tileMapIndex);
            }
        }
    }
    
    // ---------------------
    // グリッド線を生成
    // ---------------------
    auto draw = DrawNode::create();
    draw->setPosition(Point::ZERO);
    
    // 線の太さと色
    float lineSize = 1 * 0.5;
    Color4F color = Color4F::MAGENTA;
    
    // 縦線を引く
    for (int x = 1; x < m_baseMapSize.width; x++)
    {
        float xPoint = x * m_baseTileSize.width;
        draw->drawSegment(Point(xPoint, 0), Point(xPoint, m_baseContentSize.height), lineSize, color);
    }
    // 横線を引く
    for (int y = 1; y < m_baseMapSize.height; y++)
    {
        float yPoint = y * m_baseTileSize.height;
        draw->drawSegment(Point(0, yPoint), Point(m_baseContentSize.width, yPoint), lineSize, color);
    }
    
    // マップに追加
    pTiledMap->addChild(draw, RogueScene::TiledMapIndex::zGridLineIndex, RogueScene::TiledMapTag::kGridLineTag);

    //-------------------------
    // ステータスバー?
    //-------------------------
    auto statusLayer = LayerColor::create(Color4B::BLACK);
    statusLayer->setContentSize(Size(winSize.width, m_baseTileSize.height * 0.8));
    statusLayer->setPosition(Point(0, winSize.height - statusLayer->getContentSize().height));
    
    // TODO: あとで更新する
    auto sampleText = LabelTTF::create(" --F Lv-- HP ---/--- 満腹度 ---/---          - G", GAME_FONT(16), 16);
    
    sampleText->setPosition(Point(sampleText->getContentSize().width / 2, statusLayer->getContentSize().height / 2));
    statusLayer->addChild(sampleText);
    
    this->addChild(statusLayer, RogueScene::zStatusBarIndex, RogueScene::kStatusBarTag);
    
    //    // 下のステータスバー2
    //    auto pStatusLayer2 = LayerColor::create(Color4B::BLACK);
    //    pStatusLayer2->setContentSize(Size(m_baseTileSize.width, m_baseTileSize.height));
    //    pStatusLayer2->setPosition(Point(0, 0));
    //
    //    // TODO: アイコン表示するかな(ステータスバー2?)
    //    auto pFaceSprite = Sprite::createWithSpriteFrame(SpriteFrame::create("actor_4_f.png", Rect(0, 0, 96, 96)));
    //    float scale = 1.0f / 3.0f;
    //    pFaceSprite->setScale(scale, scale);
    //    //    pFaceSprite->setContentSize(pFaceSprite->getContentSize() * scale);
    //    //    CCLOG("getContentSize (%f, %f) ", pFaceSprite->getContentSize().width, pFaceSprite->getContentSize().height);
    //    //    pFaceSprite->setPosition(Point(pFaceSprite->getContentSize().width / 2, pFaceSprite->getContentSize().height / 2));
    //    pFaceSprite->setPosition(Point(pFaceSprite->getContentSize().width * pFaceSprite->getScaleX() / 2, pFaceSprite->getContentSize().height * pFaceSprite->getScaleY() / 2));
    //    pStatusLayer2->addChild(pFaceSprite);
    //
    //    this->addChild(pStatusLayer2, RogueScene::zStatusBar2Index, RogueScene::kStatusBar2Tag);
    
    //-------------------------
    // ゲームログ表示
    //-------------------------
    //    float startWidth = pFaceSprite->getContentSize().width * pFaceSprite->getScaleX();
    auto pGameLogLayer = LayerColor::create(Color4B(0, 0, 0, 192));
    pGameLogLayer->setContentSize(Size(winSize.width * 0.8, m_baseTileSize.height * 1.5));
    pGameLogLayer->setPosition(winSize.width / 2 - pGameLogLayer->getContentSize().width / 2, 0);
    
    int baseFontSize = 10;
    auto pLogTextLabel = LabelTTF::create("", GAME_FONT(baseFontSize), baseFontSize, Size::ZERO, TextHAlignment::LEFT, TextVAlignment::TOP);
    pLogTextLabel->setPosition(Point(pLogTextLabel->getContentSize().width / 2 + pLogTextLabel->getFontSize() / 4, pGameLogLayer->getContentSize().height - pLogTextLabel->getContentSize().height / 2 - pLogTextLabel->getFontSize() / 4));
    pGameLogLayer->addChild(pLogTextLabel);
    this->addChild(pGameLogLayer, RogueScene::zGameLogIndex, RogueScene::kGameLogTag);
    
    // ------------------------
    // ミニマップ
    // ------------------------
    // 青で半透明
    auto miniMapLayer = LayerColor::create(Color4B(0, 0, 196, 128));
    // 1/8サイズ
    miniMapLayer->setContentSize(Size(m_baseMapSize.width * m_baseTileSize.width / 8,
                                      m_baseMapSize.height * m_baseTileSize.height / 8));
    // ステータスバーの下くらい
    miniMapLayer->setPosition(0, miniMapLayer->getPositionY() + winSize.height - miniMapLayer->getContentSize().height - statusLayer->getContentSize().height);
    this->addChild(miniMapLayer, RogueScene::zMiniMapIndex, RogueScene::kMiniMapTag);
    
    // ------------------------
    // イベントリ作成
    // ------------------------
    showItemList(1);
    hideItemList();
    
    // ---------------------
    // プレイヤー生成
    // ---------------------
    ActorSprite::ActorDto actorDto;
    actorDto.name = "ジニー";
    actorDto.faceImgId = 0;
    actorDto.imageResId = 1015;
    // 基本
    actorDto.attackRange = 1;
    actorDto.movePoint = 5;
    actorDto.playerId = 4;
    // 攻守
    actorDto.attackPoint = 5;
    actorDto.defencePoint = 1;
    // 経験値
    actorDto.exp = 0;
    actorDto.nextExp = 10;
    // HP
    actorDto.hitPoint = 15;
    actorDto.hitPointLimit = 15;
    actorDto.lv = 1;
    // 満腹度?精神力?
    actorDto.magicPoint = 100;
    actorDto.magicPointLimit = 100;

    ActorMapItem actorMapItem;
    actorMapItem.mapDataType = MapDataType::PLAYER;
    // 画面の中心(固定)
    actorMapItem.mapIndex = pointToIndex(Point(winSize.width/2, winSize.height/2));
    actorMapItem.seqNo = 1;
    actorMapItem.moveDist = actorDto.movePoint;
    actorMapItem.attackDist = actorDto.attackRange;
    actorMapItem.moveDone = false;
    actorMapItem.attackDone = false;
    
    auto actorSprite = ActorSprite::createWithActorDto(actorDto);
    actorSprite->setPosition(indexToPoint(actorMapItem.mapIndex)); // 画面の中心
    actorSprite->setActorMapItem(actorMapItem);
    actorSprite->runBottomAction();
    // プレイヤーは画面中心にくるのでmapLayerに追加しない
    this->addChild(actorSprite, RogueScene::zActorBaseIndex, (RogueScene::kActorBaseTag + actorMapItem.seqNo));
    
    // マップに追加
    m_mapManager.addActor(actorSprite->getActorMapItem());
    
    refreshStatus();
    
    // プレイヤーの位置表示用(同じく1/8サイズ)
    auto miniMapActorLayer = LayerColor::create(Color4B::YELLOW);
    // タイルの1/8サイズ
    miniMapActorLayer->setContentSize(m_baseTileSize / 8);
    // 現在位置からPositionを取得して1/8にする
    miniMapActorLayer->setPosition(indexToPointNotTileSize(actorSprite->getActorMapItem()->mapIndex) / 8);
    // 移動時に更新できるようにplayerIdをtag管理
    miniMapActorLayer->setTag(actorSprite->getTag());
    // add
    miniMapLayer->addChild(miniMapActorLayer);
    
    // ---------------------
    // 敵キャラ生成
    // ---------------------
    ActorSprite::ActorDto enemyDto;
    enemyDto.name = "スライム";
    enemyDto.faceImgId = 0;
    enemyDto.imageResId = 1011;
    // 基本
    enemyDto.attackRange = 1; // TODO: 未使用
    enemyDto.movePoint = 10; // 索敵範囲
    enemyDto.playerId = 901;
    // 攻守
    enemyDto.attackPoint = 2;
    enemyDto.defencePoint = 0;
    // 経験値
    enemyDto.exp = 0;
    enemyDto.nextExp = 10;
    // HP
    enemyDto.hitPoint = 10;
    enemyDto.hitPointLimit = 10;
    enemyDto.lv = 1;
    // 満腹度?精神力?
    enemyDto.magicPoint = 100;
    enemyDto.magicPointLimit = 100;
    
    MapIndex enemyMapIndex1 = {4, 4, MoveDirectionType::MOVE_DOWN};
    tileSetEnemyActorMapItem(enemyDto, enemyMapIndex1);
    
    ActorSprite::ActorDto enemyDto2 = enemyDto;
    MapIndex enemyMapIndex2 = {14,12, MoveDirectionType::MOVE_DOWN};
    tileSetEnemyActorMapItem(enemyDto2, enemyMapIndex2);
    
    ActorSprite::ActorDto enemyDto3 = enemyDto;
    MapIndex enemyMapIndex3 = {20,4, MoveDirectionType::MOVE_DOWN};
    tileSetEnemyActorMapItem(enemyDto3, enemyMapIndex3);
    
    //-------------------------
    // アイテム配置
    //-------------------------
    DropItemSprite::DropItemDto dropItemDto;
    dropItemDto.itemId = 1;
    dropItemDto.imageResId = 64; // imageId 10064
    dropItemDto.name = "ポーション";
    
    MapIndex mapIndex = {7, 5, MoveDirectionType::MOVE_NONE};
    tileSetDropMapItem(dropItemDto, mapIndex);

    DropItemSprite::DropItemDto dropItemDto2;
    dropItemDto2.itemId = 2;
    dropItemDto2.imageResId = 168; // imageId 10168
    dropItemDto2.name = "ぶどう";
    
    MapIndex mapIndex2 = {10, 9, MoveDirectionType::MOVE_NONE};
    tileSetDropMapItem(dropItemDto2, mapIndex2);
    
    // -------------------------------
    // メニュー
    // -------------------------------
    auto rect = Rect(0, 0, 300, 30);
    auto capRect = Rect(0, 0, 300, 30);
    auto pScale9Sprite1 = extension::Scale9Sprite::create("menu_button.png", rect, capRect);
    pScale9Sprite1->setContentSize(Size(40, 20));
    pScale9Sprite1->setOpacity(192);
    auto pScale9Sprite2 = extension::Scale9Sprite::create("menu_button.png", rect, capRect);
    pScale9Sprite2->setContentSize(Size(40, 20));
    pScale9Sprite2->setOpacity(128);
    
    auto pMenuItem1 = MenuItemSprite::create(pScale9Sprite1, pScale9Sprite2, [this](Object *pSender) {
        CCLOG("menuItem1が押された!");
            showItemList(1);
    });
    pMenuItem1->setColor(Color3B::GREEN);
    pMenuItem1->setPosition(Point(winSize.width - pMenuItem1->getContentSize().width / 2, pMenuItem1->getContentSize().height / 2));
    auto pMenu = Menu::create(pMenuItem1, NULL);
    pMenu->setPosition(Point::ZERO);
    this->addChild(pMenu, RogueScene::zMenuIndex, RogueScene::kMenuTag);

    // ---------------------------------
    // プレイヤーの先行
    changeGameStatus(GameStatus::PLAYER_TURN);
    
    return true;
}
void TaskServices::startTimer()
{
    connect(taskTimer, SIGNAL(timeout()), this, SLOT(refreshStatus()));
    //taskTimer->start(1000*30);
    taskTimer->start(timerSeconds);
}
Пример #16
0
void PeerListRow::clearCustomStatus() {
	_statusType = StatusType::Online;
	refreshStatus();
}
Пример #17
0
void PFManagerDlg::stopClicked ( void )
{
    system("/etc/rc.d/ipfw stop");
    refreshStatus();
}