Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Solved] [Dev] interface change

Skilled Illusionist
Joined
Jul 10, 2008
Messages
371
Reaction score
94
hi,

i'm actualy integrating teamspeak into the game (client and server side), actually all thing are weel ao.atm init and connect to the virtual teamspeak server added in field server, I wish now create an interface to manage that new feature and add this on in the community window.

I have open the INFComunity.cpp to try to add a new button and add some line like this:

Code:
	for( int i=0; i < COMMUNITY_MAX; i++ )
	{
		m_pCommMenuBtn[i] = new CINFImageBtn;
	}	

	m_pCommMenuBtn[COMMUNITY_PARTY]->InitDeviceObjects("comFbtn0");
	m_pCommMenuBtn[COMMUNITY_FRIEND]->InitDeviceObjects("comFrbtn0");
	m_pCommMenuBtn[COMMUNITY_GUILD]->InitDeviceObjects("comBbtn0");
	m_pCommMenuBtn[COMMUNITY_CHATROOM]->InitDeviceObjects("comCbtn0");
	m_pCommMenuBtn[COMMUNITY_MAIL]->InitDeviceObjects("comLbtn0");
	m_pCommMenuBtn[COMMUNITY_REJECT]->InitDeviceObjects("comRbtn0");
	m_pCommMenuBtn[COMMUNITY_VOCAL]->InitDeviceObjects("comRbtn0");

and

Code:
		POINT pBkSize;
		pBkSize.x =  m_pCommunityBKImage->GetMaxPos().x - m_pCommunityBKImage->GetMinPos().x;
		pBkSize.y =  m_pCommunityBKImage->GetMaxPos().y - m_pCommunityBKImage->GetMinPos().y;
		float fPosX = m_ptCommunityBk.x + COMMUNITY_BTN_POSX;
		float fPosY = m_ptCommunityBk.y + COMMUNITY_BTN_POSY;
		
		POINT pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comFbtn00");
		m_pCommMenuBtn[COMMUNITY_PARTY]->SetBtnPosition(fPosX + pPos.x, fPosY + pPos.y);
		
		pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comFrbtn00");
		m_pCommMenuBtn[COMMUNITY_FRIEND]->SetBtnPosition(fPosX + pPos.x, fPosY + pPos.y);
		
		pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comBbtn00");
		m_pCommMenuBtn[COMMUNITY_GUILD]->SetBtnPosition(fPosX + pPos.x, fPosY + pPos.y);
		
		pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comCbtn00");
		m_pCommMenuBtn[COMMUNITY_CHATROOM]->SetBtnPosition(fPosX + pPos.x, fPosY + pPos.y);
		
		pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comLbtn00");
		m_pCommMenuBtn[COMMUNITY_MAIL]->SetBtnPosition(fPosX + pPos.x, fPosY + pPos.y);
		
		pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comRbtn");
		m_pCommMenuBtn[COMMUNITY_REJECT]->SetBtnPosition(fPosX + pPos.x, fPosY + pPos.y);

		pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comRbtn");
		m_pCommMenuBtn[COMMUNITY_VOCAL]->SetBtnPosition(fPosX + pPos.x, fPosY + pPos.y);

and in INFComunity.h:
Code:
#define COMMUNITY_PARTY			0
#define COMMUNITY_FRIEND		1
#define COMMUNITY_GUILD			2
#define COMMUNITY_CHATROOM		3
#define COMMUNITY_MAIL			4
#define COMMUNITY_REJECT		5
#define COMMUNITY_VOCAL			6
#define COMMUNITY_MAX			7

my problem is that little thing are not enough to add my own button (not displaying), and I don't know how to made this working fi someone have already work on the game ui and know something about the procedure to add a button I will be happy to get this information.
 
Last edited:
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
Re: [Not Solved] [Dev] interface change

Oh look who's back... Well you copied the existing reject button so your new button gets the same position as that one. In other words your new button is overlapping the reject button and as it has the same image => it looks the same.

You can hardcode the position a little to actually see the overlapping by doing smth like:

Code:
pPos = m_pCommunityControl->GetFindControlTargetofMinPos("comRbtn");
m_pCommMenuBtn[COMMUNITY_VOCAL]->SetBtnPosition(fPosX + pPos.x [B][COLOR="#FF0000"]+ 20[/COLOR][/B], fPosY + pPos.y);

Should give you an idea of how this works.
Or you edit a certain file, but you probably can't without the editor or knowledge of it.
 
Upvote 0
Skilled Illusionist
Joined
Jul 10, 2008
Messages
371
Reaction score
94
Re: [Not Solved] [Dev] interface change

yes I haven't made asset for my own button, but instead of just add my pixel offset, I wish to understand hos massang do that with their own.

after some search I think there is a resource in group.tex witch have information for that but I haven't found more on this way at this time.
 
Upvote 0
Joined
Apr 12, 2013
Messages
897
Reaction score
480
Re: [Not Solved] [Dev] interface change

Well, masang started to export their interface system to Group.tex, but honestly i don't really understand why/how they did it and how it's working. Their normal Interface system is quite basic and trivial, but it's much write work, like restoring/deleting the resource etc.
Basically you have use following methods (i took CINFGameMain as an example):
Code:
HRESULT CINFGameMain::InitDeviceObjects()
Initialize your Objects here.

Code:
HRESULT CINFGameMain::RestoreDeviceObjects()
Restore your objects here

Code:
HRESULT CINFGameMain::DeleteDeviceObjects()
Delete your objects here

Code:
HRESULT CINFGameMain::InvalidateDeviceObjects()
Invalidate your objects here

Code:
void CINFGameMain::Tick()
Let your objects tick here, like button clicks, position changes etc

Code:
void CINFGameMain::Render()
Render your objects here

You could create your own wrapper for this, so you don't have to put each object in these methods, but basically this should work.
 
Upvote 0
Skilled Illusionist
Joined
Jul 10, 2008
Messages
371
Reaction score
94
Re: [Not Solved] [Dev] interface change

yeah all inf Object have these methods, code sample that I have give are from these methods in INFCommunity object

the group.tex comm_me ressource handle the size of the textures used for bottom button of the community interface. used for positioning them next to them selves, I will write a group/tex ressource editor I think it's hte best way to add this button and edit the comunity BG (who is also in group.tex under ressource name: commuBG) to get a larger window.
 
Upvote 0
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
Re: [Not Solved] [Dev] interface change

The best way would be to scrap their horrible attempts of an interface system and rewrite it.

With the group.tex they tried to create interface groups and controls which you can use more than one time for positioning without hardcoding the positions, which is what they did pre ep4. As stealth said, the efforts needed to create new interface elements is no match with what you're trying to achieve.

Temp solution would be an editor for the group.tex (got one half working) or hexing the stuff you need into the file (not advisable)

 
Upvote 0
Skilled Illusionist
Joined
Jul 10, 2008
Messages
371
Reaction score
94
Re: [Not Solved] [Dev] interface change

i'm writing an editor, actually writing the loading of resources, I will get full filled structure and made a data view for edit structure content with a simple windows form application.

after that for save it's just a binary dump of my structure, so nothing hard.

The best way would be to scrap their horrible attempts of an interface system and rewrite it.

can't say better ^^ but it's take much more time than writing a craps tools that handle group.tex resources.
 
Upvote 0
Skilled Illusionist
Joined
Jul 10, 2008
Messages
371
Reaction score
94
Re: [Not Solved] [Dev] interface change

little post to say it's not solved already but in good way, i'm currently working on my group.tex editor.

actually result are I have a clean window with all data extracted, now I have to made the data editor

2ce40e1060459ab9feee168bfdaba01f - [Solved] [Dev] interface change - RaGEZONE Forums


and that will solve my actual problem

edit:
caf7dd158dca3fab9522b24ee6957d71 - [Solved] [Dev] interface change - RaGEZONE Forums

have to made save action and it's wil be done
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Experienced Elementalist
Joined
May 10, 2015
Messages
278
Reaction score
146
Re: [Not Solved] [Dev] interface change

decarvk - [Solved] [Dev] interface change - RaGEZONE Forums


You may even consider using masang's crap for this, alas i didn't code a new one with my team because we're still busy on finishing the mapeditor (Unity is such a pain in the butt...)
 
Upvote 0
Skilled Illusionist
Joined
Jul 10, 2008
Messages
371
Reaction score
94
write my own tool don't hurt me, and it's easier to find structure with client source code that I did'nt got in past.

after I made a simple table editor, next step is the map editor I have started on that one in past with ue4 for my part but leave this project cause of lack of time and lack of knowledge on map structure.

and it's first time I see your tool like many one of masang lot of people doesn't have these one, if I get source of these on a day before finish to work on my own it's will free me sometime to work on the game rather than the tools.

EDIT: after writing my groupTexResource editor I can now change the interface
ce2a4466970a738a2fa5e6f401479161 - [Solved] [Dev] interface change - RaGEZONE Forums


my tool have no showcase of your edit but if you are interested, I will be happy to trade this one versus a needed tool not written by my self.
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Back
Top