コード例 #1
0
ファイル: Teleport.cpp プロジェクト: simplerr/Simply2D
Teleport::Teleport(float enterX, float enterY, float destX, float destY, int width, int height, char *enterTextureSource, char *destTextureSource)
		  :Object(enterX, enterY, width, height, enterTextureSource, TELEPORT)
{
	mDestX = destX;
	mDestY = destY;

	// load the destination texture
	mDestTexture = gGraphics->loadObjectTexture(destTextureSource);
	strcpy(mDestTextureSource, destTextureSource);

	setResizeable(false);
}
コード例 #2
0
CFramelessWindow::CFramelessWindow(QWidget *parent)
    : QMainWindow(parent),
      m_titlebar(Q_NULLPTR),
      m_borderWidth(5),
      m_bJustMaximized(false),
      m_bResizeable(true)
{
//    setWindowFlag(Qt::Window,true);
//    setWindowFlag(Qt::FramelessWindowHint, true);
//    setWindowFlag(Qt::WindowSystemMenuHint, true);
//    setWindowFlag() is not avaliable before Qt v5.9, so we should use setWindowFlags instead

    setWindowFlags(windowFlags() | Qt::Window | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);

    setResizeable(m_bResizeable);
}
コード例 #3
0
ファイル: ActivateButton.cpp プロジェクト: simplerr/Simply2D
ActivateButton::ActivateButton(float x, float y, int width, int height, char *textureSource)
	: Object(x, y, width, height, textureSource, ACTIVATE_BUTTON)
{
	mActivationRect = getShape()->getRect();
	mActivationRect.left -= 20;
	mActivationRect.right += 20;
	mActivationRect.top -= 20;
	mActivationRect.bottom += 20;

	setResizeable(false);

	mGate = NULL;
	mLevel = NULL;
	mGateId = 99999;

	mPressedTexture = gGraphics->loadObjectTexture((char*)ACTIVATEBUTTON_PRESSED_SOURCE.c_str());
}
コード例 #4
0
void MainWindow::on_btnResizeable_clicked()
{
    setResizeable(!isResizeable());
}