Tibia Auto

Your place for knowledge.
It is currently Tue Sep 22, 2020 6:30 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Oct 23, 2015 3:30 am 
User avatar

Joined: Tue Dec 12, 2006 5:29 am
Posts: 3802
So dialog creation is half code, half GUI. If you know what the Solution Explorer is (where all the module files are aggregated) you can change tabs to the Resources Explorer and click on cavebot->mod_cavebot.rc->Dialog->IDD_DROPLIST. Then you can go back to the Solution Explorer and make copies of "DropLootDialog.h" and "DropLootDialog.cpp" and rename the files and the class names within the files. At this point you can copy IDD_DROPLIST to the same location and rename it. Then you need to do many edits to the *.h and *.cpp file to change over the names of the resource and the names of the buttons.
Lines like "DDX_Control(pDX, IDOK, m_OK);" and
"enum { IDD = IDD_DROPLIST };" should be changed first. Then I suggest trying to make the dialog appear in TA itself. Once you know it works you can make the dialog box look how you want it to look, and editing the code to suit the GUI object layout you settle on.

What is it you have in mind to implement? I made customizing deposited depot items easier for the next release, (which you can check out on GitHub) but unfortunately sub-windows are broken right now so take this as a warning and hope it's not too frustrating!

There are some fancy features in VS2013 to help make stubs for your buttons and textboxes, but editing the text yourself is straight forward and not too tricky.

Good luck.

stryku wrote:
Could you explain me a little how to create new dialog?
I want to create dialog for loot items list. It'll be almost exact as drop loot list dialog. So I've created resource for it but I can't create header file. Currently I'm creating it manually and have strange errors. It don't see IDD_* defines, CGroupBoxEx etc. Even if i copy content from drop loot dialog (and change ifdef guard) I have the same errors.

I don't know if I need generate it automatically in visual studio? It's ok that I'm writing it manually?

If you could tell me what I'm doing wrong I'll be gratefull (:

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group