Показать сообщение отдельно
Старый 17.05.2011, 13:14   #3
cherepets
Бывалый
 
Регистрация: 18.08.2009
Сообщений: 745
Написано 146 полезных сообщений
(для 215 пользователей)
Ответ: JournalEngine v0.6.8

При чтении из файла:
res:=openresource(s);
while 
temp<>'###' do begin
if temp<>'' then begin
    
if copy(temp,0,1)<>'^' then text:=text+temp+chr(13) else begin
    
if text<>'' then h:=format(text,0);
    if 
text<>'' then im[c+1]:=h;
    
ig[c+1]:=stringtointeger(copy(temp,1,length(temp)));
    
img[ig[c+1]]:=loadimage('/'+ig[c+1]+'.png');
    
h:=trunc(getimageheight(img[stringtointeger(copy(temp,1,length(temp)))])/textheight);
    for 
d:=0 to h+do ot:=ot+chr(13);
    
text:=text+ot;
    
ot:='';
    
c:=c+1;
    
end;
end;
temp:=win2utf(readline(res));
end;
temp:=win2utf(readline(res));
if 
temp<>'NULL' then lnk:=true else lnk:=false;
    
closeresource(res);
h:=format(text,0); 
Потом при отрисовке:
for d:=1 to c do
        
drawimage(img[ig[d]],10,sz-getposition+im[d]);
    
drawtextwindow
Честно говоря понять свой старый код до конца даже я сам не в силах, но идея в принципе видна, что уже хорошо))
(Offline)
 
Ответить с цитированием
Сообщение было полезно следующим пользователям:
im_zorg (17.05.2011)