1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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/>.
18 #include "tile_edit_exe.h"
25 static char THIS_FILE
[] = __FILE__
;
29 #define SEPARE_TILE_TEXT_Y 5
30 #define SEPARE_TEXT_TILE_Y 5
32 /////////////////////////////////////////////////////////////////////////////
44 BEGIN_MESSAGE_MAP(TileList
, CListBox
)
45 //{{AFX_MSG_MAP(TileList)
46 // NOTE - the ClassWizard will add and remove mapping macros here.
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
);