Use HTML Code in Menu -
Stefand - 14.06.2013
Title^
is it possible to do this:
pawn Code:
TuningMenu = CreateMenu("TuningMenu",1,445,110,155,40);
AddMenuItem(TuningMenu,0,"{FF0000}Paint Jobs");
AddMenuItem(TuningMenu,0,"{FF0000}Colors");
AddMenuItem(TuningMenu,0,"{FF0000}Exhausts");
AddMenuItem(TuningMenu,0,"{FF0000}Front Bumper");
AddMenuItem(TuningMenu,0,"{FF0000}Rear Bumper");
AddMenuItem(TuningMenu,0,"{FF0000}Roof");
AddMenuItem(TuningMenu,0,"{FF0000}Spoilers");
AddMenuItem(TuningMenu,0,"{FF0000}Side Skirts");
AddMenuItem(TuningMenu,0,"{FF0000}Wheels");
AddMenuItem(TuningMenu,0,"{FF0000}Hydraulics");
AddMenuItem(TuningMenu,0,"{FF0000}Nitro");
AW: Use HTML Code in Menu -
Skimmer - 14.06.2013
I don't think so, because this is PAWN Language and the AMX Compiler can read only PAWN Languages and not HTML.
Now the main question is, why do you want use HTML code? Do you want center the text?
Re: Use HTML Code in Menu -
Pooh7 - 14.06.2013
If you mean RGB colors, no. You can use these, though:
Code:
~r~ red
~g~ green
~b~ blue
~w~ white
~y~ yellow
~p~ purple
~l~ black
~h~ lighter color
Re: Use HTML Code in Menu -
Stefand - 14.06.2013
Well I have a speedo meter and I will allow players to buy another color, but I want them to know what color they are buying xD
and in SendClientMessage {FF0000} Works..
Re: Use HTML Code in Menu -
OrMisicL - 14.06.2013
SendClientMessage is a samp function, it was designed to accept HEX colours, while menus are internal SA feature that cannot be edited to do such a thing
AW: Use HTML Code in Menu -
Skimmer - 14.06.2013
I think using colours on Menu's isn't allowed, but i'm not sure.
https://sampwiki.blast.hk/wiki/AddMenuItem
Re: Use HTML Code in Menu -
Pooh7 - 14.06.2013
Well, this guy did it:
http://imageshack.us/photo/my-images...052f.png/?sa=0
I'm 100% positive there can't be used HEX colors, so he must've done it with these TextDraw codes.
Quote:
Originally Posted by Stefand
Well I have a speedo meter and I will allow players to buy another color, but I want them to know what color they are buying xD
and in SendClientMessage {FF0000} Works..
|
Dialogs are much better in my opinion, and they also accept HEX colors.
Btw, you can do something like "Preview color" and when a player selects it, the speedometer in the selected color will pop up for him to see.
Re: Use HTML Code in Menu -
Stefand - 14.06.2013
Quote:
Originally Posted by Pooh7
Well, this guy did it: http://imageshack.us/photo/my-images...052f.png/?sa=0
I'm 100% positive there can't be used HEX colors, so he must've done it with these TextDraw codes.
Dialogs are much better in my opinion, and they also accept HEX colors.
Btw, you can do something like "Preview color" and when a player selects it, the speedometer in the selected color will pop up for him to see.
|
I will find some solution I think xD
Re: Use HTML Code in Menu -
IstuntmanI - 14.06.2013
You can't use HEX codes in menus, only gametext colors:
https://sampwiki.blast.hk/wiki/GameTextStyle
pawn Code:
TuningMenu = CreateMenu("TuningMenu",1,445,110,155,40);
AddMenuItem(TuningMenu,0,"~r~Paint Jobs");
AddMenuItem(TuningMenu,0,"~r~Colors");
AddMenuItem(TuningMenu,0,"~r~Exhausts");
AddMenuItem(TuningMenu,0,"~r~Front Bumper");
AddMenuItem(TuningMenu,0,"~r~Rear Bumper");
AddMenuItem(TuningMenu,0,"~r~Roof");
AddMenuItem(TuningMenu,0,"~r~Spoilers");
AddMenuItem(TuningMenu,0,"~r~Side Skirts");
AddMenuItem(TuningMenu,0,"~r~Wheels");
AddMenuItem(TuningMenu,0,"~r~Hydraulics");
AddMenuItem(TuningMenu,0,"~r~Nitro");
Re: Use HTML Code in Menu -
Stefand - 14.06.2013
Quote:
Originally Posted by IstuntmanI
You can't use HEX codes in menus, only gametext colors: https://sampwiki.blast.hk/wiki/GameTextStyle
pawn Code:
TuningMenu = CreateMenu("TuningMenu",1,445,110,155,40); AddMenuItem(TuningMenu,0,"~r~Paint Jobs"); AddMenuItem(TuningMenu,0,"~r~Colors"); AddMenuItem(TuningMenu,0,"~r~Exhausts"); AddMenuItem(TuningMenu,0,"~r~Front Bumper"); AddMenuItem(TuningMenu,0,"~r~Rear Bumper"); AddMenuItem(TuningMenu,0,"~r~Roof"); AddMenuItem(TuningMenu,0,"~r~Spoilers"); AddMenuItem(TuningMenu,0,"~r~Side Skirts"); AddMenuItem(TuningMenu,0,"~r~Wheels"); AddMenuItem(TuningMenu,0,"~r~Hydraulics"); AddMenuItem(TuningMenu,0,"~r~Nitro");
|
Red was just an example, I need grey, yellow, green, red, blue, light blue, light red, and white lol
Re: Use HTML Code in Menu -
IstuntmanI - 14.06.2013
Quote:
Originally Posted by Stefand
Red was just an example, I need grey, yellow, green, red, blue, light blue, light red, and white lol
|
You can't obtain grey, you could try another color.
Yellow - ~y~
Green - ~g~
Red - ~r~
Light blue - ~b~~h~, or even with more ~h~ if you need: ~b~~h~~h~ etc.
Light red - ~r~~h~, or even with more ~h~ if you need: ~r~~h~~h~ etc.
White - ~w~
If you don't want these colors, you could just use dialogs, they are easier to use, looks better and supports hex.