Rogue Class Linux Download Login

Artifact Content

Artifact 4ffe54c57bd5749236babc462237522030c17270:


proc ::dlg::showMsgbox {win opts items} {
    lassign [dict find $opts -cr-wrap undefined] crWrap
    lassign [dict find $opts -no-collapse undefined] noCollapse
    lassign [dict find $opts -title] title
    lassign [dict find $opts -widget] text height width
    if {$noCollapse eq "undefined"} {
        set text [::dlg::getCollapsedText $text]
    }
    if {$crWrap eq "undefined"} {
        set text [::dlg::getRewrappedText $text]
        set wrap 1
    } else {
        set wrap 0
    }
    set text [::dlg::getInterpText $text]

    AG_WindowSetPosition $win $::dagar::AG_WINDOW_MC 1
    set w [::dlg::getBacktitle $win $opts]
    set box [::dlg::getFrame $w $title $opts]

    set flags [expr {
        $::dagar::AG_TEXTBOX_ABANDON_FOCUS |
        $::dagar::AG_TEXTBOX_EXCL          |
        $::dagar::AG_TEXTBOX_EXPAND        |
        $::dagar::AG_TEXTBOX_MULTILINE     |
        $::dagar::AG_TEXTBOX_NOPOPUP       |
        $::dagar::AG_TEXTBOX_READONLY
    }]
    set tb [AG_TextboxNewS $box $flags ""]
    AG_TextboxSetWordWrap $tb $wrap
    set ed [$tb cget -ed]
    AG_EditableSetString $ed $text
    AG_EditableSizeHint $ed [string repeat "." 80]
    AG_EditableSizeHintLines $ed 24

    set box2 [AG_BoxNew $box $::dagar::AG_BOX_HORIZ $::dagar::AG_BOX_HFILL]
    AG_BoxSetHorizAlign $box2 $::dagar::AG_BOX_CENTER
    set ok [::dlg::getOkButton $box2 $opts]
    AG_WidgetFocus $ok

    return
}