Beispiel #1
0
////////////////////////////////////////////////////////////
// QueueListBox
////////////////////////////////////////////////////////////
QueueListBox::QueueListBox(const std::string& drop_type_str, const std::string& prompt_str) :
    CUIListBox(),
    m_drop_point(end()),
    m_show_drop_point(false),
    m_order_issuing_enabled(true),
    m_showing_prompt(false),
    m_prompt_str(prompt_str)
{
    if (!drop_type_str.empty())
        AllowDropType(drop_type_str);

    GG::Connect(BeforeInsertSignal,                 &QueueListBox::EnsurePromptHiddenSlot,      this);
    GG::Connect(AfterEraseSignal,                   &QueueListBox::ShowPromptConditionallySlot, this);
    GG::Connect(ClearedSignal,                      &QueueListBox::ShowPromptSlot,              this);
    GG::Connect(GG::ListBox::RightClickedSignal,    &QueueListBox::ItemRightClicked,            this);

    // preinitialize listbox/row column widths, because what
    // ListBox::Insert does on default is not suitable for this case
    SetNumCols(1);
    SetColWidth(0, GG::X0);
    LockColWidths();
    NormalizeRowsOnInsert(false);

    ShowPromptSlot();
}
Beispiel #2
0
 PlayerListBox(void) :
     CUIListBox()
 {
     // preinitialize listbox/row column widths, because what
     // ListBox::Insert does on default is not suitable for this case
     SetNumCols(1);
     SetColWidth(0, GG::X0);
     LockColWidths();
 }
Beispiel #3
0
 SaveFileListBox() :
     CUIListBox ( GG::X0, GG::Y0, GG::X1, GG::Y1 )
 {
     SetNumCols ( 5 );
     SetColWidth ( 0, GG::X0 );
     SetColWidth ( 1, GG::X0 );
     SetColWidth ( 2, GG::X0 );
     SetColWidth ( 3, GG::X0 );
     SetColWidth ( 4, GG::X0 );
     LockColWidths();
 }