[WIP] Get SRO Source Code - by re-writing it

08/13/2021 14:48 Laag#82#301
Quote:
Originally Posted by WolfgangNeverDie View Post
Can u teach me how to update this text from other GUI?
I want to make GUI for rank ingame. If it needs to create each variable per text then to too many variables...

For example my GUI like this:
Code:
for (int i = 0; i < 20; i++)
	{
		RECT r_slot = {18,55 + (23*i),47,24};
	    rank_slot = (CIFStatic *) CGWnd::CreateInstance(this,GFX_RUNTIME_CLASS(CIFStatic),r_slot,21+i,1);
		rank_slot->SetText(L"-");
	}
I don't know how to update this text :(
Quote:
Originally Posted by WolfgangNeverDie View Post
I think you don't want to make 100++ "m_mybutton" like that to create a GUI's Rank!
If your GUI's Rank has 20 rows and 6 columns. You must create 120 button. Omg @@!
Hello,

Code:
for (int i = 0; i < 20; i++)
	{
		RECT r_slot = {18,55 + (23*i),47,24};
	    rank_slot = (CIFStatic *) CGWnd::CreateInstance(this,GFX_RUNTIME_CLASS(CIFStatic),r_slot,21+i,1);
		rank_slot->SetText(L"-");
	}
you forget thing.

change from rank_slot = (CIFStatic *) to rank_sloti = (CIFStatic *)

and

rank_slot->SetText(L"-"); to rank_sloti->SetText(L"-");


good luck :rolleyes:
08/13/2021 15:13 WolfgangNeverDie#302
Quote:
Originally Posted by khaleed2010 View Post
Hello,

Code:
for (int i = 0; i < 20; i++)
	{
		RECT r_slot = {18,55 + (23*i),47,24};
	    rank_slot = (CIFStatic *) CGWnd::CreateInstance(this,GFX_RUNTIME_CLASS(CIFStatic),r_slot,21+i,1);
		rank_slot->SetText(L"-");
	}
you forget thing.

change from rank_slot = (CIFStatic *) to rank_sloti = (CIFStatic *)

and

rank_slot->SetText(L"-"); to rank_sloti->SetText(L"-");


good luck :rolleyes:
Wait :D Can you explain one :D
CIFStatic can't addion a string/int "i". I don't understand how to increase this rank_slot1 rank_slot2 ...
sry for my unknowledge
08/13/2021 15:16 SubZero**#303
Quote:
Originally Posted by WolfgangNeverDie View Post
I think you don't want to make 100++ "m_mybutton" like that to create a GUI's Rank!
If your GUI's Rank has 20 rows and 6 columns. You must create 120 button. Omg @@!
why ill create 120 buttons anyway?!
For rank gui you can use the created GUI As variable on ur next gui as a new type
08/13/2021 15:23 WolfgangNeverDie#304
Quote:
Originally Posted by SubZero** View Post
why ill create 120 buttons anyway?!
For rank gui you can use the created GUI As variable on ur next gui as a new type
Do you use "Getflorian0Runtime" to draw GUI in DLL without "text resinfo"?
08/13/2021 19:31 SubZero**#305
Quote:
Originally Posted by WolfgangNeverDie View Post
Do you use "Getflorian0Runtime" to draw GUI in DLL without "text resinfo"?
even before Florian do an example for it
Also he helped me to know how to config it like txts
08/13/2021 22:12 omar125#306
Quote:
Originally Posted by WolfgangNeverDie View Post
@[Only registered and activated users can see links. Click Here To Register...]

Can't use this method to show/hidden "IFFlorian0Runtime" GUI. Client always crashed

Code:
g_pCGInterface->m_IRM.GetResObj(1340, 1)->ShowGWnd(false);
Quote:
Originally Posted by WolfgangNeverDie View Post
Code:
CIFflorian0Runtime *CGInterface::Getflorian0Runtime() {
    return m_IRM.GetResObj<CIFflorian0Runtime>(GDR_FLORIAN0_RT_WINDOW, 1);
}
Code:
Don't work
g_pCGInterface->Getflorian0Runtime()->ShowGWnd(true);
Quote:
Originally Posted by WolfgangNeverDie View Post
Yes. im pretty sure. It's correct one. This is default "IFFlorian0Runtime" GUI's ID
what are you trying to do?
if you using this
Code:
CIFflorian0Runtime *CGInterface::Getflorian0Runtime() {
    return m_IRM.GetResObj<CIFflorian0Runtime>(GDR_FLORIAN0_RT_WINDOW, 1);
}
then add Getflorian0Runtime(); to AfterCreate
if you are using the CreateInstance
Code:
    RECT r = {0, 0, 400, 200};
    CGWnd::CreateInstance(this,
                          GFX_RUNTIME_CLASS(CIFflorian0Runtime),
                          r,
                          GDR_FLORIAN0_RT_WINDOW,
                          1);
make it like this
Code:
    RECT r = {0, 0, 400, 200};
    CIFflorian0Runtime* m_test = CGWnd::CreateInstance(this,
                          GFX_RUNTIME_CLASS(CIFflorian0Runtime),
                          r,
                          GDR_FLORIAN0_RT_WINDOW,
                          1);
just add CIFflorian0Runtime* m_test =
then call the ShowGWnd func to be like that m_test->ShowGWnd(true);3
[Only registered and activated users can see links. Click Here To Register...]
08/14/2021 01:03 -[Anxi]-#307
Looks great
08/14/2021 02:27 WolfgangNeverDie#308
Quote:
just add CIFflorian0Runtime* m_test =
then call the ShowGWnd func to be like that m_test->ShowGWnd(true);3
[Only registered and activated users can see links. Click Here To Register...]
i already do it. but now I get another problem. Look at my preview post #
08/25/2021 16:55 tarek1500#309
I have a problem that after setting the client path and running VS in debug, I got this message *Please Execute the "Silkroad.exe."*
I think the DLL isn't injected to the client.
09/15/2021 13:26 [GM] Purple#310
Florian you are legendary
10/13/2021 02:44 WolfgangNeverDie#311
I can't use SetGWndSize

PHP Code:
g_pCGInterface->m_IRM.GetResObj(13381)->SetGWndSize(230,599); 
Fixed. Using SetGWnd from IFGwnd
10/13/2021 04:01 bimbum*#312
Quote:
Originally Posted by WolfgangNeverDie View Post
I can't use SetGWndSize

PHP Code:
g_pCGInterface->m_IRM.GetResObj(13381)->SetGWndSize(230,599); 
do a check to see if the window != null and visible
01/05/2022 21:44 painmaker_#313
AWESOME LIBRARY!
07/09/2022 21:07 WolfgangNeverDie#314
Help me! How to change text Align (Left Right Center)
My GUI create in dll. No text
Quote:
rank_slot->SetText(L"123456789");
07/13/2022 18:01 painmaker_#315
Quote:
Originally Posted by WolfgangNeverDie View Post
Help me! How to change text Align (Left Right Center)
My GUI create in dll. No text
for center text
rank_slot->TB_Func_5(1);
rank_slot->TB_Func_6(1);