예제 #1
0
파일: geometry.cpp 프로젝트: haku-kun/TTS
	void Rect<T>::set(const T &x,
										const T &y,
										const T &w,
										const T &h) {
	setXY(x, y);
	setWH(w, h);
}
예제 #2
0
파일: Bomb.cpp 프로젝트: ma302jh/BomberMan
Bomb::Bomb(int _X, int _Y): Sprites("Balst.png",3 , 5){

    //set fuse animation loop
    loopMode(true, 0 ,5);

     setWH(20 ,20);

    //this is a blastlet
    setBlast(true);

    //initialises the objects member variables
    setPosX(_X);
    setPosY(_Y);
    setPos(getPosX(), getPosY());
}
예제 #3
0
//constructor with button object initialised in initialiser list
textIn::textIn ( int _x, int _y, int _width, int _height, sf::RenderWindow &_rw): Sprites( _rw, "media/cb.bmp") {

    //selected is default false
    setSelected(false);

    //set x y and width of box heights set at 30 for now
    setXY( _x, _y);
    setWH(_width, _height);

    setCaret(_x, _y, getHeight());
    caretIndex = 1;
    caretPosition.push_back(caretX);

    if (!font.loadFromFile("media/Pink Bunny.ttf")){

        std::cout<<"Likely name of font incorrect";
    }

    setRects();
}
예제 #4
0
파일: Bomb.cpp 프로젝트: ma302jh/BomberMan
Bomb::Bomb(int _X, int _Y, int _F, int _T): Sprites("Balst.png",3 , 5){

    //set fuse animation loop
    loopMode(true, 10 ,15);

    //initialises the objects member variables
    setPosX(_X);
    setPosY(_Y);
    setPos(getPosX(), getPosY());
    setBombTicks(_T);
    setFlame(_F);
    setWH(20 ,20);

    //not used yet
    setUsed(false);

    //not igniting
    setIgnite(false);

    //is a bomb not a blast
    setBlast(false);
}
예제 #5
0
void CSulGuiDial::init()
{
	CSulGuiCanvas::init();

	setWH( m_radius*2.0f, m_radius*2.0f );

	CSulGeodeCircle* pCircle = new CSulGeodeCircle( m_radius );
	pCircle->setOffset( osg::Vec3(m_radius, m_radius, 0.0f) );
	addChild( pCircle );

	m_mt = new osg::MatrixTransform;
	osg::Matrix m;
	m.setTrans( osg::Vec3(m_radius,m_radius,0) );
	m_mt->setMatrix( m );
	CSulGeomArrow2D* pArrow = new CSulGeomArrow2D( m_radius, 10.0f, 10.0f );
	m_mt->addChild( pArrow );
	addChild( m_mt );

	getEventHandler()->wantEvent( this, this, CSulGuiEventHandler::EVENT_MOUSERELEASE ); 

	showCanvas( false );
}
예제 #6
0
OpenShortResult::OpenShortResult():
    mWidth(0)
    ,mHeight(0)
    ,mPointReulst(0)
    ,mLineResult(0)
    ,mPointNG(0)
	,mSecondNG(0)
    ,mLineNG(0)
    ,mCycleTxDiff(0)
    ,mTXPointShortResult(0)
    ,mCycleRxDiff(0)
    ,mRXPointShortResult(0)
    ,mLineNearFarValue(0)
    ,mLineNearFarResult(0)
    ,lostSide(0)
{

    mPointNG = 0;
    mLineNG = 0;
    mPointReulst = 0;
    mLineResult = 0;

    setWH(DEFAULT_W, DEFAULT_H);
}
예제 #7
0
OpenShortResult::OpenShortResult(int w, int h) :
    mWidth(w)
    ,mHeight(h)
    ,mPointReulst(0)
    ,mLineResult(0)
    ,mPointNG(0)
	,mSecondNG(0)
    ,mLineNG(0)
    ,mCycleTxDiff(0)
    ,mTXPointShortResult(0)
    ,mCycleRxDiff(0)
    ,mRXPointShortResult(0)
    ,mLineNearFarValue(0)
    ,mLineNearFarResult(0)
    ,lostSide(0)
{

    mPointNG = 0;
    mLineNG = 0;
    mPointReulst = 0;
    mLineResult = 0;

    setWH(w, h);
}