Where can I find the list of gossip menu icons? - azerothcore

I'm making a c++ script and would like to add good looking icons to the gossip menu entries.
Where can I find the list?

The gossip list is available in the GossipDef.h file:
enum GossipOptionIcon
{
GOSSIP_ICON_CHAT = 0, // white chat bubble
GOSSIP_ICON_VENDOR = 1, // brown bag
GOSSIP_ICON_TAXI = 2, // flightmarker (paperplane)
GOSSIP_ICON_TRAINER = 3, // brown book (trainer)
GOSSIP_ICON_INTERACT_1 = 4, // golden interaction wheel
GOSSIP_ICON_INTERACT_2 = 5, // golden interaction wheel
GOSSIP_ICON_MONEY_BAG = 6, // brown bag (with gold coin in lower corner)
GOSSIP_ICON_TALK = 7, // white chat bubble (with "..." inside)
GOSSIP_ICON_TABARD = 8, // white tabard
GOSSIP_ICON_BATTLE = 9, // two crossed swords
GOSSIP_ICON_DOT = 10, // yellow dot/point
GOSSIP_ICON_CHAT_11 = 11, // white chat bubble
GOSSIP_ICON_CHAT_12 = 12, // white chat bubble
GOSSIP_ICON_CHAT_13 = 13, // white chat bubble
GOSSIP_ICON_UNK_14 = 14, // INVALID - DO NOT USE
GOSSIP_ICON_UNK_15 = 15, // INVALID - DO NOT USE
GOSSIP_ICON_CHAT_16 = 16, // white chat bubble
GOSSIP_ICON_CHAT_17 = 17, // white chat bubble
GOSSIP_ICON_CHAT_18 = 18, // white chat bubble
GOSSIP_ICON_CHAT_19 = 19, // white chat bubble
GOSSIP_ICON_CHAT_20 = 20, // white chat bubble
GOSSIP_ICON_MAX
};
Here is also an available list on the web wiki:
http://www.azerothcore.org/wiki/gossip_menu_option#optionicon

Related

How can I use datetime format without have interpolation escape to false

Doing this:
// JSON
{
"intlDateTime": "On the {{val, datetime}}",
}
i18next.t('intlDateTime', { val: new Date(Date.UTC(2012, 11, 20, 3, 0, 0)) });
// --> On the 12/20/2012
without interpolation escape to false
ends with a display of / instead of "/"
How can we use date format and avoid xss attacks at the same time ?
To solve the wrong display, I need to write:
{t('lastModified', {
val: new Date(Date.UTC(2012, 11, 20, 3, 0, 0)),
interpolation: { escapeValue: false },
})}
which I would like to avoid.

Changes from 3.5 to 4.0

I need to help to port my 3.5 rc.lua to 4.0. I try to set one progressbar.
It used to be :
mybacklight = awful.widget.progressbar()
mybacklight:set_width(12)
mybacklight:set_height(10)
mybacklight:set_vertical(true)
mybacklight:set_background_color("#131211")
mybacklight:set_border_color(nil)
The new version should be :
mybacklight = wibox.widget.progressbar {
max_value = 1,
value = brightness_new,
forced_width = 12,
forced_height = 10,
background_color = "#131211",
border_color = nil,
color = {type="linear", from = {0, 0}, to = {0, 20},
stops = { {0, "#F6F6F6"}, {0.5,
"#bdbdbd"}, {1.0, "#3b3b3b"} } },
widget = wibox.widget.progressbar,
direction = 'east',
layout = wibox.container.rotate
}
The 3.5 version works (no errors) but does no more give the expected result, it should be a vertical progressbar, it is, but the progression itself is horizontal.
The 4.0 version makes no error, except that it takes all the place with red (default ?) colors.
First of all, the imperative syntax isn't gone, you can still do it "the old way". It is fully supported and the declarative one is "compiled to" the old one.
Now, to answer the question, the code should look like (untested):
mybacklight = wibox.widget {
{
max_value = 1,
value = brightness_new,
background_color = "#131211",
color = {type="linear", from = {0, 0}, to = {0, 20},
stops = { {0, "#F6F6F6"}, {0.5,
"#bdbdbd"}, {1.0, "#3b3b3b"} }
},
widget = wibox.widget.progressbar,
},
forced_width = 12,
forced_height = 10,
direction = 'east',
layout = wibox.container.rotate
}
Changes:
The composite widget constructor is wibox.widget. You used the progressbar constructor to contruct a rotate container
Indentation to make the code more readable
You had 2 widget in the same block, this isn't supported.
Reference https://awesomewm.org/apidoc/classes/wibox.widget.progressbar.html#

Custom SC_Error_Code Siebel CTI 2015

I need to register a custom error code while creating custom driver for Siebel CTI. As per its document, following errors are predefined (enum from scapi.h):
enum SCErrorCode
{
SC_EC_OK = 0,
SC_EC_ERROR = 1,
SC_EC_CMD_NOT_SUPPORTED = 2,
SC_EC_MEDIA_TYPE_NOT_SUPPORTED = 3,
SC_EC_INVALID_HANDLE = 4,
SC_EC_OUT_OF_MEMORY = 5,
SC_EC_NETWORK_ERROR = 6,
SC_EC_LIB_LOAD_ERR = 7, /* Unable to load driver DLL */
SC_EC_FUNC_NOT_RESOLVED = 8, /* Unable to resolve function address */
SC_EC_DRIVER_CREATION_ERR = 9,
SC_EC_DRIVER_RELEASE_ERR = 10,
SC_EC_SERVICE_CREATION_ERR = 11,
SC_EC_SERVICE_RELEASE_ERR = 12,
SC_EC_INVALID_ITEM_TRACKING_ID = 13,
SC_EC_CLIENT_INTERFACE_ERR = 14, /* Failed on invoking ISC_CLIENT_HANDLE function */
SC_EC_SENDMSG_FAILED_RETRY = 15, /* SC_CT_SENDMESSAGE failed, please resend again later */
SC_EC_IMPOBJ_CREATE_ERR = 16, /* Unable to create the underlying implementation object */
SC_EC_INVALID_LICENSE = 17,
SC_EC_WORK_ITEM_WRONG_STATE = 18, /* Work item is at wrong state for the operation */
SC_EC_DRIVER_SPECIFIC = 1000
};
Siebel Administration guide page 270 says:
SCErrorCode:
The values enumerated by SCErrorCode specify predefined error codes. The error codes from 0 to 1000 are reserved.
How can I add/register a custom error code? Or is there any way to specify driver specific error message using SC_EC_DRIVER_SPECIFIC error.

Hidden OK button because of window size in Tcl-tk

I have the following problem, described in the image above.
Actually sometimes when I use my script the "OK" button shows, and not at other times when I use the script. If I make the window bigger myself, using my mouse it will then show up (It was previously hidden because the window was to small). I don't understand why and I couldn't find anything really helpful on the internet. (Changing stuff like the value of padx and pady didn't work.)
There has to be a parameter to adjust the general window size but I can't find it.
My second problem is that if the strings are long as in the example; a scroll bar to scroll from left to right will show. I would like to show the full strings. I also don't know how to fix that, sadly.
Is there something to do about it?
My code is the following:
noms_var_manif is a character vector
win2 <- tktoplevel()
tkgrid(tk2label(win2, text = "Veuillez selectionner les variables appartenant à ce bloc",
wraplength = 200, justify = "left"),
padx = 10, pady = c(15, 5), sticky = "w", columnspan = 2)
# Note that 'selection' uses indices starting at 1, like R and not Tcl/Tk!
win2$env$lst <- tk2listbox(win2,values=noms_var_manif, height = 10, selectmode = "extended")
tkgrid(win2$env$lst, padx = 100, pady = c(10, 20), sticky = "ew", columnspan = 2)
onOK <- function() {
select_var_bloc<- noms_var_manif[as.numeric(tkcurselection(win2$env$lst)) + 1]
tkdestroy(win2)
if (!length(select_var_bloc)) {
msg <- "Il n'y a donc aucune variable dans ce bloc?"
} else {
msg <- paste0("Vous avez choisi les variables suivantes: ",
paste(select_var_bloc, collapse = ", "))
}
tkmessageBox(message = msg)
win2$env$select_var_bloc= select_var_bloc
tkdestroy(win2)
}
win2$env$butOK <-tk2button(win2, text = "OK ", width = -6, command = onOK)
tkgrid(win2$env$butOK, padx = 10, pady = c(10, 15))
tkwait.window(win2)
select_var_bloc=win2$env$select_var_bloc
What you want to do is (1) fix the height and width of the the listbox, and
(2) fix the height and width of the window so that it is big enough to allow the OK button to always show. You can also fix the window so that it cannot be resized.

put 2 radiobuttons in one column without overlapping JavaFX

I wanted to ask for help with one problem. I want to move two radio button in one column so that they will both take only as much space as textbox above them. How can I do this? Here is the code and screenshot of current improper version:
Please do not flag my question as duplicate if you are not 100% sure, ok? It is not nice to have your question flag as duplicate of other question, go to this other one and finds out that only common thing is that they are both about programming.
GridPane formGrid = new GridPane();
formGrid.setPadding(new Insets(5,5,5,5));
formGrid.setVgap(6);
formGrid.setHgap(4);
//first row
Label nameLabel = new Label("Name");
GridPane.setConstraints(nameLabel, 0, 0);
TextField nameInput = new TextField();
GridPane.setConstraints(nameInput, 1, 0);
Label ageLabel = new Label("Age");
GridPane.setConstraints(ageLabel, 2, 0);
TextField ageInput = new TextField();
GridPane.setConstraints(ageInput, 3, 0);
//secondRow
Label colourLabel = new Label("Colour");
GridPane.setConstraints(colourLabel, 0, 1);
TextField colourInput = new TextField();
GridPane.setConstraints(colourInput, 1, 1);
Label genderLabel = new Label("Gender");
GridPane.setConstraints(genderLabel, 2, 1);
ToggleGroup pickGender = new ToggleGroup();
RadioButton pickMale = new RadioButton("Male");
pickMale.setToggleGroup(pickGender);
pickMale.setSelected(true);
GridPane.setConstraints(pickMale, 3, 1, 1, 1);
RadioButton pickFemale = new RadioButton("Female");
pickFemale.setToggleGroup(pickGender);
GridPane.setConstraints(pickFemale, 4, 1, 1, 1);
//third row
Label typeLabel = new Label("Type");
GridPane.setConstraints(typeLabel, 0, 2);
//combobox
ComboBox<String> typeBox = new ComboBox<>();
GridPane.setConstraints(typeBox, 1, 2);
Label breedLabel = new Label("Breed");
GridPane.setConstraints(breedLabel, 2, 2);
TextField breedInput = new TextField();
GridPane.setConstraints(breedInput, 3, 2);
//fourth row
Label categoryLabel = new Label("Category: ");
GridPane.setConstraints(categoryLabel, 0, 3);
ToggleGroup pickCategory = new ToggleGroup();
RadioButton pickLost = new RadioButton("Lost");
pickLost.setToggleGroup(pickCategory);
pickLost.setSelected(true);
GridPane.setConstraints(pickLost, 1, 3);
RadioButton pickFound = new RadioButton("Found");
pickLost.setToggleGroup(pickCategory);
GridPane.setConstraints(pickFound, 2, 3);
RadioButton pickAdoption = new RadioButton("Adoption");
pickLost.setToggleGroup(pickCategory);
GridPane.setConstraints(pickAdoption, 3, 3);
//fifth row
Label descriptionLabel = new Label("Description");
GridPane.setConstraints(descriptionLabel, 0, 4);
TextArea descriptionInput = new TextArea();
GridPane.setConstraints(descriptionInput, 1, 4, 2, 1);
formGrid.getChildren().addAll(nameLabel, nameInput, ageLabel, ageInput);
formGrid.getChildren().addAll(colourLabel, colourInput, genderLabel, pickMale, pickFemale);
formGrid.getChildren().addAll(typeLabel, typeBox, breedLabel, breedInput, categoryLabel);
formGrid.getChildren().addAll(pickLost, pickFound, pickAdoption, descriptionLabel, descriptionInput);
Think of it the other way around. The "Female" radio button is in column 4, and so it is to the right of anything in column 3. Column 3 is being forced to be wide enough to hold the two text fields, which is what is forcing that radio button so far to the right. If you want the text fields to span the same horizontal space as the two radio buttons, let them use both the columns the radio buttons occupy: i.e. let the text fields span columns 3 and 4.
TextField ageInput = new TextField();
GridPane.setConstraints(ageInput, 3, 0, 2, 1);
TextField breedInput = new TextField();
GridPane.setConstraints(breedInput, 3, 2, 2, 1);
Now columns 3 and 4 contain those two text fields, column 3 contains the "Male" radio button, and column 4 contains the "Female" radio button.
I'm not sure if everything you posted is the whole form, but you might also want to increase the column span of the text area to make it work nicely:
GridPane.setConstraints(descriptionInput, 1, 4, 4, 1);
With those changes I get
(If it's important to you, you can avoid the "Female" check box from being pushed to the right by also setting the column span of the "Adoption" check box to 2.)
Another option is (starting with your original code) to wrap the two radio buttons in a HBox, and place the HBox in the grid pane instead of the radio buttons:
RadioButton pickMale = new RadioButton("Male");
pickMale.setToggleGroup(pickGender);
pickMale.setSelected(true);
RadioButton pickFemale = new RadioButton("Female");
pickFemale.setToggleGroup(pickGender);
HBox genderButtons = new HBox(4, pickMale, pickFemale);
GridPane.setConstraints(genderButtons, 3, 1);
// ...
formGrid.getChildren().addAll(colourLabel, colourInput, genderLabel, genderButtons);
However, I prefer the previous approach. (Your mileage may vary.)

Resources