Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // loop through all settings for component type and create associated bar
- for (var _i = 0; _i < _settings_count; _i++) {
- // setting's label
- var _txt = new EmuText(_padding, _y, 160, 20, string(setting_labels[_i]) + ":");
- // setting's bar
- var _bar = new EmuProgressBar(_tab_group.width - 90 - 10, _y + 2, 90, 19, 5, 1, 10, true, obj_component_design.component.settings[_i], function() {
- obj_component_design.component.settings[assigned_index] = value;
- });
- // pass bar it's index value
- _bar.assigned_index = _i;
- // create value display to show current setting of bar
- var _val = new EmuText(_tab_group.width - 20, _y, 20, 20, string(obj_component_design.component.settings[_i]));
- _val.alignment = fa_center;
- // tell bar to update val
- _bar._update_object = _val;
- // add label, bar, and bar value display to setting tab
- _tab_settings.AddContent([_txt, _bar, _val]);
- _bar.SetIntegersOnly(true);
- _y += Y_SEP;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement