我有我想知道如果我可以從這個givein信息得到一個值的INI文件搜索值獲取從INI文件
我INI看起來像這樣
[Images]
image135=Lava.bmp
x135=13
y135=5
image76=Mountian.bmp
x76=7
y76=6
image86=Lava.bmp
x86=8
y86=6
image85=Lava.bmp
x85=8
y85=5
image125=gryph.bmp
x125=12
y125=5
現在我打開這個INI ,我想找到的圖片## [值]凡我所知道的是X ## [值]和y ## [值]
所以說,我知道我的值是(8,6),現在我想獲取Lava.bmp圖像返回。注8是x座標,6是座標。
不知道IAM解釋這一權利,但如果沒有,請索要更多信息
當前代碼
HexMapIni := TIniFile.Create(FGamePlay.MapName); //creates ini file
eposition.x := FGameplay.TempCurrentPosition.x; //x value to search ini for
eposition.y := FGamePlay.TempcurrentPosition.y; //y value to search ini for
ImageYouWant := //Searchresult.bmp
Hexmap1.ImageAHex(ImageYouWant , bsSolid, eposition); //place image on map
這就是我所想象的,但hopeing有辦法。 –