xranzei 1
xranzei
Best Studio 1
Best Studio
Bvural41 1
Bvural41
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Hikaye Ekle

TextLine İçin OutLineColor Uzantısı

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!



C++:
EterPythonLib/PythonWindowManagerModule.cpp

Açılır ve eklenir

PyObject * wndTextSetOutLineColor(PyObject * poSelf, PyObject * poArgs)
{
    UI::CWindow * pWindow;
    if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
        return Py_BuildException();

    if (2 == PyTuple_Size(poArgs))
    {
        DWORD dwColor;
        // <!> PyTuple_GetUnsignedLong might cause some problems, change it if you need <!>
        if (!PyTuple_GetUnsignedLong(poArgs, 1, &dwColor))
            return Py_BuildException();
        ((UI::CTextLine*)pWindow)->SetOutLineColor(dwColor);
    }
    else if (5 == PyTuple_Size(poArgs))
    {
        float fr;
        if (!PyTuple_GetFloat(poArgs, 1, &fr))
            return Py_BuildException();
        float fg;
        if (!PyTuple_GetFloat(poArgs, 2, &fg))
            return Py_BuildException();
        float fb;
        if (!PyTuple_GetFloat(poArgs, 3, &fb))
            return Py_BuildException();
        float fa;
        if (!PyTuple_GetFloat(poArgs, 4, &fa))
            return Py_BuildException();

        ((UI::CTextLine*)pWindow)->SetOutLineColor(fr, fg, fb, fa);
    }
    else
    {
        return Py_BuildException();
    }

    return Py_BuildNone();
}

////

        { "SetOutLineColor",            wndTextSetOutLineColor,                METH_VARARGS },

C++:
EterPythonLib/PythonWindow.h

Açılır ve
SetFontColor ' un altına eklenir
    
            void SetOutLineColor(DWORD dwColor);
            void SetOutLineColor(float fR, float fG, float fB, float fA);'

C++:
EterPythonLib/PythonWindow.cpp

Açılır ve
CTextLine::SetFontColor ' un altına eklenir
    
    void CTextLine::SetOutLineColor(DWORD dwColor)
    {
        m_TextInstance.SetOutLineColor(dwColor);
    }
    void CTextLine::SetOutLineColor(float fR, float fG, float fB, float fA)
    {
        m_TextInstance.SetOutLineColor(fR, fG, fB, fA);
    }'

Python:
 root/ui.py
    
Açılır ve
SetPackedFontColor ' un altına eklenir

    def SetOutLineColor(self, red, green, blue, alpha):
        wndMgr.SetOutLineColor(self.hWnd, red, green, blue, alpha)

    def SetPackedOutLineColor(self, color):
        wndMgr.SetOutLineColor(self.hWnd, color)'

Test skript

 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst