Исходник Inlined colorpicker supremacy

Участник
Статус
Оффлайн
Регистрация
6 Апр 2021
Сообщения
338
Реакции[?]
207
Поинты[?]
113K
1717881022481.png

gui.cpp:
if ( e->m_show ) {
    // slight correction.
    if ( e->m_type != ElementTypes::COLORPICKER ) { // we do not have label on colorpicker
        if ( !e->m_use_label )
            f->m_active_tab->m_element_offset[ e->m_col ] -= ( ELEMENT_DISTANCE - ELEMENT_COMBINED_DISTANCE );
    }

    e->m_pos.y = f->m_active_tab->m_element_offset[ e->m_col ];

    // set offset for next element.
    if ( e->m_type == ElementTypes::COLORPICKER ) {

    }
    else {
        f->m_active_tab->m_element_offset[ e->m_col ] += ( ELEMENT_COMBINED_DISTANCE + e->m_base_h );
    }
}
colorpicker.hpp:
__forceinline Colorpicker( ) : m_open{ false }, m_label{}, m_color{}, m_ptr{ nullptr } {
    m_flags = ElementFlags::DRAW | ElementFlags::CLICK | ElementFlags::ACTIVE | ElementFlags::SAVE | ElementFlags::DEACIVATE;
    m_type = ElementTypes::COLORPICKER;
    m_h = m_base_h = 8;
    m_use_label = true;
    m_show = true;
}
 
Последнее редактирование:
Сверху Снизу