ok so i have another error
i hope someone can explain to me what the error means, i dont quite understand it...
here it is:
here is my code for the draw event on oList:
also here is the create event where i established some variables:
i hope someone can explain to me what the error means, i dont quite understand it...
here it is:
here is my code for the draw event on oList:
GML:
//Draw background
draw_set_color($48413b);
draw_roundrect(x, y, x + l_width, y + l_height, 0);
draw_set_color(-1);
//Draw list
var _size = ds_list_size(list);
for (var i = 0; i < _size; i++)
{
//Array data
var _arr = list[| i];
var _name = _arr[PR.NAME];
var _sel = _arr[PR.SELECTED];
var _vals = _arr[PR.VALUES];
//Position to draw
var _x = x + padding;
var _y = y + padding + itemH * i;
//Color
if (i != hoverID) draw_set_color(c_black);
//Draw name
draw_text(_x, _y, _name);
//Draw value
if (_sel > -1)
{
var _val = _vals[_sel];
draw_set_halign(fa_right);
draw_text(x + l_width - padding, _y, _val);
draw_set_halign(fa_left);
}
//Reset color
draw_set_color(c_white);
}
GML:
//Properties
l_width = 400;
l_height = 600;
//GUI
itemH = 48;
padding = 24;
//List
list = ds_list_create();
//Variables
hoverID = -1;