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

C++ TouchStick类代码示例

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

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



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

示例1: UpdateGamepad

void UpdateGamepad(InputState &input_state)
{
	LayoutGamepad(dp_xres, dp_yres);

	buttonO.update(input_state);
	buttonX.update(input_state);
	buttonTri.update(input_state);
	buttonSq.update(input_state);

	crossPad.update(input_state);

	buttonSelect.update(input_state);
	buttonStart.update(input_state);
	buttonLShoulder.update(input_state);
	buttonRShoulder.update(input_state);

	if (g_Config.iFpsLimit)
		buttonVPS.update(input_state);
	else 
		buttonTurbo.update(input_state);

#if defined(__SYMBIAN32__) || defined(IOS) || defined(MEEGO_EDITION_HARMATTAN)
	buttonPause.update(input_state);
#endif

	if (g_Config.bShowAnalogStick)
		leftStick.update(input_state);
}
开发者ID:Darth1701,项目名称:ppsspp,代码行数:28,代码来源:GamepadEmu.cpp


示例2: DrawGamepad

void DrawGamepad(DrawBuffer &db, float opacity)
{
	uint32_t color = colorAlpha(0xc0b080, opacity);
	uint32_t colorOverlay = colorAlpha(0xFFFFFF, opacity);

	buttonO.draw(db, color, colorOverlay);
	buttonX.draw(db, color, colorOverlay);
	buttonTri.draw(db, color, colorOverlay);
	buttonSq.draw(db, color, colorOverlay);

	crossPad.draw(db, color, colorOverlay);

	buttonSelect.draw(db, color, colorOverlay);
	buttonStart.draw(db, color, colorOverlay);
	buttonLShoulder.draw(db, color, colorOverlay);
	buttonRShoulder.draw(db, color, colorOverlay);

	if (g_Config.iFpsLimit)
		buttonVPS.draw(db, color, colorOverlay);
	else
		buttonTurbo.draw(db, color, colorOverlay);

#if defined(__SYMBIAN32__) || defined(IOS) || defined(MEEGO_EDITION_HARMATTAN)
	buttonPause.draw(db, color, colorOverlay);
#endif

	if (g_Config.bShowAnalogStick)
		leftStick.draw(db, color);
}
开发者ID:Darth1701,项目名称:ppsspp,代码行数:29,代码来源:GamepadEmu.cpp


示例3: UpdateGamepad

void UpdateGamepad(InputState &input_state)
{
    LayoutGamepad(dp_xres, dp_yres);

    buttonO.update(input_state);
    buttonX.update(input_state);
    buttonTri.update(input_state);
    buttonSq.update(input_state);

    buttonLeft.update(input_state);
    buttonUp.update(input_state);
    buttonDown.update(input_state);
    buttonRight.update(input_state);

    buttonSelect.update(input_state);
    buttonStart.update(input_state);
    buttonLShoulder.update(input_state);
    buttonRShoulder.update(input_state);

#if defined(__SYMBIAN32__) || defined(IOS)
    buttonPause.update(input_state);
#endif

    if (g_Config.bShowAnalogStick)
        leftStick.update(input_state);
}
开发者ID:Nementon,项目名称:ppsspp,代码行数:26,代码来源:GamepadEmu.cpp


示例4: DrawGamepad

void DrawGamepad(DrawBuffer &db)
{
    uint32_t color = 0xa0c0b080;
    uint32_t colorOverlay = 0xa0FFFFFF;
    buttonO.draw(db, color, colorOverlay);
    buttonX.draw(db, color, colorOverlay);
    buttonTri.draw(db, color, colorOverlay);
    buttonSq.draw(db, color, colorOverlay);

    buttonLeft.draw(db, color, colorOverlay);
    buttonUp.draw(db, color, colorOverlay);
    buttonDown.draw(db, color, colorOverlay);
    buttonRight.draw(db, color, colorOverlay);

    buttonSelect.draw(db, color, colorOverlay);
    buttonStart.draw(db, color, colorOverlay);
    buttonLShoulder.draw(db, color, colorOverlay);
    buttonRShoulder.draw(db, color, colorOverlay);

#if defined(__SYMBIAN32__) || defined(IOS)
    buttonPause.draw(db, color, colorOverlay);
#endif

    if (g_Config.bShowAnalogStick)
        leftStick.draw(db, color);
}
开发者ID:Nementon,项目名称:ppsspp,代码行数:26,代码来源:GamepadEmu.cpp


示例5: LayoutGamepad

void LayoutGamepad(int w, int h)
{
	float controlScale = g_Config.bLargeControls ? g_Config.fButtonScale : 1.15;

	const int button_spacing = 50 * controlScale;
	const int arrow_spacing = 40 * controlScale;

	const int circleX = w - 40 * controlScale;
	const int circleY = h - 120 * controlScale;

	const int leftX = 40 * controlScale;
	int leftY = h - 120 * controlScale;

	if (g_Config.bShowAnalogStick) {
		leftY = h - 250 * controlScale;
	}

	const int stickX = leftX + arrow_spacing;
	const int stickY = h - 80 * controlScale;

	const int halfW = w / 2;

	buttonO.setPos(circleX, circleY, controlScale);
	buttonX.setPos(circleX - button_spacing, circleY + button_spacing, controlScale);
	buttonTri.setPos(circleX - button_spacing, circleY - button_spacing, controlScale);
	buttonSq.setPos(circleX - button_spacing * 2, circleY, controlScale);

	crossPad.setPos(leftX + arrow_spacing, leftY, 40, controlScale);

	if (g_Config.iFpsLimit)
		buttonVPS.setPos(halfW - button_spacing * 2, h - 20 * controlScale, controlScale);
	else
		buttonTurbo.setPos(halfW - button_spacing * 2, h - 20 * controlScale, controlScale);
	buttonSelect.setPos(halfW , h - 20 * controlScale, controlScale);
	buttonStart.setPos(halfW + button_spacing * 2 , h - 20 * controlScale, controlScale);
	buttonLShoulder.setPos(button_spacing + 10 * controlScale, 30 * controlScale, controlScale);
	buttonRShoulder.setPos(w - button_spacing - 10 * controlScale, 30 * controlScale, controlScale);


#if defined(__SYMBIAN32__) || defined(IOS) || defined(MEEGO_EDITION_HARMATTAN)
	buttonPause.setPos(halfW, 15 * controlScale, controlScale);
#endif

	leftStick.setPos(stickX, stickY, controlScale);
}
开发者ID:Darth1701,项目名称:ppsspp,代码行数:45,代码来源:GamepadEmu.cpp


示例6: LayoutGamepad

void LayoutGamepad(int w, int h)
{
    float controlScale = g_Config.bLargeControls ? 1.6 : 1.15;

    const int button_spacing = 50 * controlScale;
    const int arrow_spacing = 40 * controlScale;

    const int circleX = w - 40 * controlScale;
    const int circleY = h - 120 * controlScale;

    const int leftX = 40 * controlScale;
    int leftY = h - 120 * controlScale;

    if (g_Config.bShowAnalogStick) {
        leftY = h - 250 * controlScale;
    }

    const int stickX = leftX + arrow_spacing;
    const int stickY = h - 80 * controlScale;

    const int halfW = w / 2;

    buttonO.setPos(circleX, circleY, controlScale);
    buttonX.setPos(circleX - button_spacing, circleY + button_spacing, controlScale);
    buttonTri.setPos(circleX - button_spacing, circleY - button_spacing, controlScale);
    buttonSq.setPos(circleX - button_spacing * 2, circleY, controlScale);

    buttonLeft.setPos(leftX, leftY, controlScale);
    buttonUp.setPos(leftX + arrow_spacing, leftY - arrow_spacing, controlScale);
    buttonDown.setPos(leftX + arrow_spacing, leftY + arrow_spacing, controlScale);
    buttonRight.setPos(leftX + arrow_spacing * 2, leftY, controlScale);

    buttonSelect.setPos(halfW - button_spacing, h - 20 * controlScale, controlScale);
    buttonStart.setPos(halfW + button_spacing, h - 20 * controlScale, controlScale);
    buttonLShoulder.setPos(button_spacing + 10 * controlScale, 15 * controlScale, controlScale);
    buttonRShoulder.setPos(w - button_spacing - 10 * controlScale, 15 * controlScale, controlScale);

#if defined(__SYMBIAN32__) || defined(IOS)
    buttonPause.setPos(halfW, 15 * controlScale, controlScale);
#endif

    leftStick.setPos(stickX, stickY, controlScale);
}
开发者ID:Nementon,项目名称:ppsspp,代码行数:43,代码来源:GamepadEmu.cpp


示例7: UpdateGamepad

void UpdateGamepad(InputState &input_state)
{
	buttonO.update(input_state);
	buttonX.update(input_state);
	buttonTri.update(input_state);
	buttonSq.update(input_state);

	buttonLeft.update(input_state);
	buttonUp.update(input_state);
	buttonDown.update(input_state);
	buttonRight.update(input_state);

	buttonSelect.update(input_state);
	buttonStart.update(input_state);
	buttonLShoulder.update(input_state);
	buttonRShoulder.update(input_state);

	if (g_Config.bShowAnalogStick)
		leftStick.update(input_state);
}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:20,代码来源:GamepadEmu.cpp


示例8: DrawGamepad

void DrawGamepad(DrawBuffer &db)
{
	uint32_t color = 0xa0c0b080;
	uint32_t colorOverlay = 0xa0FFFFFF;
	buttonO.draw(db, color, colorOverlay);
	buttonX.draw(db, color, colorOverlay);
	buttonTri.draw(db, color, colorOverlay);
	buttonSq.draw(db, color, colorOverlay);

	buttonLeft.draw(db, color, colorOverlay);
	buttonUp.draw(db, color, colorOverlay);
	buttonDown.draw(db, color, colorOverlay);
	buttonRight.draw(db, color, colorOverlay);

	buttonSelect.draw(db, color, colorOverlay);
	buttonStart.draw(db, color, colorOverlay);
	buttonLShoulder.draw(db, color, colorOverlay);
	buttonRShoulder.draw(db, color, colorOverlay);

	if (g_Config.bShowAnalogStick)
		leftStick.draw(db, color);
}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:22,代码来源:GamepadEmu.cpp


示例9: LayoutGamepad

void LayoutGamepad(int w, int h)
{
	const int button_spacing = 50;
	const int arrow_spacing = 40;

	const int circleX = w - 40;
	const int circleY = h - 120;

	const int leftX = 40;
	int leftY = h - 120;

	if (g_Config.bShowAnalogStick) {
		leftY = h - 220;
	}

	const int stickX = leftX + arrow_spacing;
	const int stickY = h - 80;

	const int halfW = w / 2;

	buttonO.setPos(circleX, circleY);
	buttonX.setPos(circleX - button_spacing, circleY + button_spacing);
	buttonTri.setPos(circleX - button_spacing, circleY - button_spacing);
	buttonSq.setPos(circleX - button_spacing * 2, circleY);

	buttonLeft.setPos(leftX, leftY);
	buttonUp.setPos(leftX + arrow_spacing, leftY - arrow_spacing);
	buttonDown.setPos(leftX + arrow_spacing, leftY + arrow_spacing);
	buttonRight.setPos(leftX + arrow_spacing * 2, leftY);

	buttonSelect.setPos(halfW - button_spacing, h - 20);
	buttonStart.setPos(halfW + button_spacing, h - 20);
	buttonLShoulder.setPos(button_spacing + 10, 15);
	buttonRShoulder.setPos(w - button_spacing - 10, 15);

	leftStick.setPos(stickX, stickY);
}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:37,代码来源:GamepadEmu.cpp


示例10: DrawGamepad

void DrawGamepad(DrawBuffer &db)
{
	uint32_t color = 0xa0c0b080;
	uint32_t colorOverlay = 0xa0FFFFFF;
	buttonO.draw(db, color, colorOverlay);
	buttonX.draw(db, color, colorOverlay);
	buttonTri.draw(db, color, colorOverlay);
	buttonSq.draw(db, color, colorOverlay);

	crossPad.draw(db, color, colorOverlay);

	buttonSelect.draw(db, color, colorOverlay);
	buttonStart.draw(db, color, colorOverlay);
	buttonLShoulder.draw(db, color, colorOverlay);
	buttonRShoulder.draw(db, color, colorOverlay);
	buttonTurbo.draw(db, color, colorOverlay);

#if defined(__SYMBIAN32__) || defined(IOS) || defined(MEEGO_EDITION_HARMATTAN)
	buttonPause.draw(db, color, colorOverlay);
#endif

	if (g_Config.bShowAnalogStick)
		leftStick.draw(db, color);
}
开发者ID:ycechung,项目名称:ppsspp,代码行数:24,代码来源:GamepadEmu.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ Tower类代码示例发布时间:2022-05-31
下一篇:
C++ TouchList类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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