Jump to content

Html Button Text


IpotoniC

Recommended Posts

Alloz all. Got a couple questions about Interlude Htmls.

 

1)I want to make the text inside a button colored and inside " ". Like this 30kdctf.png

but the button code is:

<button value="I will change to the Knight class." action="bypass -h npc_%objectId%_bla" width=265 height=22 back="blabla.bla" fore="blabla.blac">
I can't put "I will change ..." because the value= already got " " . And i can't make them colored with <font color="blabla"> ... </font> .
 
Can the text be colored and inside " " on interlude htmls? If yes post the html code line.
 
 
2)Also the retail deposit cargo box or teleport or some other stuff got a pop up msg when you press the text, like the following cargo deposit
<a action="bypass -h npc_%objectId%_DepositF" msg="1040">Deposit a Cargo Box.</a>
it has the msg="1040" . I want that to get triggered from the button also. (placed it everywhere but it doesn't work). Can it be done from html?
 
If someone knows any of these share some knowledge.
Edited by IpotoniC
Link to comment
Share on other sites

I was also working for that, i rememebr you helped me in the past to get this buttons, but i gave up...

I'm not interested in the button texture. (i posted this photo cause the text inside it is colored and inside " " ).

I'm interested for the text appearance and functionality.

 

I believe the button from the photo is the simple texture behind as a button and somehow the icon and the text is added on top of it. (interlude way)

This way you can make the text however you want,you got the 3 textures for the button and you can add additional icon at the left (quest,teleport,blabla).

 

Anyone knows how to make the text on top of a button? But the functionality from the pop up msg (when there is one) will still get activated by pressing only the text area.

Link to comment
Share on other sites

For sure you cannot change font of button name via html.

If you make simple text over texture, Hover and Mouse Down version will not work.

 

Try to put \" inside of value, you could also trick it by writing ' twice: ''

Link to comment
Share on other sites

For sure you cannot change font of button name via html.

If you make simple text over texture, Hover and Mouse Down version will not work.

 

Try to put \" inside of value, you could also trick it by writing ' twice: ''

Damn that was obvious the x2 ' , i tried it on html and cause it looked nothing like " i didn't even checked in-game. (Looks the same in-game tho).

 

I'm not talking about simple texture, i'm talking about putting something else on top of a button (text,other button). Is there something for that?

 

Edit: Anyway it's fine tho. The solution is to change the color from the npc text and player's button text will be white. (Just wanted to see if it can be done)

Edited by IpotoniC
Link to comment
Share on other sites

This color is not even in interface files, seems to be in nwindow.dll

 

I also thought of making the image on the server(putting the font on the image and sending it as a crest) but Mouse Over version would be black.

 

I know that you could make this kind of thing with Interface.u changes:

1. You need to put few textures(like 10, which will be maximum amount of those buttons) and same amount of TextBoxes in Interface.xdat file

2. In Interface.u NpcChatWnd needs to search for specific texts at the end of message(like <fancyButton value="Blabla"/> bypass="something")

3. Each text must be replaced with nothing(so it will not be shown as html), Texture made in Interface.xdat must be shown(.ShowWindow()), TextBox must the shown, TextBox text must be replaced with value.

4. Other Textures and TextBoxes must be set as invisible

5. Location of Textures must be set just after HtmlText, location of text should have fixed location(like Texture.getX() + 20)

6. Texture should react for mouseOver and mouseDown event of TextBox(so Hover and Mouse Down texture will be shown correctly)

7. Button click should run bypass

 

This solution has the limitation: If text is long and scroll bar shows, it might show button below whole frame. Maybe this can be fixed though.

Most likely AutoTools guy could make this for you, it is like 2 hours of work.

Link to comment
Share on other sites

No reason to spend more than 5 mins. I've solved my problem. Thanks for the info you posted.

Anything about msg=" " before bypass? (pop up msg).Can it be triggered from the button at html?

Link to comment
Share on other sites

Actually, I check UWindow and this seems to be there. UWindowButton class:

	if(Text != "")
	{
		C.DrawColor=TextColor;
		ClipText(C, TextX, TextY, Text, True);
		C.SetDrawColor(255,255,255);
	}

I am not sure if this works for HTML buttons or XDAT buttons. Maybe for both. I am unable to compile UWindow.u to check it though :/ This would be fun solution.

Link to comment
Share on other sites

  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...