• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MoveDown函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MoveDown函数的典型用法代码示例。如果您正苦于以下问题:C++ MoveDown函数的具体用法?C++ MoveDown怎么用?C++ MoveDown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MoveDown函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: MoveUp

EVENT_RESULT CGUISpinControl::OnMouseEvent(const CPoint &point, const CMouseEvent &event)
{
  if (event.m_id == ACTION_MOUSE_LEFT_CLICK)
  {
    if (m_imgspinUpFocus.HitTest(point))
      MoveUp();
    else if (m_imgspinDownFocus.HitTest(point))
      MoveDown();
    return EVENT_RESULT_HANDLED;
  }
  else if (event.m_id == ACTION_MOUSE_WHEEL_UP)
  {
    if (m_imgspinUpFocus.HitTest(point) || m_imgspinDownFocus.HitTest(point))
    {
      MoveUp();
      return EVENT_RESULT_HANDLED;
    }
  }
  else if (event.m_id == ACTION_MOUSE_WHEEL_DOWN)
  {
    if (m_imgspinUpFocus.HitTest(point) || m_imgspinDownFocus.HitTest(point))
    {
      MoveDown();
      return EVENT_RESULT_HANDLED;
    }
  }
  return EVENT_RESULT_UNHANDLED;
}
开发者ID:AndyPeterman,项目名称:mrmc,代码行数:28,代码来源:GUISpinControl.cpp


示例2: UpdateAI

        void UpdateAI(const uint32 diff)
        {
            if(!pInstance)
                return;

            if(pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS && pInstance->GetData(DATA_ALL_INITIAND_DEAD))
                MoveDown();

            if(bOpFerok && !bOnGround && !bCanDown) Opfern();

            if(bOpFerokFail && !bOnGround && !bCanDown)
                bCanDown = true;

            if(bCanDown)
            {
                MoveDown();
                bCanDown = false;
            }

            if(bOnGround)
            {
                if(!UpdateVictim())
                    return;

                if(uiCycloneTimer <= diff)
                {
                    DoCast(me, SPELL_CYCLONE_STRIKE, false);
                    uiCycloneTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
                } else uiCycloneTimer -= diff;

                if(uiBoltTimer <= diff)
                {
                    if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
                        me->CastSpell(target, DUNGEON_MODE(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false);

                    uiBoltTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
                } else uiBoltTimer -= diff;

                if(uiThunderTimer <= diff)
                {
                    if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
                        me->CastSpell(target, DUNGEON_MODE(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false);

                    uiThunderTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
                } else uiThunderTimer -= diff;

                if(uiOpFerTimer <= diff)
                    MoveUp();
                else
                    uiOpFerTimer -= diff;

                DoMeleeAttackIfReady();
            }
        }
开发者ID:cooler-SAI,项目名称:MythCore,代码行数:54,代码来源:boss_jedoga_shadowseeker.cpp


示例3: IsMoving

void Game_Player::Update() {
	bool last_moving = IsMoving();

	if (!IsMoving() && !Game_Map::GetInterpreter().IsRunning() 
		&& !IsMoveRouteOverwritten() && !Game_Message::message_waiting) {
		switch (Input::dir4) {
			case 2:
				MoveDown();
				break;
			case 4:
				MoveLeft();
				break;
			case 6:
				MoveRight();
				break;
			case 8:
				MoveUp();
		}
	}

	int last_real_x = real_x;
	int last_real_y = real_y;

	Game_Character::Update();

	UpdateScroll(last_real_x, last_real_y);

	UpdateNonMoving(last_moving);
}
开发者ID:MarianoGnu,项目名称:Player,代码行数:29,代码来源:game_player.cpp


示例4: MoveUp

void Game_Character::MoveTypeCycleUpDown() {
	if (IsStopping()) {
		cycle_stat ? MoveUp() : MoveDown();

		cycle_stat = move_failed ? !cycle_stat : cycle_stat;
	}
}
开发者ID:Zhek,项目名称:Player,代码行数:7,代码来源:game_character.cpp


示例5: LineNew

int EBuffer::LineNew() {
    if (SplitLine(VToR(CP.Row), CP.Col) == 0)
        return 0;

    if (!MoveDown())
        return 0;

    if (CP.Col > 0) {

        if (!MoveLineStart())
            return 0;

        //int Indent = LineIndented(VToR(CP.Row));

        if (!LineIndent())
            return 0;

        //if (Indent > 0)
        //  if (InsText(Row, C, Indent, 0) == 0)
        //    return 0;

        if (BFI(this, BFI_Trim))
            if (TrimLine(VToR(CP.Row - 1)) == 0)
                return 0;
    }
    return 1;
}
开发者ID:dmcbride,项目名称:efte,代码行数:27,代码来源:e_cmds.cpp


示例6: indexAt

void TradeTable::mousePressEvent(QMouseEvent * event)
{  
	QModelIndex modelIndex = indexAt(event->pos());
	if (event->button() == Qt::RightButton)
	{
		QMenu * popupMenu = new QMenu(this);
		QString menuStyle = "QMenu { font-size:18px; color:blue; background-color:qlineargradient(x1:0, y1:0, x2:0, y2:1, stop: 0 #cccccc, stop: 1 #555555);}" ;
		popupMenu->setStyleSheet(menuStyle);
		m_SelectedIndex = modelIndex.row();
		if(modelIndex.isValid() && modelIndex.row()>=0)
		{
			this->setSelection(this->visualRect(modelIndex),QItemSelectionModel::SelectCurrent);
			popupMenu->addAction(tr("&Order"), this, SLOT(Order()),QKeySequence(Qt::CTRL + Qt::Key_O));
			popupMenu->addAction(tr("&Chart"),this,SLOT(Chart()),QKeySequence(Qt::CTRL + Qt::Key_C));
			popupMenu->addSeparator();
			popupMenu->addAction(tr("&Delete"),this,SLOT(Delete()),QKeySequence(Qt::CTRL + Qt::Key_D));
			popupMenu->addAction(tr("&Add"),this,SLOT(Add()),QKeySequence(Qt::CTRL + Qt::Key_A));
			popupMenu->addAction(tr("&Move&Up"),this,SLOT(MoveUp()),QKeySequence(Qt::CTRL + Qt::Key_M,Qt::CTRL + Qt::Key_U));
			popupMenu->addAction(tr("&UpTo&Top"),this,SLOT(UpToTop()),QKeySequence(Qt::CTRL + Qt::Key_U,Qt::CTRL + Qt::Key_T));
			popupMenu->addAction(tr("&Move&Down"),this,SLOT(MoveDown()),QKeySequence(Qt::CTRL + Qt::Key_M,Qt::CTRL + Qt::Key_D));
			popupMenu->addAction(tr("&DownTo&Bottom"),this,SLOT(DownToBottom()),QKeySequence(Qt::CTRL + Qt::Key_D,Qt::CTRL + Qt::Key_B));
		}
		else
		{
			popupMenu->addAction(tr("&Add"),this,SLOT(Add()),QKeySequence(Qt::CTRL + Qt::Key_A));
		}
		popupMenu->exec(event->globalPos());  
	}
	QTableView::mousePressEvent(event);
}
开发者ID:RobertHu,项目名称:QtUiDemo,代码行数:30,代码来源:TradeTable.cpp


示例7: EvaluateShortestPathsHelper

void BfsHelper::EvaluateShortestPaths(std::pair<int, int> pos, int steps)
{
    EvaluateShortestPathsHelper(pos, MoveLeft(pos), steps);
    EvaluateShortestPathsHelper(pos, MoveRight(pos), steps);
    EvaluateShortestPathsHelper(pos, MoveUp(pos), steps);
    EvaluateShortestPathsHelper(pos, MoveDown(pos), steps);
}
开发者ID:bjowes,项目名称:cwg,代码行数:7,代码来源:BfsHelper.cpp


示例8: switch

bool
TaskEditPanel::OnKeyDown(unsigned key_code)
{
  switch (key_code){
  case KEY_ESCAPE:
    if (IsAltair() && GetList().HasFocus()){
       dialog.FocusFirstControl();
      return true;
    }
    return false;

  case '6': /* F5 */
    if (IsAltair()) {
      MoveUp();
      return true;
    } else
      return false;

  case '7': /* F6 */
    if (IsAltair()) {
      MoveDown();
      return true;
    } else
      return false;

  default:
    return false;
  }
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:29,代码来源:TaskEditPanel.cpp


示例9: ScrollToOffset

bool CGUIFixedListContainer::MoveDown(bool wrapAround)
{
  if (m_offset + m_cursor + 1 < (int)m_items.size())
  {
    ScrollToOffset(m_offset + 1);
  }
  else if (wrapAround)
  { // move first item in list
    ScrollToOffset(-m_cursor);
    g_infoManager.SetContainerMoving(GetID(), 1);
  }
  else
    return false;

  if (m_items.size() > (size_t) (m_offset +m_cursor) && m_items[m_offset +m_cursor]->GetPropertyBOOL("isseparator"))
  {
    if ((size_t) (m_offset +m_cursor) == m_items.size() - 1)
    {
      MoveUp(wrapAround);
      if (!wrapAround)
        return false;
    }
    else
    {
      MoveDown(wrapAround);
    }
  }

  return true;
}
开发者ID:DakaiTV,项目名称:DakaiBoxee,代码行数:30,代码来源:GUIFixedListContainer.cpp


示例10: QDialog

QueueManager::QueueManager(QWidget* parent)
    : QDialog(parent),
      ui_(new Ui_QueueManager),
      playlists_(nullptr),
      current_playlist_(nullptr) {
  ui_->setupUi(this);
  ui_->list->setItemDelegate(new QueuedItemDelegate(this, 0));

  // Set icons on buttons
  ui_->move_down->setIcon(IconLoader::Load("go-down"));
  ui_->move_up->setIcon(IconLoader::Load("go-up"));
  ui_->remove->setIcon(IconLoader::Load("edit-delete"));
  ui_->clear->setIcon(IconLoader::Load("edit-clear-list"));

  // Set a standard shortcut
  ui_->remove->setShortcut(QKeySequence::Delete);

  // Button connections
  connect(ui_->move_down, SIGNAL(clicked()), SLOT(MoveDown()));
  connect(ui_->move_up, SIGNAL(clicked()), SLOT(MoveUp()));
  connect(ui_->remove, SIGNAL(clicked()), SLOT(Remove()));
  connect(ui_->clear, SIGNAL(clicked()), SLOT(Clear()));

  QShortcut* close = new QShortcut(QKeySequence::Close, this);
  connect(close, SIGNAL(activated()), SLOT(close()));
}
开发者ID:Aceler,项目名称:Clementine,代码行数:26,代码来源:queuemanager.cpp


示例11: IsMoving

// Update
void Game_Player::Update() {
	bool last_moving = IsMoving();

	if (!IsMoving() && !Game_Map::GetInterpreter().IsRunning()
		/*move_route_forcing || Game_Temp::message_window_showing*/) {
		switch (Input::dir4) {
			case 2:
				MoveDown();
				break;
			case 4:
				MoveLeft();
				break;
			case 6:
				MoveRight();
				break;
			case 8:
				MoveUp();
		}
	}

	int last_real_x = real_x;
	int last_real_y = real_y;

	Game_Character::Update();

	UpdateScroll(last_real_x, last_real_y);

	UpdateNonMoving(last_moving);
}
开发者ID:Bonstra,项目名称:EasyRPG-Player,代码行数:30,代码来源:game_player.cpp


示例12: CatAxeParens

void            CatAxeParens( void ) {
//==============================

// Remove LBR on ( // sequence.
//
// Before:                            |   After:
//                ---------------     |                 ---------------
//                | opr1 | PHI  |     |                    released**
//                ---------------     |                 ---------------
//       CIT ==>  | (    | opn2 |     |        CIT ==>  | opr1 | opn2 |
//                ---------------     |                 ---------------
//                | //   | opn3 |     |                 | //   | opn3 |
//                ---------------     |                 ---------------
//                      ...           |                       ...
//
//  ** see KillOpnOpr() for case where first node is start-node of expr

    BackTrack();
    ReqNOpn();
    MoveDown();
    if( CITNode->is_catparen ) {
        KillOpnOpr();
    } else {
        FiniCat();
    }
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:26,代码来源:upcat.c


示例13: switch

bool Dock::HandleEvent( sf::Event &e )
{
    if( e.Type == sf::Event::KeyPressed ) {
        switch( e.Key.Code ) {
            case sf::Key::Escape:
                Deactivate();
                break;
            case sf::Key::Up:
                MoveUp();
                break;
            case sf::Key::Down:
                MoveDown();
                break;
            case sf::Key::Left:
                MoveLeft();
                break;
            case sf::Key::Right:
                MoveRight();
                break;
            case sf::Key::Return:
            case sf::Key::Space:
                Execute();
                break;
            default:
                break;
        }
    }
    return true;
}
开发者ID:treeman,项目名称:Sat-E,代码行数:29,代码来源:Dock.cpp


示例14: EventArise

int CGUIListBox::Keyboard(UINT character, UINT state)
{
	if(character == VK_RETURN)
	{
		if(markListItem)
			EventArise(EList,0,markListItem->GetID(),0,0,0);
	}

	if (character == VK_UP) {
		MoveUp();
	}

	if (character == VK_DOWN) {
		MoveDown();
	}

	if (character == VK_RIGHT) {
		MoveRight();
	}

	if (character == VK_LEFT) {
		MoveLeft();
	}

	return 1;
}
开发者ID:HonzaMD,项目名称:Krkal2,代码行数:26,代码来源:list.cpp


示例15: MoveUp

/********************************************************************************
Fly
********************************************************************************/
void Camera3::Fly(const double dt)
{
	if(dt > 0)
		MoveUp(dt);
	else if(dt < 0)
		MoveDown(dt);
}
开发者ID:barryHub20,项目名称:SP3,代码行数:10,代码来源:Camera3.cpp


示例16: switch

void
TaskEditPanel::OnAction(int id)
{
  switch (id) {
  case EDIT:
    OnEditTurnpointClicked();
    break;

  case MUTATE:
    OnMakeFinish();
    break;

  case UP:
    MoveUp();
    break;

  case DOWN:
    MoveDown();
    break;

  case REVERSE:
    ReverseTask();
    break;

  case CLEAR_ALL:
    OnClearAllClicked();
    break;
  }
}
开发者ID:Andy-1954,项目名称:XCSoar,代码行数:29,代码来源:TaskEditPanel.cpp


示例17: switch

bool
TaskEditPanel::OnKeyDown(unsigned key_code)
{
  switch (key_code){
  case VK_ESCAPE:
    if (IsAltair() && wTaskPoints->HasFocus()){
       wf.FocusFirstControl();
      return true;
    }
    return false;

  case '6': /* F5 */
    if (IsAltair()) {
      MoveUp();
      return true;
    } else
      return false;

  case '7': /* F6 */
    if (IsAltair()) {
      MoveDown();
      return true;
    } else
      return false;

  default:
    return false;
  }
}
开发者ID:osteocool,项目名称:XCSoar-1,代码行数:29,代码来源:TaskEditPanel.cpp


示例18: QListWidget

SelectWidget::SelectWidget() {
   list = new QListWidget(this);
   upButton = new QPushButton(this);
   downButton = new QPushButton(this);
   connect(upButton, SIGNAL(clicked()), this, SLOT(MoveUp()));
   connect(downButton, SIGNAL(clicked()), this, SLOT(MoveDown()));
   list->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
}
开发者ID:Atarity,项目名称:Lightpack,代码行数:8,代码来源:SelectWidget.cpp


示例19: Update

 void Update(float interval)
 {
     p_fall_timer += p_fall_speed * interval;
     if (p_fall_timer >= 1)  {
         p_fall_timer -= 1;
         MoveDown();
     }
 }
开发者ID:livingcreative,项目名称:brickgame,代码行数:8,代码来源:tetris.cpp


示例20: FixPos

int EList::ExecCommand(int Command, ExState &State) {
    int W = 1;
    int H = 1;

    if (View && View->MView && View->MView->Win) {
        View->MView->ConQuerySize(&W, &H);
        H--;
    }
    FixPos();
    switch (Command) {
    case ExMoveLeft:
        return MoveLeft();
    case ExMoveRight:
        return MoveRight();
    case ExMoveUp:
        return MoveUp();
    case ExMoveDown:
        return MoveDown();
    case ExMovePageUp:
        return MovePageUp();
    case ExMovePageDown:
        return MovePageDown();
    case ExScrollLeft:
        return ScrollLeft(8);
    case ExScrollRight:
        return ScrollRight(8);
    case ExMovePageStart:
        return MovePageStart();
    case ExMovePageEnd:
        return MovePageEnd();
    case ExMoveFileStart:
        return MoveFileStart();
    case ExMoveFileEnd:
        return MoveFileEnd();
    case ExMoveLineStart:
        return MoveLineStart();
    case ExMoveLineEnd:
        return MoveLineEnd();
    case ExRescan:
        RescanList();
        return ErOK;
    case ExActivate:
        return Activate();
    case ExListMark:
        return Mark();
    case ExListUnmark:
        return Unmark();
    case ExListToggleMark:
        return ToggleMark();
    case ExListMarkAll:
        return MarkAll();
    case ExListUnmarkAll:
        return UnmarkAll();
    case ExListToggleMarkAll:
        return ToggleMarkAll();
    }
    return EModel::ExecCommand(Command, State);
}
开发者ID:dmcbride,项目名称:efte,代码行数:58,代码来源:o_list.cpp



注:本文中的MoveDown函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MoveEvents函数代码示例发布时间:2022-05-30
下一篇:
C++ MoveCursor函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap