User

Difference between revisions of "Sascha"

From Guiliani

Line 23: Line 23:
 
//        pkScreen->DrawLine(eGML_Vector2(0, 0), eGML_Vector2(10, 10), 0xff004400, 0, 1, 1);
 
//        pkScreen->DrawLine(eGML_Vector2(0, 0), eGML_Vector2(10, 10), 0xff004400, 0, 1, 1);
 
     }
 
     }
 +
 +
----------------
 +
 +
eC_Bool ExampleBehaviour::DoClick(
 +
    const eC_Value &vAbsX,
 +
    const eC_Value &vAbsY)
 +
{
 +
    if (
 +
        (m_eContainer != NO_HANDLE) &&
 +
        (m_eTargetObject != NO_HANDLE)
 +
        )
 +
    {
 +
        CGUICompositeObject* pkContainer = dynamic_cast<CGUICompositeObject*>(GETGUI.GetObjectByID(m_eContainer));
 +
        if (NULL != pkContainer)
 +
        {
 +
            for (eC_UInt uiChild = 0; uiChild < pkContainer->GetNumberOfChildren(); ++uiChild)
 +
            {
 +
                CGUIObject* pkCurrentChild = pkContainer->GetChild(uiChild);
 +
                if (pkCurrentChild->GetID() == m_eTargetObject)
 +
                    pkCurrentChild->SetInvisible(false);
 +
                else
 +
                    pkCurrentChild->SetInvisible(true);
 +
            }
 +
        }
 +
    }
 +
    return true;
 +
}
  
 
----------------
 
----------------

Revision as of 19:55, 19 July 2018

    CGfxWrapeGML* pkWrap = dynamic_cast<CGfxWrapeGML*>(&GETGFX);
    if (NULL != pkWrap)
    {
        eGML_Screen* pkScreen = pkWrap->GetScreen();
        unsigned short* memory = (unsigned short*)pkScreen->Lock();

        eC_UInt uiWidth = pkScreen->GetWidth();
        eC_UInt uiHeight = pkScreen->GetHeight();

        memset(memory, 0xf1, uiWidth * uiHeight);
        for (eC_UInt y = 0; y < uiHeight; ++y)
        {
            for (eC_UInt x = 0; x < uiWidth; ++x)
            {
                unsigned short val = memory[y * uiWidth + x];
                memory[y * uiWidth + x] = (val + (x * y)) & 0xffff;
            }
        }

        pkScreen->Unlock();

//        pkScreen->DrawLine(eGML_Vector2(0, 0), eGML_Vector2(10, 10), 0xff004400, 0, 1, 1);
    }

----------------

eC_Bool ExampleBehaviour::DoClick(
    const eC_Value &vAbsX,
    const eC_Value &vAbsY)
{
    if (
        (m_eContainer != NO_HANDLE) &&
        (m_eTargetObject != NO_HANDLE)
        )
    {
        CGUICompositeObject* pkContainer = dynamic_cast<CGUICompositeObject*>(GETGUI.GetObjectByID(m_eContainer));
        if (NULL != pkContainer)
        {
            for (eC_UInt uiChild = 0; uiChild < pkContainer->GetNumberOfChildren(); ++uiChild)
            {
                CGUIObject* pkCurrentChild = pkContainer->GetChild(uiChild);
                if (pkCurrentChild->GetID() == m_eTargetObject)
                    pkCurrentChild->SetInvisible(false);
                else
                    pkCurrentChild->SetInvisible(true);
            }
        }
    }
    return true;
}

----------------

eC_UInt CalcDayNumFromDate(eC_UInt y, eC_UByte m, eC_UByte d)
{
    m = (m + 9) % 12;
    y -= m / 10;
    eC_UInt dn = 365 * y + y / 4 - y / 100 + y / 400 + (m * 306 + 5) / 10 + (d - 1) + 3;

    return dn % 7;
}

------------------

https://www.appcues.com/blog/30-awesome-free-ui-vector-kits-for-your-mockups-and-wireframes
designmodo.github.io/Flat-UI/
https://mashable.com/2013/07/29/flat-design-ui-kits/?europe=true

- auto-stretch for text
- invalidate layout after resizing
- calendar-widget
- rating-slider (bargraph)
- multiedge-slider