I understand now the iteration applied in the foreach loop. But I still have some headache with my question:
Code: Select all
GFPage(s_gump, 1);
var num_options := options.Size();
var y_pos := 110;
var i;
foreach entry in ( options )
var x_pos := 210;
for( i:=1; i<=7; i+=1 )
GFCheckBox(s_gump, x_pos, y_pos, 2360, 2361, 0, _entry_iter);
x_pos += 50;
SleepMS(2);
endfor
GFTextLine(s_gump, 30, y_pos, 1153, entry);
y_pos := y_pos+20;
if ( _entry_iter % 14 == 0 && _entry_iter <num_options>= 1 && key <= num_options )
values.Append(options[key]);
endif
SleepMS(2);
endforeach
Options defined are a list of proprieties in an array. The checkboxes needs to send a special event to only the good option.
With the above code _entry_iter will simply loop to the next entry wich is normal but not exactly what I need. I tried to use numbers as if the value of the check box will return if checked. But it stills loop into the options given.
ex.:
entry1 checkbox1 checkbox2 checkbox3 checkbox4 checkbox5
entry2 checkbox1 checkbox2 checkbox3 checkbox4 checkbox5
entry3 checkbox1 checkbox2 checkbox3 checkbox4 checkbox5
[...]
If checkbox1 is checked, it will return a rename..
If checkbox2 is checked, it will return a new color..
If checkbox3 is checked, it will return a new graphic..
(that's an exemple)