Exemplo n.º 1
0
	//! constructor
	CIrrDeviceMarmalade::CIrrDeviceMarmalade(const SIrrlichtCreationParameters& param)
		: CIrrDeviceStub(param), Paused(false)
	{
		initKeyMap();

		CursorControl = new CMarmaladeCursor(this);

		//video::SExposedVideoData data;

		SIrrlichtCreationParameters params = param;
		params.WindowSize.Width = s3eSurfaceGetInt(S3E_SURFACE_WIDTH);
		params.WindowSize.Height = s3eSurfaceGetInt(S3E_SURFACE_HEIGHT);

		int32 glver = s3eGLGetInt(S3E_GL_VERSION);
		if(glver >= 0x200)
			VideoDriver = video::createOGLES2Driver(params, FileSystem);
		else
			VideoDriver = video::createOGLES1Driver(params, FileSystem);

        glViewport(0, 0, params.WindowSize.Width, params.WindowSize.Height);

		if (VideoDriver)
			createGUIAndScene();

		s3eDeviceRegister(S3E_DEVICE_EXIT, &do_Exit, this);
		s3eDeviceRegister(S3E_DEVICE_PAUSE, &do_Pause, this);
		s3eDeviceRegister(S3E_DEVICE_UNPAUSE, &do_Unpause, this);

		s3eKeyboardRegister(S3E_KEYBOARD_KEY_EVENT, &do_KeyEvent, this);
		s3eKeyboardRegister(S3E_KEYBOARD_CHAR_EVENT, &do_CharEvent, this);
	}
Exemplo n.º 2
0
static QString keyToString(int k)
{
	if (	k == Qt::Key_Shift || k == Qt::Key_Control || k == Qt::Key_Meta ||
			k == Qt::Key_Alt || k == Qt::Key_AltGr )
		return QString::null;

	initKeyMap();
	
	return keyMap[k];
}
Exemplo n.º 3
0
CloudEditorWidget::CloudEditorWidget (QWidget *parent)
  : QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::DepthBuffer |
                        QGL::Rgba | QGL::StencilBuffer), parent),
    point_size_(2.0), selected_point_size_(4.0),
    cam_fov_(60.0), cam_aspect_(1.0), cam_near_(0.0001), cam_far_(100.0),
    color_scheme_(COLOR_BY_PURE), is_colored_(false)
{
  setFocusPolicy(Qt::StrongFocus);
  command_queue_ptr_ = CommandQueuePtr(new CommandQueue());
  initFileLoadMap();
  initKeyMap();
}
Exemplo n.º 4
0
ZKeyEventSwcMapper::ZKeyEventSwcMapper(NeuTube::Document::ETag tag) :
  m_docTag(tag)
{
  initKeyMap();
}
Exemplo n.º 5
0
bool Controller::initController()
{
	initKeyMap();
	return true;
}
Exemplo n.º 6
0
InputCommandMapper::InputCommandMapper(const std::string& state, const std::string& configSection) : mState(state), mEnabled(true), mInput(0)
{
	initKeyMap();
	readFromConfigSection(configSection);
}
Exemplo n.º 7
0
InputCommandMapper::InputCommandMapper(const std::string& state) : mState(state), mEnabled(true), mInput(0)
{
	initKeyMap();
}