HQ Cards Picture Support
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: HQ Cards Picture Support
by Vasiliy » 22 Dec 2009, 16:41
Does it copy it into the res/pics folder (overwriting existing one).Rob Cashwalker wrote:Does this just change the path from which the picture will be loaded from or does it copy it into the res/pics folder? (overwriting existing one)
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by Vasiliy » 22 Dec 2009, 16:44
This algoritm i am not create. Button "Change picture" change image of selected in table card.DennisBergkamp wrote:Cool, yes this sounds great! A lot of people already have their HQ pics downloadedVasiliy wrote:Hello.
Marek14:
I can add to project next algoritm :
1. User select folder, where he has all HQ picture.
2. Forge analysing all picture in folder and all subfolder.
3. If it found HQ cards, it copy these card to pics catalog in Forge.
In this algoritm i can add support only such cards name format. Example: Bad Moon.full.jpg, Ballista Squad.full.jpg and so forth.
Algoritm found this card, copy in pics folder and rename it to Forge Cards format.
Example: Bad Moon.full.jpg -> bad_moon.jpg
Ballista Squad.full.jpg -> ballista_squad.jpg
If you want, then i start writing this algoritm.
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by DennisBergkamp » 22 Dec 2009, 17:44
Hmm, we would have to write something new entirely. I can't even remember how I did the land variation thing, but I think it's just hardcoded. There's no way it would work for all of the other cards... ideally different picture versions would be something that the user can specify in the deck editor... but how to do this?Rob Cashwalker wrote:Does this just change the path from which the picture will be loaded from or does it copy it into the res/pics folder? (overwriting existing one)
Dennis - do you think you can start adapting the basic land picture variation code to work for all types of cards?
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by Vasiliy » 27 Dec 2009, 18:57
I add new feature "Import pictures" in r 229.
It copy all "supported pictures" from selected folder and all subfolder to res/pics.
"suported pictures" - It is pictures with file format "Card name.full.jpg"
Example: Abyssal Specter.full.jpg
Screenshots:
I have one problem in these code:
When files are coping, window is hanging and JProgressbar is not updated
Please help me and rewrite these code.
It copy all "supported pictures" from selected folder and all subfolder to res/pics.
"suported pictures" - It is pictures with file format "Card name.full.jpg"
Example: Abyssal Specter.full.jpg
Screenshots:
I have one problem in these code:
When files are coping, window is hanging and JProgressbar is not updated
Please help me and rewrite these code.
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by silly freak » 27 Dec 2009, 20:33
maybe you can read in yourself into SwingWorker (Java tutorials about Swing & Threads)
The problem is that if you download the pictures in actionPerformed, The Swing Thread does exactly that, and nothing else. you need a background thread for downloading. SwingWorker gives you an easy way to do that. forge.Gui_DownloadPictures doesn't use a SwingWorker, but also executes the downloads in a separate thread
The problem is that if you download the pictures in actionPerformed, The Swing Thread does exactly that, and nothing else. you need a background thread for downloading. SwingWorker gives you an easy way to do that. forge.Gui_DownloadPictures doesn't use a SwingWorker, but also executes the downloads in a separate thread
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: HQ Cards Picture Support
by Vasiliy » 28 Dec 2009, 18:41
I fix these bug in r233. Thanks silly freak for idea use SwingWorker.Vasiliy wrote:I add new feature "Import pictures" in r 229.
I have one problem in these code:
When files are coping, window is hanging and JProgressbar is not updated
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
51 posts
• Page 4 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 98 guests