Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INT scroll_txt_pos;
- VOID C_Menu::AutoScrollingNews( INT x, INT y, LPDIRECT3DDEVICE9 pDevice )
- {
- if( scroll_txt_pos != Font.Menu->GetTextLenght( this->announcements ) + 290 )
- scroll_txt_pos += 1;
- else
- scroll_txt_pos = NULL;
- RECT ra,rb,rc,rd,re,r_scissor;
- SetRect( &ra, x + 288 - 1 - scroll_txt_pos, y , x + 287, y + 20 );
- SetRect( &rb, x + 288 + 1 - scroll_txt_pos, y , x + 287, y + 20 );
- SetRect( &rc, x + 288 - scroll_txt_pos, y - 1, x + 287, y + 20 );
- SetRect( &rd, x + 288 - scroll_txt_pos, y + 1, x + 287, y + 20 );
- SetRect( &re, x + 288 - scroll_txt_pos, y , x + 287, y + 20 );
- SetRect( &r_scissor, x, y, x + 287, y+20 );
- Local.Sprite->End();
- pDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE);
- pDevice->SetScissorRect(&r_scissor);
- Local.Sprite->Begin( D3DXSPRITE_ALPHABLEND | D3DXSPRITE_SORT_TEXTURE );
- Font.Menu->GetFont()->DrawText( Local.Sprite, this->announcements, -1, &ra, DT_LEFT, 0xFF000000 );
- Font.Menu->GetFont()->DrawText( Local.Sprite, this->announcements, -1, &rb, DT_LEFT, 0xFF000000 );
- Font.Menu->GetFont()->DrawText( Local.Sprite, this->announcements, -1, &rc, DT_LEFT, 0xFF000000 );
- Font.Menu->GetFont()->DrawText( Local.Sprite, this->announcements, -1, &rd, DT_LEFT, 0xFF000000 );
- Font.Menu->GetFont()->DrawText( Local.Sprite, this->announcements, -1, &re, DT_LEFT, 0xFFFFFFFF );
- Local.Sprite->End();
- pDevice->SetRenderState(D3DRS_SCISSORTESTENABLE , FALSE);
- Local.Sprite->Begin( D3DXSPRITE_ALPHABLEND | D3DXSPRITE_SORT_TEXTURE );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement