Exemplo n.º 1
0
void WInputDialog::initialize() {
/*******************************/

    WPoint avg;
    WPoint max;
    textMetrics( avg, max );
    int sp = max.x();

    int x = WSystemMetrics::dialogFrameWidth();
    int y = WSystemMetrics::dialogFrameHeight();

    int p_w = 0;
    int p_h = 0;
    updateExtents( _promptText, &p_w, &p_h );
    p_w += avg.x() / 2;
    p_h += avg.y() / 2;
    int r_w = 32 * avg.x();
    int r_h = max.y() + 2*max.y() / 3;
    updateExtents( *_reply, &r_w, &r_h );

    _prompt = new WText( this, WRect( x, y + (r_h - p_h)/2, p_w, p_h ), _promptText );
    _prompt->show();
    _input = new WEditBox( this, WRect( x + p_w + sp, y, r_w, r_h ), *_reply );
    _input->show();
    y += p_h + max.y();

    int b_w = 0;
    int b_h = 0;
    updateExtents( BrowseText, &b_w, &b_h );
    updateExtents( CancelText, &b_w, &b_h );
    updateExtents( OKText, &b_w, &b_h );
    b_w += avg.x() * 2;
    b_h += avg.y() / 2;
    WDefPushButton *bOk = new WDefPushButton( this, WRect( x, y, b_w, b_h ),
                                              OKText );
    bOk->onClick( this, (cbw)&WInputDialog::okButton );
    bOk->show();
    x += b_w + max.x();

    WPushButton *bCancel = new WPushButton( this, WRect( x, y, b_w, b_h ),
                                            CancelText );
    bCancel->onClick( this, (cbw)&WInputDialog::cancelButton );
    bCancel->show();
    x += b_w + max.x();

    if( _browseDialog ) {
        WPushButton *bBrowse = new WPushButton( this,
                                                WRect( x, y, b_w, b_h ),
                                                BrowseText );
        bBrowse->onClick( this, (cbw)&WInputDialog::browseButton );
        bBrowse->show();
    }

    shrink();
    centre();

    _input->select();
    _input->setFocus();
    show();
}
Exemplo n.º 2
0
void VAbout::initialize()
{
    int fw = WSystemMetrics::dialogFrameWidth();
    int fh = WSystemMetrics::dialogFrameHeight();
    int wid = 0;
    int yoff = fh;
    for( int i=0; _viperDesc[i] != NULL; i++ ) {
        int w = getTextExtentX( _viperDesc[i] );
        int h = getTextExtentY( _viperDesc[i] );
        if( w > 0 ) {
            if( wid < w ) wid = w;
            WText* t1 = new WText( this, WRect(fw, yoff, w, h), _viperDesc[i] );
//          WText* t1 = new WText( this, WRect(fw, yoff, w, h), _viperDesc[i], TextStyleCentre );
            yoff += h * 5/4;
            t1->show();
        }
    }
    wid += fw * 2;

    static const char ok[] = { "OK" };
    int w = getTextExtentX( ok ) * 3;
    int h = getTextExtentY( ok ) * 3/2;
    int xoff = (wid - w) / 2;
    WDefPushButton* bOk = new WDefPushButton( this, WRect( xoff, yoff, w, h), "OK" );
    yoff += h * 5/4;
    bOk->onClick( this, (cbw)&VAbout::okButton );
    bOk->show();

    shrink();
    centre();

    show();
    bOk->setFocus();
}
Exemplo n.º 3
0
void scigraphics::painter::drawRectangleF( const frectangle &Rect, const brushStyle &BrushStyle, const lineStyle &LineStyle )
{
  wpoint LU = fpoint2wpoint( Rect.leftUp() );
  wpoint RD = fpoint2wpoint( Rect.rightDown() );
  wrectangle WRect( LU, RD );

  drawRectangleW( WRect, BrushStyle, LineStyle );
}
Exemplo n.º 4
0
StrucView::StrucView()
    : WBRWindow( WRect(0,0,0,0), "" )
    , _listbox(NULL)
    , _listobjs(NULL)
    , _type(NULL)
    , _lattice(NULL)
//--------------------
{
}
Exemplo n.º 5
0
void CUIImageBox::InitPopupImageBox()
{
	//=================================================
	// Set Popup
	m_ptdPopup = CreateTexture( CTString( "Data\\Interface\\CommonBtn.tex") );
	FLOAT fTexWidth  = m_ptdPopup->GetPixWidth();
	FLOAT fTexHeight = m_ptdPopup->GetPixHeight();
	m_bxPopupInfo.SetBoxUV(m_ptdPopup,20,WRect(0,137,141,227));
	//=================================================
} 
Exemplo n.º 6
0
VEditDlg::VEditDlg( WWindow* parent, WFileName &fn, WString &parms, bool isdll )
    : WDialog( parent, WRect( 100, 50, 400, 150 ), "Set Text Editor" )
{
    _isDll = isdll;
    _fn = fn;
    _parms = parms;
    _browseDialog = new WFileDialog( this, "executables\0*.exe\0"
                                           "DLL's\0*.dll\0"
                                           "All Files\0*.*\0" );
}
Exemplo n.º 7
0
void CUIImageBox::PopupRender()
{
	CUIManager* pUIManager = CUIManager::getSingleton();
	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	int	nX, nY;
	GetAbsPos( nX, nY );
	
	int nX0 = nX + m_rtRenderRegion.Left;
	int nX1 = nX + m_rtRenderRegion.Right;
	int nY0 = nY + m_rtRenderRegion.Top;
	int nY1 = nY + m_rtRenderRegion.Bottom;

	int rtRenderRegionMiddle = nX + (m_rtRenderRegion.Left + m_rtRenderRegion.Right) / 2;
	int nRegionHeight = m_rtRenderRegion.Bottom - m_rtRenderRegion.Top;
		
	if ( m_bShowPopup )	
	{
		pDrawPort->InitTextureData( m_ptdPopup );
		
		int nAlineSize	= m_vecString.size();
		int nPopHeight	= 10 - _pUIFontTexMgr->GetLineSpacing() + (nAlineSize+1) * _pUIFontTexMgr->GetLineHeight();
		int nPopX = rtRenderRegionMiddle - (m_nPopWidth/2);
		int nPopY = nY0 - nPopHeight;
	
		if( nPopX < pUIManager->GetMinI() )
		{
			nPopX = pUIManager->GetMinI();
		}
		else if (nPopX + m_nPopWidth > pUIManager->GetMaxI())
		{
			nPopX = pUIManager->GetMaxI() - m_nPopWidth;
		}
		
		if (nPopY < pUIManager->GetMinJ())
		{
			nPopY = nY + nRegionHeight;
		}
		
		m_bxPopupInfo.SetBoxPos(WRect(nPopX-nX, nPopY-nY, nPopX-nX+m_nPopWidth, nPopY-nY+nPopHeight ));
		m_bxPopupInfo.Render(nX,nY);

		std::vector<CTString>::iterator b = m_vecString.begin();
		
		for (int i = 0; b != m_vecString.end(); b++, i++)
		{
			pDrawPort->PutTextEx( *b, nPopX+20, nPopY+6+(i*14), m_colText );
		}
		pDrawPort->FlushRenderingQueue();
		pDrawPort->EndTextEx();		
	}
}
Exemplo n.º 8
0
Browse::Browse( char * cmdLine )
    : WMdiWindow( "" )
    , _helpInfo( NULL )
    , _status( new WStatWindow( this, WRect(0,0,0,0), "Ready" ) )
    , _editorDLL( NULL )
//---------------------------------------------------------------
{
    WString         errMessage;

    CommandParser   prs( cmdLine, true );
    _searchPath = prs.searchPath();

    WFlashPage *    flash_page = showFlashPage( 0 );

    browseTop = this;
    topWindow = browseTop;
    _helpInfo = new WSystemHelp( this, BrowseTitle, _BrowseHelpFile,
                                 _BrowseHtmlHelpFile );

    setIcon( WBRWIcon );
    setupMenus();
    viewManager()->registerForEvents( this );

    // important that options comes before the database
    // since the option file can set the query and cause a re-load
    // of the inheritance graph

    if( prs.options() ) {
        optManager()->loadFrom( prs.options() );
    } else {
        optManager()->loadDefault();
    }

    // this must come after the option loads
    if( optManager()->isEditorDLL() ) {
        setEditorDLL( optManager()->getEditorName() );
    }

    if( prs.database() ) {
        dbManager()->setModule( prs.database(), prs.files() );
    } else {
        /* if there is no database, disable interesting menus */
        viewManager()->enableMenus( false );
    }

    postTitle();

    delete flash_page;
    show();
    hookF1Key( true );
}
Exemplo n.º 9
0
StrucView::StrucView( int x, int y, Symbol * info )
    :WBRWindow( WRect(x,y,StrucWidth,StrucHeight), "" )
    ,_listbox( new VerboseListBox( WRect( 5, 30, -5, -25 ), this ))
    ,_listobjs( new WVList )
    ,_type( new WText( this, WRect( 5, -20, -5, -2 ), NULL,
                       TextStyleLeftNoWrap | TextStyleAmpersands ))
    ,_treeRoot(NULL)
    ,_nodesSeen( new WVList )
    ,_lattice( new ClassLattice( info ) )
    ,_filter( activeProject->getFiltFlags( Filt_Members ))
//-------------------------------------------------------------------
{
    WString title = info->name();
    Symbol * sym;

    title.concat( " Structure" );
    setText( title );

    _listbox->setCallbacks( this, (cbw)&StrucView::itemSelected,
                        (bcbwi)&StrucView::keyPressed,
                        (cbw)&StrucView::itemDblClicked );
//  _listbox->setFont(stdFont);
    _listbox->select( 0 );
    _listbox->show();
//  _type->setFont(stdFont);
    _type->show();

    WPushButton * bttn;
    bttn = new WPushButton( this, WRect( 5, 2, 25, 25 ), "+" );
    bttn->onClick( this, (cbw) plusSelected );
    bttn->show();

    bttn = new WPushButton( this, WRect( 40, 2, 25, 25 ), "-" );
    bttn->onClick( this, (cbw) minusSelected );
    bttn->show();

    bttn = new WPushButton( this, WRect( 75, 2, 25, 25 ), "*" );
    bttn->onClick( this, (cbw) starSelected );
    bttn->show();

    bttn = new WPushButton( this, WRect( -70, 2, 65, 25 ), "&Filters..." );
    bttn->onClick( this, (cbw) filterSelected );
    bttn->show();

    sym = Symbol::defineSymbol( info );
    _treeRoot = new StrucViewItem( this, sym );
    reset();

    _listbox->setFocus();
    show();
}
Exemplo n.º 10
0
WEXPORT VMsgLog::VMsgLog( VpeMain* parent )
    : WMdiChild( parent, "IDE Log" )
    , _parent( parent )
    , _batcher( NULL )
    , _connecting( FALSE )
    , _runQueued( FALSE )
    , _connectTimer( NULL )
    , _serverConnected( FALSE )
    , _maxLength( 0 )
    , _running( FALSE )
    , _batserv( TRUE )
    , _localBatserv( FALSE )
    , _vxdPresent( FALSE )
{
    if( _config->hostType() == HOST_WINDOWS ||
        _config->hostType() == HOST_NEC_WIN ||
        _config->hostType() == HOST_J_WIN ) {
        _batserv = FALSE;
    }
    setIcon( I_MsgLog );

    WRect sc;
    _parent->getClientRect( sc );
    sc.y( sc.h() * 2/3 );
    sc.h( sc.h() - sc.y() );
    move( sc );

    int yoff = 0;

    _batcher = new VListBox( this, WRect(0,yoff,-1,-1) );
    _batcher->onDblClick( this, (cbw)&VMsgLog::selected );
    _batcher->show();

    show();

    loadHelpList();

    clearData();

    _batcher->setPopup( _parent->logPopup() );

    addAccelKey( LOG_ESCAPE_KEY, this, (bcbk)&VMsgLog::kAccelKey );
    addAccelKey( LOG_HELP_KEY, this, (bcbk)&VMsgLog::kAccelKey );
}
Exemplo n.º 11
0
void WFlashPage::init( int interval, const char *title )
{
    WPoint hotSize;
    _hotSpot->hotSpotSize( _idx, hotSize );
    if( _width < hotSize.x() ) _width = hotSize.x();
    _height += hotSize.y();

    if( interval == INTERVAL_OK_BUTTON ) {
        static const char ok[] = { "OK" };
        int w = getTextExtentX( ok ) * 3;
        int h = getTextExtentY( ok ) * 3/2;
        int xoff = (_width - w) / 2;
        int yoff = _height + h / 2;
        WDefPushButton* bOk = new WDefPushButton( this, WRect( xoff, yoff, w, h), ok );
        bOk->onClick( this, (cbw)&WFlashPage::okButton );
        bOk->setFocus();
        bOk->show();
        _height += 2*h;
    } else {
        if( _width - hotSize.x() ) {
            _height += WSystemMetrics::captionSize();
        }
    }

    WOrdinal wheight = _height;
    if( title ) {
        wheight += WSystemMetrics::captionSize();
    }
    WOrdinal wwidth = _width;

    move( 0, 0 );
    size( wwidth, wheight );
    centre();
    show();
    update();   // force the paint method.
    if( interval > 0 ) {
        _flashTimer = new WTimer( this, (cbt)&WFlashPage::flashTimer );
        _flashTimer->start( (WORD)interval, 1 );
    }
}
Exemplo n.º 12
0
void WAutoDialog::initialize() {
    /******************************/

    WText       *t;
    WPoint      avg;
    WPoint      max;
    int         i;

    setSystemFont( FALSE );
    int x = WSystemMetrics::dialogFrameWidth();
    int y = WSystemMetrics::dialogFrameHeight();
    textMetrics( avg, max );

    int t_w = 0;
    int t_h = 0;
    int icount = _prompts->count();
    for( i = 0; i < icount; i++ ) {
        updateExtents( _prompts->cStringAt( i ), &t_w, &t_h );
    }

    int b_w = 50 * avg.x() / 4;
    int b_h = 14 * avg.y() / 8;

    int p_w = _editwidth * avg.x();
    int p_h = max.y();
    t_w += avg.x() / 2;
    t_h += avg.y() / 2;
    p_w += avg.x() / 2;
    p_h += 2*max.y() / 3;
    int sp = max.x();

    for( i = 0; i < icount; i++ ) {
        WString s( _prompts->cStringAt( i ) );
        bool bro = FALSE;
        char* p = strchr( (char *)s.gets(), '=' );
        if( p != NULL ) { // this code depends on internals of WString!
            *p = '\0';
            p++;
            if( *p == '=' ) {
                bro = TRUE;
                p++;
            }
        }
        t = new WText( this, WRect( x, y + (p_h - t_h)/2, t_w, t_h ), s );
        t->show();
        WEditBox* e = new WEditBox( this,
                                    WRect( x + t_w + sp, y, p_w, p_h ), p );
        e->show();
        _inputs.add( e );
        if( bro ) {
            WPushButton* bBrowse = new WPushButton( this,
                                                    WRect( x + t_w + p_w + 2*sp, y, b_w, b_h ), BrowseText );
            bBrowse->onClick( this, (cbw)&WAutoDialog::browseButton );
            bBrowse->setTagPtr( e );
            bBrowse->show();
        }
        y += t_h + t_h / 2;
    }

    WDefPushButton* bOk = new WDefPushButton( this, WRect( x, y, b_w, b_h ),
            OKText );
    bOk->onClick( this, (cbw)&WAutoDialog::okButton );
    bOk->show();

    WPushButton* bCancel = new WPushButton( this,
                                            WRect( x + b_w + sp, y, b_w, b_h ), CancelText );
    bCancel->onClick( this, (cbw)&WAutoDialog::cancelButton );
    bCancel->show();

    shrink();
    centre();

    WEditBox* e = (WEditBox *)_inputs[0];
    e->select();
    e->setFocus();
    show();
}
Exemplo n.º 13
0
VAbout::VAbout( WWindow* parent )
    : WDialog( parent, WRect( 160, 100, 380, 180 ), "WATCOM IDE" )
{
}
Exemplo n.º 14
0
VCompDialog::VCompDialog( WWindow* parent, const char* text, MProject* project, const char* filter )
    : WDialog( parent, WRect( 100, 50, 400, 150 ), text )
    , _project( project )
{
    _browseDialog = new WFileDialog( this, filter );
}
Exemplo n.º 15
0
DescriptionPaint::DescriptionPaint( WBRWindow * prnt, const WRect & r,
                                    Symbol * sym )
                    : _parent( prnt )
                    , _rect( r )
                    , _current( -1 )
//--------------------------------------------------------------------
{
    int             i;
    WVList          desc;
    Description *   entry;
    WString         buf;
    const char *    uDefSymName;
    int             x = r.x();
    int             w;
    int             h;

    _parts = new WCPtrOrderedVector<DescriptionPart>;

    sym->description( desc );

    for( i = 0; i < desc.count(); i += 1 ) {
        entry = (Description *) desc[i];
        if( entry->symbol() ) {
            if( sym->isEqual( entry->symbol() ) ) {

                // don't hilight the symbol we're describing
                buf.concat( entry->name() );
                delete entry->symbol();

            } else {

                if( buf != "" ) { // flush buf
                    w = prnt->getTextExtentX( buf );
                    h = prnt->getTextExtentY( buf );
                    _parts->append( new DescriptionPart( buf.gets(), NULL,
                                        WRect(x,r.y(),w, h ) ) );

                    buf="";
                    x+=w;
                }

                uDefSymName = entry->name();
                w = prnt->getTextExtentX( uDefSymName );
                h = prnt->getTextExtentY( uDefSymName );
                _parts->append( new DescriptionPart( uDefSymName,
                                                     entry->symbol(),
                                                     WRect(x,r.y(),w, h ) ) );
                x+=w;
            }
        } else {
            buf.concat( entry->name() );
        }
    }

    desc.deleteContents();


    if( buf != "" ) { // flush buf
        w = prnt->getTextExtentX( buf );
        h = prnt->getTextExtentY( buf );
        _parts->append( new DescriptionPart( buf, NULL,
                                WRect(x,r.y(),w, h ) ) );

        buf="";
        x+=w;
    }

    _rect.w( x - abs( _rect.x() ) );
}
Exemplo n.º 16
0
// ----------------------------------------------------------------------------
// Name : Create()
// Desc :
// ----------------------------------------------------------------------------
void CUICreateChar::Create( CUIWindow *pParentWnd, int nX, int nY, int nWidth, int nHeight )
{
	CUIWindow::Create(pParentWnd, nX, nY, nWidth, nHeight);

	_iMaxCharInfoChar = MAX_CHARINFO_CHAR_WIDTH / ( _pUIFontTexMgr->GetFontWidth() + _pUIFontTexMgr->GetFontSpacing() );

	// Create creating character texture
	m_ptdBaseTexture = CreateTexture( CTString( "Data\\Interface\\CreateCharacter.tex" ) );
	FLOAT	fTexWidth	= m_ptdBaseTexture->GetPixWidth();
	FLOAT	fTexHeight	= m_ptdBaseTexture->GetPixHeight();

	// UV Coordinate of each part
	m_rtCharInfoTop.SetUV( 0, 0, 255, 386, fTexWidth, fTexHeight );
	m_rtCharInfoBottom.SetUV( 0, 390, 255, 393, fTexWidth, fTexHeight );

	// OK Button(Create character)
	m_btnOK.Create( this, _S( 138, "결정" ), 0, 0, 63, 21 );
	m_btnOK.SetUV( UBS_IDLE, 0, 397, 63, 418, fTexWidth, fTexHeight );
	m_btnOK.SetUV( UBS_CLICK, 66, 397, 129, 418, fTexWidth, fTexHeight );
	m_btnOK.CopyUV( UBS_IDLE, UBS_ON ); 
	m_btnOK.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Back Button
	m_btnCancel.Create( this, _S( 139, "취소" ), 0, 0, 63, 21 );
	m_btnCancel.SetUV( UBS_IDLE, 0, 397, 63, 418, fTexWidth, fTexHeight );
	m_btnCancel.SetUV( UBS_CLICK, 66, 397, 129, 418, fTexWidth, fTexHeight );
	m_btnCancel.CopyUV( UBS_IDLE, UBS_ON );
	m_btnCancel.CopyUV( UBS_IDLE, UBS_DISABLE );

	// ZoomIn Button
	m_btnZoomIn.Create( this, CTString( "" ), 0, 0, 38, 37 );
	m_btnZoomIn.SetUV( UBS_IDLE, 151, 418, 189, 455, fTexWidth, fTexHeight );
	m_btnZoomIn.SetUV( UBS_CLICK, 151, 418, 189, 455, fTexWidth, fTexHeight );
	m_btnZoomIn.CopyUV( UBS_IDLE, UBS_ON );
	m_btnZoomIn.CopyUV( UBS_IDLE, UBS_DISABLE );

	// ZoomOut Button
	m_btnZoomOut.Create( this, CTString( "" ), 0, 0, 38, 37 );
	m_btnZoomOut.SetUV( UBS_IDLE, 151, 464, 189, 501, fTexWidth, fTexHeight );
	m_btnZoomOut.SetUV( UBS_CLICK, 151, 464, 189, 501, fTexWidth, fTexHeight );
	m_btnZoomOut.CopyUV( UBS_IDLE, UBS_ON );
	m_btnZoomOut.CopyUV( UBS_IDLE, UBS_DISABLE );

	// RotateToLeft Character Button
	m_btnRotateToLeft.Create( this, CTString( "" ), 0, 0, 38, 37 );
	m_btnRotateToLeft.SetUV( UBS_IDLE, 209, 441, 247, 478, fTexWidth, fTexHeight );
	m_btnRotateToLeft.SetUV( UBS_CLICK, 209, 441, 247, 478, fTexWidth, fTexHeight );
	m_btnRotateToLeft.CopyUV( UBS_IDLE, UBS_ON );
	m_btnRotateToLeft.CopyUV( UBS_IDLE, UBS_DISABLE );

	// RotateToRight Button
	m_btnRotateToRight.Create( this, CTString( "" ), 0, 0, 38, 37 );
	m_btnRotateToRight.SetUV( UBS_IDLE, 94, 441, 132, 478, fTexWidth, fTexHeight );
	m_btnRotateToRight.SetUV( UBS_CLICK, 94, 441, 132, 478, fTexWidth, fTexHeight );
	m_btnRotateToRight.CopyUV( UBS_IDLE, UBS_ON );
	m_btnRotateToRight.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Prev Job
	m_btnJobPrev.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnJobPrev.SetUV( UBS_IDLE, 0, 421, 13, 434, fTexWidth, fTexHeight );
	m_btnJobPrev.SetUV( UBS_CLICK, 0, 436, 13, 449, fTexWidth, fTexHeight );
	m_btnJobPrev.CopyUV( UBS_IDLE, UBS_ON );
	m_btnJobPrev.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Next Job
	m_btnJobNext.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnJobNext.SetUV( UBS_IDLE, 16, 421, 29, 434, fTexWidth, fTexHeight );
	m_btnJobNext.SetUV( UBS_CLICK, 16, 436, 29, 449, fTexWidth, fTexHeight );
	m_btnJobNext.CopyUV( UBS_IDLE, UBS_ON );
	m_btnJobNext.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Prev Head
	m_btnFacePrev.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnFacePrev.SetUV( UBS_IDLE, 0, 421, 13, 434, fTexWidth, fTexHeight );
	m_btnFacePrev.SetUV( UBS_CLICK, 0, 436, 13, 449, fTexWidth, fTexHeight );
	m_btnFacePrev.CopyUV( UBS_IDLE, UBS_ON );
	m_btnFacePrev.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Next Head
	m_btnFaceNext.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnFaceNext.SetUV( UBS_IDLE, 16, 421, 29, 434, fTexWidth, fTexHeight );
	m_btnFaceNext.SetUV( UBS_CLICK, 16, 436, 29, 449, fTexWidth, fTexHeight );
	m_btnFaceNext.CopyUV( UBS_IDLE, UBS_ON );
	m_btnFaceNext.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Prev Hair
	m_btnHairPrev.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnHairPrev.SetUV( UBS_IDLE, 0, 421, 13, 434, fTexWidth, fTexHeight );
	m_btnHairPrev.SetUV( UBS_CLICK, 0, 436, 13, 449, fTexWidth, fTexHeight );
	m_btnHairPrev.CopyUV( UBS_IDLE, UBS_ON );
	m_btnHairPrev.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Next Hair
	m_btnHairNext.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnHairNext.SetUV( UBS_IDLE, 16, 421, 29, 434, fTexWidth, fTexHeight );
	m_btnHairNext.SetUV( UBS_CLICK, 16, 436, 29, 449, fTexWidth, fTexHeight );
	m_btnHairNext.CopyUV( UBS_IDLE, UBS_ON );
	m_btnHairNext.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Prev Face
	m_btnHeadPrev.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnHeadPrev.SetUV( UBS_IDLE, 0, 421, 13, 434, fTexWidth, fTexHeight );
	m_btnHeadPrev.SetUV( UBS_CLICK, 0, 436, 13, 449, fTexWidth, fTexHeight );
	m_btnHeadPrev.CopyUV( UBS_IDLE, UBS_ON );
	m_btnHeadPrev.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Next Face
	m_btnHeadNext.Create( this, CTString( "" ), 0, 0, 13, 13 );
	m_btnHeadNext.SetUV( UBS_IDLE, 16, 421, 29, 434, fTexWidth, fTexHeight );
	m_btnHeadNext.SetUV( UBS_CLICK, 16, 436, 29, 449, fTexWidth, fTexHeight );
	m_btnHeadNext.CopyUV( UBS_IDLE, UBS_ON );
	m_btnHeadNext.CopyUV( UBS_IDLE, UBS_DISABLE );

	// Character name edit box
	m_ebCharName.Create( this, 0, 0, 88, 13, MAX_NAME_LEN );
	m_ebCharName.SetReadingWindowUV( 34, 423, 51, 439, fTexWidth, fTexHeight );
	m_ebCharName.SetCandidateUV( 34, 423, 51, 439, fTexWidth, fTexHeight );
	m_ebCharName.SetFocus( TRUE );
	// [2011/11/02 : Sora] 커서 이동 불가플래그
	m_ebCharName.SetCursorMove( FALSE );

	// Description of character
	m_astrDescription[0] = _S( 129, " 겉보기에는 다소 덩치 큰 사람처럼 보일 수 있으나, 겉모습으로는 상상할 수 없을 정도의 엄청난 괴력, 체력과 함께 전투 상황에 대한 기민한 판단력까지 지니고 있는 타고난 전사." );
	m_astrDescription[1] = _S( 130, "자신의 힘을 기르고 육체를 단련하는 것을 삶의 목표로 여기고 있으며 목숨이 왔다갔다 거리는 전장을 최고의 단련장소라 여기고 끊임없는 전투를 즐기며 살아가는 삶을 보낸다." );
	m_astrDescription[2] = _S( 131, " 빛의 신을 모시는 성스러운 기사로 단순히 무엇보다 악으로 물들어가는 혼돈의 시대를 살아가기 위해서만이 아닌 자신의 명예와 소중히 여기는 것을 지키기 위해 계속 단련하는 존재." );
	m_astrDescription[3] = _S( 132, "자신을 포함한 주변의 동료들의 상황을 언제나 보호하면서 싸우는 전법을 사용하기에 공격 기술 이상가는 다양한 방어기술을 지니고 있으며 이를 활용하여 전투를 항상 승리로 이끈다." );
	m_astrDescription[4] = _S( 133, " 정령의 힘을 이용하여 다양한 회복, 치유에 관련된 온화한 마법을 사용하는 것이 특기인 하이엘프 힐러는 전투 중 상처를 입은 동료와 자연을 치유하는 나날을 보내고 있다." );
	m_astrDescription[5] = _S( 134, "접근전을 좋아하지 않는 그들은 주로 활을 사용하여 원거리로부터 전투를 지원하는데 바람의 정령에게 도움을 받기 때문인지 여느 숙련된 궁수에 못지 않는 강력함을 지닌다." );
	m_astrDescription[6] = _S( 449, "정령의 가호를 받고 있는 엘프들과 달리 자신 스스로의 노력에 의해 습득한 지식에 의해 마나의 흐름을 통제하고 이를 응용하여 자유롭게 사용하는 자들이 이들 메이지이다. " );
	m_astrDescription[7] = _S( 450, "폭발적인 위력을 자랑하는 공격 마법과 상대를 혼란시키는 저주 마법을 주 특기로 사용하는 메이지는 그에게 적대하는 상대를 전멸, 제거하는데 그 힘을 아끼지 않고 사용한다. " );
	m_astrDescription[8] = _S( 1025, "무엇에도 얽매이지 않고 바람보다도 자유롭게 살아가는 존재. 정령 실프의 축복을 받아 태어난 이들은 매우 빠른 몸놀림과 뛰어난 시야를 지니며 그와 함께 자유분방한 사고방식과 여행을 좋아하는 성격을 타고났다고 전해진다." );		
	m_astrDescription[9] = _S( 1026, "빠른 몸놀림과 시야를 활용할 수 있는 단검과 석궁을 주로 사용하는 로그는 낮은 체력을 커버하기 위해 공격 하나하나를 적의 약점을 노려 치명상을 입히거나 원거리에서 적에 대해 아군을 서포트하는 것에 주력한다." );	
	m_astrDescription[10] = _S( 1027, "치유를 담당하는 하이엘프 힐러와 달리 하이엘프 소서러는 자연을 상처 입히거나 그들의 계율을 어기는 자에 대해 강력한 마법으로 제재를 가하는 역할을 맡고 있다." );	
	m_astrDescription[11] = _S( 1028, "자연 상의 마나를 에너지의 형태로 변환시켜 사용하는 메이지와 달리 소서러는 4대 정령의 힘을 빌은 강력한 4대 속성의 마법을 사용한다." );
	m_astrDescription[12] = _S( 4698, "적에게 강력한 암흑 공격마법으로 직접 피해를 입혀 제압하는 전투형 마법사이다. 기존 마법사 계열보다 빠른 연사력을 지니고 있으며, 공격 마법과 함께 적에게 저주를 같이 걸어버리기도 한다.");
	m_astrDescription[13] = _S( 4699, "무엇보다 나이트쉐도우는 적의 영혼을 흡수하고 흡수한 영혼을 이용해 강력한 연계 마법을 사용한다. 라스트카오스의 첫번째 영웅 클래스로 90레벨 이상 캐릭터를 소유한 계정에 한해서 생성이 가능하다.");
#ifdef CHAR_EX_ROGUE
	m_astrDescription[14] = _S( 1025, "무엇에도 얽매이지 않고 바람보다도 자유롭게 살아가는 존재. 정령 실프의 축복을 받아 태어난 이들은 매우 빠른 몸놀림과 뛰어난 시야를 지니며 그와 함께 자유분방한 사고방식과 여행을 좋아하는 성격을 타고났다고 전해진다." );		// [2012/08/27 : Sora] EX로그 추가
	m_astrDescription[15] = _S( 5733, "로그 중에서 어둠의 기운을 얻게된 특수한 로그들은 사악한 힘을 이용하여 적에게 피해를 입히거나 아군을 보호할 수 있으며, 다양한 함정을 설치하여 적을 교란시키는 등의 전투를 펼친다." );	// [2012/08/27 : Sora] EX로그 추가
#endif
#ifdef CHAR_EX_MAGE
		//2013/01/08 jeil EX메이지 추가 스트링 나오면 추가 수정 필요 
	m_astrDescription[16] = _S( 449, "정령의 가호를 받고 있는 엘프들과 달리 자신 스스로의 노력에 의해 습득한 지식에 의해 마나의 흐름을 통제하고 이를 응용하여 자유롭게 사용하는 자들이 이들 메이지이다. " );
	m_astrDescription[17] = _S( 5821, "아크메이지는 메이지와 다르게 순수한 마법을 사용하는 백마법사로, 학문적인 관점에서의 마법을 연구한다. 가장 기본적이면서도 공격적인 속성 마법을 자유롭게 다룰 수 있으며 적대하는 상대를 전멸, 제거하는데는 결코 주저함이 없다." );

#endif

	m_ptdMsgTexture = CreateTexture( CTString( "Data\\Interface\\TopUI.tex" ) );
	m_rcMessageInfo.SetRect( 20, 40, 215, 102 );
	m_bxNoticeMsg.SetBoxUV(m_ptdMsgTexture,7,WRect(239,253,335,269));

	m_msgNCText.SetRenderRect( 20, 45, 187, 62 );
	m_msgNCText.AddString( _S(4794, "나이트쉐도우 캐릭터를 생성할 수 있는 조건을 만족하였습니다. 나이트쉐도우 캐릭터를 생성하여 육성하십시오." ) );
}
Exemplo n.º 17
0
void VCompDialog::initialize()
{

    int         sx;
    int         sy;
    WPoint      average;
    WPoint      max;

    const int   rb_hite = 10;  //height of a radio button
    const int   space = 10;
    const int   button_width = 50;
    const int   button_hite = 14;

    setSystemFont( FALSE );
    this->textMetrics( average, max );
    sx = average.x() / 4;
    sy = average.y() / 8;

    WText* t1 = new WText( this, WRect( 7*sx, 2*sy, 164*sx, 9*sy ),
                            "Target name:" );
    t1->show();

    _eName = new WEditBox( this, WRect( 7*sx, 12*sy, 250*sx, 13*sy ), *_fn );
    _eName->select();
    _eName->show();

    WPushButton* bBrowse = new WPushButton( this,
                WRect( 265*sx, 11*sy, button_width * sx, button_hite * sy ),
                "&Browse..." );
    bBrowse->onClick( this, (cbw)&VCompDialog::browseButton );
    bBrowse->show();

    WText* t2 = new WText( this, WRect( 167*sx, 31*sy, 86*sx, 9*sy ),
                            "Image Type:" );
    t2->show();

    WRadioButton        *button;
    WRadioButton        *checkedbutton;
    int                 icount;
    WStyle              style;
    MTarget             *curtarg;
    int                 i;
    bool                singletarg;

    curtarg = NULL;
    if( _comp != NULL ) {
        WPickList& targets = _config->targets();
        icount = targets.count();
        for( i=0; i < icount; i++ ) {
            curtarg = (MTarget *)targets[i];
            if( curtarg->mask() == _comp->mask() ) break;
        }
        if( i == icount ) curtarg = NULL;
    }

    WVList &list = _config->targetOSs();
    icount = list.count();
    if( icount == 1 ) {
        // use a static field instead of a radio button when there is
        // only one target installed
        singletarg = TRUE;
        i = 0;
        _cur_os = *(WString *)list[0];
        WText* t3 = new WText( this, WRect( 11*sx, 41*sy, 135*sx, rb_hite * sy ),
                            _cur_os.gets() );
        t3->show();
    } else {
        singletarg = FALSE;
        for( i=0; i < icount; i ++ ) {
            if( i == 0 ) {
                if( icount == 1 ) {
                    style = RStyleRadioButton;
                } else {
                    style = RStyleGroupFirst;
                }
            } else if( i == icount - 1 ) {
                style = RStyleGroupLast;
            } else {
                style = RStyleRadioButton;
            }
            button = new WRadioButton( this,
                   WRect( 11*sx, ( 41 + rb_hite * i ) * sy, 135*sx, rb_hite * sy ),
                   ( (WString *)list[i] )->gets(), style );
            button->show();
            button->onClick( this, (cbw)&VCompDialog::osButton );

            if( curtarg == NULL ) {
                if( i == 0 ) {
                    checkedbutton = button;
                }
            } else {
                if( curtarg->targetOS() == *(WString *)list[i] ) {
                    checkedbutton = button;
                }
            }
        }
    }

    WGroupBox           *gbox;

    if( i < 5 ) i = 5;
    int boxtop = 29;
    int boxhite = i * rb_hite + 20;
    int boxbottom = boxtop + boxhite;
    gbox = new WGroupBox( this,
                          WRect( 7*sx, boxtop * sy, 146*sx, boxhite * sy ),
                          "Target Environment" );
    gbox->show();


    _imagelist = new WListBox( this,
                 WRect( 166*sx, 44*sy, 150*sx, ( boxbottom - 44 ) * sy ),
                 LStyleNoIntegral );
    _imagelist->onDblClick( this, (cbw)&VCompDialog::okButton );
    _imagelist->show();


    WDefPushButton* bOk;
    boxbottom += space;
    bOk = new WDefPushButton( this,
          WRect( 105*sx, boxbottom * sy, button_width * sx, button_hite * sy ),
          "&OK" );
    bOk->onClick( this, (cbw)&VCompDialog::okButton );
    bOk->show();

    WPushButton* bCancel;
    bCancel = new WPushButton( this,
           WRect( 186*sx, boxbottom * sy, button_width * sx, button_hite * sy ),
           "&Cancel" );
    bCancel->onClick( this, (cbw)&VCompDialog::cancelButton );
    bCancel->show();

    if( singletarg ) {
        updateCurOs();
    } else {
        checkedbutton->setCheck( TRUE );
    }
    if( curtarg != NULL ) {
        icount = _tgList.count();
        MTarget         *tmptarg;
        for( i=0; i < icount; i++ ) {
            tmptarg = (MTarget *)_tgList[i];
            if( curtarg->imageName() == tmptarg->imageName() ) {
                _imagelist->select( i );
                break;
            }
        }
    }
    int xsize = 330 * sx;
    int ysize = WSystemMetrics::dialogFrameWidth() * 2
                + WSystemMetrics::captionSize()
                + ( boxbottom + button_hite + space ) * sy;
    size( (WOrdinal)xsize, (WOrdinal) ysize );
    centre();
    show();
    _eName->setFocus();
}
Exemplo n.º 18
0
void VEditDlg::initialize()
{

    int                 sx;
    int                 sy;
    WPoint              average;
    WPoint              max;
    WGroupBox           *gbox;
    WText               *t1;
    WText               *t3;
    WText               *t4;
    WText               *t5;
    WText               *t6;
    WText               *t7;

    const int   rb_hite = 10;  //height of a radio button
//    const int   space = 10;
    const int   button_width = 50;
    const int   button_hite = 14;

    setSystemFont( false );
    this->textMetrics( average, max );
    sx = average.x() / 4;
    sy = average.y() / 8;

    t1 = new WText( this, WRect( 5*sx, 5*sy, 132*sx, 9*sy ),
                    "Enter editor file name:" );
    t1->show();

    _editorName = new WEditBox( this, WRect( 5*sx, 17*sy, 139*sx, 13*sy ) );
    _editorName->select();
    _editorName->show();

    _parmBoxText = new WText( this, WRect( 5*sx, 33*sy, 132*sx, 9*sy ),
                    "Enter editor parameters:" );
    _parmBoxText->show();

    _editorParms = new WEditBox( this, WRect( 5*sx, 45*sy, 139*sx, 13*sy ) );
    _editorParms->select();
    _editorParms->show();

    WPushButton* bBrowse = new WPushButton( this,
                WRect( 155*sx, 16*sy, button_width * sx, button_hite * sy ),
                "&Browse..." );
    bBrowse->onClick( this, (cbw)&VEditDlg::browseButton );
    bBrowse->show();

    WDefPushButton*     bOk;
    bOk = new WDefPushButton( this,
                WRect( 26*sx, 117*sy, button_width * sx, button_hite * sy ),
                "&OK" );
    bOk->onClick( this, (cbw)&VEditDlg::okButton );
    bOk->show();

    WPushButton* bCancel = new WPushButton( this,
                WRect( 82*sx, 117*sy, button_width * sx, button_hite * sy ),
                "&Cancel" );
    bCancel->onClick( this, (cbw)&VEditDlg::cancelButton );
    bCancel->show();

    WPushButton* bDefault = new WPushButton( this,
                WRect( 138*sx, 117*sy, button_width * sx, button_hite * sy ),
                "&Default" );
    bDefault->onClick( this, (cbw)&VEditDlg::defaultButton );
    bDefault->show();

    _exeButton = new WRadioButton( this,
           WRect( 13*sx, 74*sy, 60*sx, rb_hite * sy ),
           "Executable", RStyleGroupFirst );
    _exeButton->show();
    _exeButton->onClick( this, (cbw)&VEditDlg::exeButton );

    _dllButton = new WRadioButton( this,
           WRect( 13*sx, 87*sy, 60*sx, rb_hite * sy ),
           "DLL", RStyleGroupFirst );
    _dllButton->show();
    _dllButton->onClick( this, (cbw)&VEditDlg::dllButton );

    gbox = new WGroupBox( this,
                          WRect( 5*sx, 61*sy, 139*sx, 42 * sy ),
                          "Editor type: " );
    gbox->show();

    t3 = new WText( this, WRect( 155*sx, 45*sy, 65*sx, 9*sy ),
                    "Parameter" );
    t3->show();
    t4 = new WText( this, WRect( 155*sx, 54*sy, 65*sx, 9*sy ),
                    "Macros:" );
    t4->show();
    t5 = new WText( this, WRect( 155*sx, 67*sy, 65*sx, 9*sy ),
                    "%f - filename" );
    t5->show();
    t6 = new WText( this, WRect( 155*sx, 76*sy, 65*sx, 9*sy ),
                    "%r - row" );
    t6->show();
    t7 = new WText( this, WRect( 155*sx, 85*sy, 65*sx, 9*sy ),
                    "%c - column" );
    t7->show();

    _editorName->setText( _fn );
    _editorParms->setText( _parms );
    if( _isDll ) {
        _dllButton->setCheck( true );
        _editorParms->setText( "" );
        _editorParms->enable( false );
        _parmBoxText->enable( false );
    } else {
        _exeButton->setCheck( true );
    }

    size( (WOrdinal)225*sx, (WOrdinal)155*sy );
    centre();
    show();
    _editorName->setFocus();
}