コード例 #1
0
ファイル: TerrainData.cpp プロジェクト: Pinkof/rpgskyengine
void CTerrainData::setVertexHeight(int nCellX, int nCellY, float fHeight)
{
	if (isPointIn(nCellX,nCellY))
	{
		getCell(nCellX,nCellY)->fHeight = fHeight;
	}
}
コード例 #2
0
ファイル: SceneData.cpp プロジェクト: constantinbogdan/node3d
void CSceneData::setVertexColor(int x, int y, Color32 color)
{
	if (isPointIn(x,y))
	{
		getCell(x,y)->color = color;
	}
}
コード例 #3
0
ファイル: SceneData.cpp プロジェクト: constantinbogdan/node3d
void CSceneData::setVertexHeight(int x, int y, float fHeight)
{
	if (isPointIn(x,y))
	{
		getCell(x,y)->fHeight = fHeight;
	}
}
コード例 #4
0
ファイル: TerrainData.cpp プロジェクト: Pinkof/rpgskyengine
void CTerrainData::setVertexColor(int nCellX, int nCellY, Color32 color)
{
	if (isPointIn(nCellX,nCellY))
	{
		getCell(nCellX,nCellY)->color = color;
	}
}
コード例 #5
0
ファイル: SceneData.cpp プロジェクト: constantinbogdan/node3d
Color32 CSceneData::getVertexColor(int x, int y)const
{
	if (isPointIn(x,y))
	{
		return getCell(x,y)->color;
	}
	return 0xFFFFFFFF;
}
コード例 #6
0
ファイル: SceneData.cpp プロジェクト: constantinbogdan/node3d
float CSceneData::getVertexHeight(int x, int y)const
{
	if (isPointIn(x,y))
	{
		return getCell(x,y)->fHeight;
	}
	return 0.0f;
}
コード例 #7
0
ファイル: TerrainData.cpp プロジェクト: Pinkof/rpgskyengine
Color32 CTerrainData::getVertexColor(int nCellX, int nCellY)const
{
	if (isPointIn(nCellX,nCellY))
	{
		return getCell(nCellX,nCellY)->color;
	}
	return 0xFFFFFFFF;
}
コード例 #8
0
ファイル: TerrainData.cpp プロジェクト: Pinkof/rpgskyengine
float CTerrainData::getVertexHeight(int nCellX, int nCellY)const
{
	if (isPointIn(nCellX,nCellY))
	{
		return getCell(nCellX,nCellY)->fHeight;
	}
	return 0.0f;
}
コード例 #9
0
bool UIElement::mouseDown( app::MouseEvent event )
{	
	if (isPointIn(event.getPos()))
		_state = CLICK;
	else
		_state = NORMAL;
	return false;
}
コード例 #10
0
bool UIElement::mouseMove( app::MouseEvent event )
{
	if (isPointIn(event.getPos()))
		_state = OVER;
	else
		_state = NORMAL;
	return false;
}
コード例 #11
0
bool StGLSwitchTextured::tryClick(const StPointD_t& theCursorZo, const int& theMouseBtn, bool& isItemClicked) {
    if(!isVisible()) {
        return false; // nothing to see - nothing to click...
    }
    if(!isItemClicked && isPointIn(theCursorZo)) {
        setClicked(theMouseBtn, true);
        isItemClicked = true;
        return true;
    }
    return false;
}
コード例 #12
0
ファイル: StGLRootWidget.cpp プロジェクト: zodsoft/sview
bool StGLRootWidget::tryClick(const StClickEvent& theEvent,
                              bool&               theIsItemClicked) {
    const StPointD_t aCursorBack = cursorZo;
    cursorZo = StPointD_t(theEvent.PointX, theEvent.PointY);
    if(isPointIn(cursorZo)) {
        setClicked(theEvent.Button, true);
    }
    const bool aResult = StGLWidget::tryClick(theEvent, theIsItemClicked);
    cursorZo = aCursorBack;
    return aResult;
}
コード例 #13
0
ファイル: CtrlButton.cpp プロジェクト: alexpomorin/libxl
void CCtrlButton::onLButtonUp (CPoint pt, uint /*key*/) {
	if (disable) {
		if (_GetMainCtrl()->getCaptureCtrl() == shared_from_this()) {
			_Capture(false);
		}
		return;
	}
	_Capture(false);
	m_pushAndCapture = false;
	invalidate();

	assert (_GetTarget() != NULL);
	if (isPointIn(pt)) {
		_GetTarget()->onCommand(m_id, shared_from_this());
	}
}
コード例 #14
0
ファイル: StGLWidget.cpp プロジェクト: KindDragon/sview
bool StGLWidget::tryClick(const StPointD_t& cursorZo, const int& mouseBtn, bool& isItemClicked) {
    if(!isVisible()) {
        return false; // nothing to see - nothing to click... (all children too!)
    }
    for(StGLWidget *child(myChildren.getLast()), *childActive(NULL); child != NULL;) {
        childActive = child;
        child = child->getPrev();
        childActive->tryClick(cursorZo, mouseBtn, isItemClicked);
    }
    if(!isItemClicked && isPointIn(cursorZo)) {
        setClicked(mouseBtn, true);
        isItemClicked = signals.onMouseClick(mouseBtn);
        return true;
    }
    return false;
}
コード例 #15
0
bool StGLSwitchTextured::tryUnClick(const StPointD_t& theCursorZo, const int& theMouseBtn, bool& isItemUnclicked) {
    if(!isVisible()) {
        return false; // nothing to see - nothing to click...
    }
    bool isSelfClicked = isClicked(theMouseBtn) && isPointIn(theCursorZo);
    setClicked(theMouseBtn, false);
    if(!isItemUnclicked && isSelfClicked) {
        isItemUnclicked = true;

        int32_t anActiveValue = myTrackValue->getValue();
        StGLRadioButtonTextured* aRadioBtn = NULL;
        for(StGLWidget* aChild = getChildren()->getStart(); aChild != NULL;) {
            /// TODO (Kirill Gavrilov#9) - adding children with another type is not allowed
            ///                            hovewer not protected thus this cast is not thread-safe!
            aRadioBtn = (StGLRadioButtonTextured* )aChild;
            aChild = aChild->getNext();

            if(anActiveValue == aRadioBtn->getValueOn()) {
                // switch to next
                while(aChild != NULL) {
                    aRadioBtn = (StGLRadioButtonTextured* )aChild;
                    if(!mySkipValues.contains(aRadioBtn->getValueOn())) {
                        myTrackValue->setValue(aRadioBtn->getValueOn());
                        break;
                    }
                    aChild = aChild->getNext();
                }
                if(aChild == NULL) {
                    // switch to first
                    aRadioBtn = (StGLRadioButtonTextured* )getChildren()->getStart();
                    myTrackValue->setValue(aRadioBtn->getValueOn());
                }
                break;
            }
        }
        return true;
    }
    return false;
}