I know of the create check box dialog item but I am not sure how to connect this up with labels.
E.g
A List of items with check boxes for each one
List item one [x]
List item two [ ]
List item three [ ]
List item four [ ]
The user can tick which ever check box and then click a remove button. The remove button would then remove the list items that have been checked.
I just wouldn't know how to create check boxes that tie with the data. How would you create the event for this and if possible is their any tutorials on check boxes.
What I image it to be is,
1) A loop that displays labels and check boxes inside a list box
2) An event that tracks users selecting check boxes
3) An event that tracks when the user clicks the remove button and this will remove the selected check-boxes
no need to keep track of when players select check boxes.
Just a trigger for when they click the remove button. Inside this trigger you can see which check boxes are ticked or not. (There is a function something like "dialog item is checked" which will do this for you)
As for how to link check box with list item have an array of checkboxes and an array of items in your list. check which checkboxes are checked, erase corresponding list items and then recreate the dialog display.
There's no way to put check boxes inside a list box. But for check boxes, you can just check "dialog item is checked". From there, you can see WHICH check box is checked. I would save the check boxes into an array, loop through them, and see if each one is checked. If so, then whatever integer you're at on the loop is the list item to remove.
for each int x from 1 to 10
{
if (dialog item is checked(listbox[x])
then
{
You know check box #x is checked, remove list item x
}
}
Quote from zeldarules28:
There's no way to put check boxes inside a list box.
This is correct. I didn't think you meant that you were using a "list" dialog item. I figured you were doing something like this:
item 1 [ ]
item 2 [ ]
item 3 [ ]
item 4 [ ]
where each item is a label and has a checkbox placed beside it.
I cannot think of any *simple* ways to acheive something similar using a list dialog item.
One thing you could do would be to detect a player selecting a list item and put an asterisk next to that item. Then when a player clicks the "delete" button the highlighted items in the list are removed.
or a player clicks the "delete" button and then whenever he selects a list item that item is removed.
hmmm you might check to see if anybody made a library that could make a more advanced system of a list box
I know if i really wanted to I could create a dialog that has panels in it that act like list items.
You would have to code the scrolling and the way it keeps track of all the items but it is doable.
If i get some motivation I might attempt it myself.
----
AFAIK there are such libraries. However there is no way to detect mouse wheel scrolling and no good way to detect dragging an item around the screen. You could use a scroll bar which is one of the dialog item types however it only scrools horizontally, not vertically so it would be really wierd to use.
EDIT: the "rotate dialog item" does not work when used on the inbuilt scroll bar either
I know of the create check box dialog item but I am not sure how to connect this up with labels.
E.g
A List of items with check boxes for each one List item one [x] List item two [ ] List item three [ ] List item four [ ]
The user can tick which ever check box and then click a remove button. The remove button would then remove the list items that have been checked.
I just wouldn't know how to create check boxes that tie with the data. How would you create the event for this and if possible is their any tutorials on check boxes.
What I image it to be is,
1) A loop that displays labels and check boxes inside a list box 2) An event that tracks users selecting check boxes 3) An event that tracks when the user clicks the remove button and this will remove the selected check-boxes
@farban6:
no need to keep track of when players select check boxes.
Just a trigger for when they click the remove button. Inside this trigger you can see which check boxes are ticked or not. (There is a function something like "dialog item is checked" which will do this for you)
As for how to link check box with list item have an array of checkboxes and an array of items in your list. check which checkboxes are checked, erase corresponding list items and then recreate the dialog display.
There's no way to put check boxes inside a list box. But for check boxes, you can just check "dialog item is checked". From there, you can see WHICH check box is checked. I would save the check boxes into an array, loop through them, and see if each one is checked. If so, then whatever integer you're at on the loop is the list item to remove.
Quote from zeldarules28:
There's no way to put check boxes inside a list box.
This is correct. I didn't think you meant that you were using a "list" dialog item. I figured you were doing something like this:
item 1 [ ]
item 2 [ ]
item 3 [ ]
item 4 [ ]
where each item is a label and has a checkbox placed beside it.
I cannot think of any *simple* ways to acheive something similar using a list dialog item.
One thing you could do would be to detect a player selecting a list item and put an asterisk next to that item. Then when a player clicks the "delete" button the highlighted items in the list are removed.
or a player clicks the "delete" button and then whenever he selects a list item that item is removed.
gl
@farban6: Go
hmmm you might check to see if anybody made a library that could make a more advanced system of a list box
I know if i really wanted to I could create a dialog that has panels in it that act like list items.
You would have to code the scrolling and the way it keeps track of all the items but it is doable.
If i get some motivation I might attempt it myself.
Quote from SouLCarveRR:
@farban6: Go
hmmm you might check to see if anybody made a library that could make a more advanced system of a list box
I know if i really wanted to I could create a dialog that has panels in it that act like list items.
You would have to code the scrolling and the way it keeps track of all the items but it is doable.
If i get some motivation I might attempt it myself.
----
AFAIK there are such libraries. However there is no way to detect mouse wheel scrolling and no good way to detect dragging an item around the screen. You could use a scroll bar which is one of the dialog item types however it only scrools horizontally, not vertically so it would be really wierd to use.
EDIT: the "rotate dialog item" does not work when used on the inbuilt scroll bar either