Пример #1
0
void ServerConnectWnd::PopulateServerList()
{
    m_servers_lb->Clear();
    for (ClientNetworking::ServerList::iterator it = m_LAN_servers.begin(); it != m_LAN_servers.end(); ++it) {
        GG::ListBox::Row* row = new GG::ListBox::Row;
        row->push_back(it->second, ClientUI::GetFont(), ClientUI::TextColor());
        m_servers_lb->Insert(row);
    }
}
Пример #2
0
ListBox::Row* DefaultRowFactoryFunction(const adobe::dictionary_t& parameters)
{
    std::string drag_drop_data_type;
    adobe::get_value(parameters, adobe::static_name_t("drag_drop_data_type"), drag_drop_data_type);
    GG::ListBox::Row* retval =
        new GG::ListBox::Row(GG::X1, adobe::implementation::RowHeight(), drag_drop_data_type);
    std::string name;
    adobe::get_value(parameters, adobe::static_name_t("name"), name);
    Clr color;
    adobe::implementation::get_color(parameters, adobe::static_name_t("color"), color);
    retval->push_back(
        adobe::implementation::Factory().NewTextControl(GG::X0, GG::Y0, name,
                                                        adobe::implementation::DefaultFont(),
                                                        color, GG::FORMAT_LEFT)
    );
    return retval;
}