Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / 3d / tile_edit / TileList.cpp
blob2bce3c7129618d56456b789679c25be0a865ba06
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include "stdafx.h"
18 #include "tile_edit_exe.h"
19 #include "TileList.h"
20 #include "browse.h"
22 #ifdef _DEBUG
23 #define new DEBUG_NEW
24 #undef THIS_FILE
25 static char THIS_FILE[] = __FILE__;
26 #endif
28 #define SEPARE_X 5
29 #define SEPARE_TILE_TEXT_Y 5
30 #define SEPARE_TEXT_TILE_Y 5
32 /////////////////////////////////////////////////////////////////////////////
33 // TileList
35 TileList::TileList()
39 TileList::~TileList()
44 BEGIN_MESSAGE_MAP(TileList, CListBox)
45 //{{AFX_MSG_MAP(TileList)
46 // NOTE - the ClassWizard will add and remove mapping macros here.
47 //}}AFX_MSG_MAP
48 END_MESSAGE_MAP()
50 /////////////////////////////////////////////////////////////////////////////
51 // TileList message handlers
53 BOOL TileList::PreCreateWindow(CREATESTRUCT& cs)
55 // TODO: Add your specialized code here and/or call the base class
57 return CListBox::PreCreateWindow(cs);
60 void TileList::DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct )
62 int x,y; //compute (x,y) coord of the item
63 if (lpDrawItemStruct->itemID<0) return;
64 int nb_tile_per_line = (lpDrawItemStruct->rcItem.right-SEPARE_X)/(SEPARE_X+sizetile_x);
65 int nb_tile_per_column = (lpDrawItemStruct->rcItem.bottom-SEPARE_TEXT_TILE_Y)/(SEPARE_TEXT_TILE_Y+SEPARE_TILE_TEXT_Y+SIZETILE_Y);