コード例 #1
0
ファイル: passwordfield.cpp プロジェクト: ManaPlus/ManaPlus
PasswordField::PasswordField(const Widget2 *const widget,
                             const std::string &text) :
    TextField(widget, text,
        LoseFocusOnTab_true, nullptr, std::string(), false),
    mPasswordChar(mSkin != nullptr ? CAST_8(
        mSkin->getOption("passwordChar", 42)) : CAST_8(42))
{
}
コード例 #2
0
ファイル: emotewindow.cpp プロジェクト: dreamsxin/ManaPlus
std::string EmoteWindow::getSelectedColor() const
{
    const int index = mColorPage->getSelected();
    if (index < 0)
        return std::string();

    char chr[2];
    chr[0] = CAST_8('0' + index);
    chr[1] = 0;
    return std::string("##").append(&chr[0]);
}
コード例 #3
0
ファイル: emotewindow.cpp プロジェクト: dreamsxin/ManaPlus
std::string EmoteWindow::getSelectedEmote() const
{
    const int index = mEmotePage->getSelectedIndex();
    if (index < 0)
        return std::string();

    char chr[2];
    chr[0] = CAST_8('0' + index);
    chr[1] = 0;
    return std::string("%%").append(&chr[0]);
}