Esempio 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);
	}
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];
}
Esempio 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();
}
Esempio n. 4
0
ZKeyEventSwcMapper::ZKeyEventSwcMapper(NeuTube::Document::ETag tag) :
  m_docTag(tag)
{
  initKeyMap();
}
Esempio n. 5
0
bool Controller::initController()
{
	initKeyMap();
	return true;
}
Esempio n. 6
0
InputCommandMapper::InputCommandMapper(const std::string& state, const std::string& configSection) : mState(state), mEnabled(true), mInput(0)
{
	initKeyMap();
	readFromConfigSection(configSection);
}
Esempio n. 7
0
InputCommandMapper::InputCommandMapper(const std::string& state) : mState(state), mEnabled(true), mInput(0)
{
	initKeyMap();
}