//constructor of a scrollbar
/// @function basic_Scrollbar_componets(id) constructor
/// @description constructor for a scrollbar
/// @param {object} id The instance id of the calling object
function basic_Scrollbar_componets (_id) : basic_Control_componets(_id) constructor
{
show_debug_message("basic_Scrollbar_componets" + string(77)); //NOTHING here is seen if the new operator is used in the Create Event.
#region OPERATION
//Scrollbar inputs and outputs
large_change = _id.Large_Change; //When the user clicks on the Background of the scrollbar
small_change = _id.Small_Change; //When the user clicks on the Decrease or Increase Buttons
input_maximum = _id.Maximum; //The input_maximum value the scrollbar can output
input_minimum = _id.Minimum; //The input_minimum value the scrollbar can output
input_value = _id.Value; //The value input by the user to inform the output of the scrollbar
output_maximum = undefined; //An adjusted version of the input_maximum
output_minimum = undefined; //An adjusted version of the input_minimum
output_value = 0; //An adjusted version of the input_value. The output_value is returned as the value of the scrollbar
precise_scrolling = _id.Precise_Scrolling; //Enables the Bar Button to jaggedly drag if true, smooth with padding after button release if false
scroll_drag_end_pad_type = _id.Scroll_Drag_End_Pad_Type; //Pad type after smooth Bar Button dragging button release
show_debug_message("basic_Scrollbar_componets" + string(90));
//Get magnitude of difference between max and min
output_max_min_diff = point_distance(input_maximum,0,input_minimum,0);
//shift toward 0
output_maximum = output_max_min_diff;
output_minimum = 0;
//Adjust starting output-value position based on input_value starting position
//Ensure input_value lies within bounds
if ((input_minimum < input_maximum && input_value >= input_minimum && input_value <= input_maximum)
|| (input_minimum > input_maximum && input_value <= input_minimum && input_value >= input_maximum))
{
if (input_minimum != output_minimum)
{
//Max is less-than Min. In HWND scrollbars, this usually counts up from the bottom (min and max reverse)
if (input_maximum < input_minimum)
{output_value = -sign(input_minimum) * ((sign(input_minimum) * input_value) + (sign(input_minimum) * -input_minimum));}
else
{output_value = sign(input_minimum) * ((sign(input_minimum) * input_value) - (sign(input_minimum) * input_minimum));}
}
//input and output are the same (Both == 0)
else
{output_value = sign(input_maximum) * input_value;}
}
//input_value falls outside bounds
else
{
if (input_maximum < input_minimum)
{
if (input_value > input_minimum)
{
output_value = output_minimum;
}
else if (input_value < input_maximum)
{
output_value = output_maximum;
}
input_value = clamp(input_value,input_maximum,input_minimum);
}
else
{
if (input_value < input_minimum)
{
output_value = output_minimum;
}
else if (input_value > input_maximum)
{
output_value = output_maximum;
}
input_value = clamp(input_value,input_minimum,input_maximum);
}
}
show_debug_message("basic_Scrollbar_componets" + string(142));
//Sounds
//Optional sounds the user may instantiate in the Variable Definitions module
small_change_decrease_sound = _id.Small_Change_Decrease_Sound; //Plays when Decrease Button is clicked
large_change_decrease_sound = _id.Large_Change_Decrease_Sound; //Plays when the portion of the Background between the Bar Button and Decrease Button is clicked
small_change_increase_sound = _id.Small_Change_Increase_Sound; //Plays when Increase Button is clicked
large_change_increase_sound = _id.Large_Change_Increase_Sound; //Plays when the portion of the Background between the Bar Button and Increase Button is clicked
dragging_decrease_sound = _id.Dragging_Decrease_Sound; //Plays while dragging bar button in decreasing value direction
dragging_increase_sound = _id.Dragging_Increase_Sound; //Plays while dragging bar button in increasing value direction
maxed_sound = _id.Maxed_Sound; //Plays when input_value is maxed
minned_sound = _id.Minned_Sound; //Plays when input_value is minned
overlap_sounds = _id.Overlap_Sounds; //Allows sounds to play repeatedly instead of waiting for current audio to finish (may cause loud or distorted audio)
white_dragging_repeat_max_min_sounds_if_beyond_scope = _id.While_Dragging_Reapeat_Max_Min_Sounds_If_Beyond_Scope; //If the Bar Button is being dragged and the value is beyond scope, should the max/min audio play repeatedly?
swap_sounds = _id.Swap_Sounds; //Swaps decrease and increase sounds, and max and min sounds
//Shaders
decrease_button_shader = _id.Decrease_Button_Shader; //A shader for the decrease button
increase_button_shader = _id.Increase_Button_Shader; //A shader for the increase button
bar_button_shader = _id.Bar_Button_Shader; //A shader for the bar button
background_shader = _id.Background_Shader; //A shader for the background
#endregion
#region BUTTONS
//Decrease Button
//Appears at the top (vertical) or left (horizontal) end of the scrollbar
decrease_button_xx1 = undefined;
decrease_button_yy1 = undefined;
decrease_button_xx2 = undefined;
decrease_button_yy2 = undefined;
decrease_button_width = undefined;
decrease_button_height = undefined;
decrease_button_center_x = undefined;
decrease_button_center_y = undefined;
//increase button
//Appears at the bottom (vertical) or right (horizontal) end of the scrollbar
increase_button_xx1 = undefined;
increase_button_yy1 = undefined;
increase_button_xx2 = undefined;
increase_button_yy2 = undefined;
increase_button_width = undefined;
increase_button_height = undefined;
increase_button_center_x = undefined;
increase_button_center_y = undefined;
//Bar Button
//The slider button. This is also known as the "thumb."
bar_button_xx1 = undefined;
bar_button_yy1 = undefined;
bar_button_xx2 = undefined;
bar_button_yy2 = undefined;
bar_button_width = undefined;
bar_button_height = undefined;
bar_button_center_x = undefined;
bar_button_center_y = undefined;
//Background
//The background of the scrollbar
background_xx1 = undefined;
background_yy1 = undefined;
background_xx2 = undefined;
background_yy2 = undefined;
background_width = undefined; //RESERVED WORD!!!!
background_height = undefined; //RESERVED WORD!!!!
background_center_x = undefined;
background_center_y = undefined;
show_debug_message("basic_Scrollbar_componets" + string(208));
//Misc Button Options
//Decrease/Increase Buttons
//Modifies the the height or width of the subordiant edge of the Decrease and/or Increaase Buttons
decrease_button_auto_to_square = _id.Decrease_Button_Auto_To_Square; //Force subordinante edge of this button to extend so button is square?
decrease_button_subrdinant_edge_size_modifier = _id.Decrease_Button_Subordinante_Edge_Size_Modifier;
increase_button_auto_to_square = _id.Increase_Button_Auto_To_Square; //Force subordinante edge of this button to extend so button is square?
increase_button_subrdinant_edge_size_modifier = _id.Increase_Button_Subordinante_Edge_Size_Modifier;
//Bar Button (the thumb)
bar_button_blinking_interval = _id.Bar_Button_Blinking_Interval; //Causes the Bar Button to blink at a specified interval per second
bar_button_blink_always_on = _id.Bar_Button_Blink_Always_On; //Causes the Bar Button blink to always appear while the button is selected
bar_button_blinking_time = 0.0; //Counter for the blink effect
bar_button_blink = false; //If true, a black rectangle is drawn over plateau portion of a skeuomorphic bar button
bar_button_allow_blinking = bar_button_blinking_interval == 0 ? false : true;//Sets whether the bar button blinks when selected
bar_button_available_distance = undefined; //The Room-space distance between the Decrease and Increase Buttons
//Max and min points of travel of x of y
bar_button_max_travel_xy = [undefined, undefined]; //The Room-space input_maximum distance in x or y plane the Bar Button can travel
bar_button_min_travel_xy = [undefined, undefined]; //The Room-space input_minimum distance in x or y plane the Bar Button can travel
bar_button_exists = true; //If the distance between the max and min change is less-than the large change, DO NOT activate the bar button
bar_button_percent_of_dist = undefined; //The percentage of the Bar Button's height or width as a portion of the available distance
bar_button_size_of_dist = undefined; //The size of the Bar Button's height or width as a portion of the available distance
bar_button_adjust_image_index_per_percentage = _id.Bar_Button_Adjust_Image_Index_Per_Percentage; //Changes the current Bar_Button_Image_Index based on the current output_value as a percentage of the image indices
bar_button_sprite_number = sprite_get_number(_id.Bar_Button_Sprite_Index); //Returns the total number of indices in the Bar_Button_Sprite_Index
bar_button_reverse_image_indices = _id.Bar_Button_Reverse_Image_Indices; //Reverses the order in which the texture indices are returned
thumb_use_value_maxed_image_index = _id.Thumb_Use_Value_Maxed_Image_Index;//The frame that displays when the thumb value is maxed
thumb_use_value_minned_image_index = _id.Thumb_Use_Value_Minned_Image_Index;//The frame that displayed when the thumb value is minned
bar_button_caption_equals_value = _id.Bar_Button_Caption_Equals_Value; //Overrides the caption to be the current Scrollbar value. To avoid text cut off, enable Bar_Button_Sprite_Overlay_Treat_No_Offset_As_Offset
proportional_thumb = _id.Proportional_Thumb; //Force the Thumb to assume a square shape
bar_button_max_min_audio_has_played = false; //controller used for whether the max or min audio has played when user slides the Bar Button
//Background (the track)
background_OnClick_direction_of_large_change_travel = undefined;//The direction of the large_change travel
show_debug_message("basic_Scrollbar_componets" + string(241));
//MISC
//clickable regions
//records which part of the scrollbar was clicked
//Uses ENUM_ScrollBar_Clickable_Region_parts
clickable_regions = [
[undefined,undefined,undefined,undefined], //[0, [left_bound, top_bound, right_bound, bottom_bound]] of Increase Button
[undefined,undefined,undefined,undefined], //[1, [left_bound, top_bound, right_bound, bottom_bound]] of Decrease Button
[undefined,undefined,undefined,undefined], //[2, [left_bound, top_bound, right_bound, bottom_bound]] of Bar Button
[undefined,undefined,undefined,undefined] //[3, [left_bound, top_bound, right_bound, bottom_bound]] of Background
];
//Get clicked region
//Determines the x- and y-
//corrdiantes of a click Of_x Of_y
clicked_region = [undefined,undefined];
clicked_button = noone; //The specific button clicked
a_button_is_clicked = false; //true if any button on scrollbar clicked. Becomes false after mouse button or other interaction ended
//Scrollbar Specific
decrease_button_render_arrow = undefined; //Renders an up- or left-facing arrow
increase_button_render_arrow = undefined; //Renders a down- or right-facing arrow
#endregion
#region ORIENTATION
show_debug_message("basic_Scrollbar_componets" + string(265));
//bool for orientation
is_vertical = true; //Sets whether the scrollbar is vertical or horizontal.
//Enable user to choose scrollbar orination regardless of aspect ratio
manual_orientation_override = _id.Manual_Orientation_Override;
//Set the aspect ratio. This value will determine whether the scrollbar is vertical or horizontal
//Note: an aspect ratio of 1 is considered vertical as vertical is the commonest orientation for a scrollbar
aspect_ratio = (!is_infinity(bounds_width / bounds_height) && !is_nan(bounds_width / bounds_height) ? (bounds_width / bounds_height) : 1);
//Orientation may also be handled by the image index in the Room Editor.
//Frame 0 = Auto; 1 = Vertical; 2 = Horizontal. Image index in Room Editor will provide a sample of in-game output.
//Importatnt Note: --!!Manual_Orientation_Override will override setting the orientation using the image index!!--
orientation = _id.image_index;
//Set orientation
//use override
if (manual_orientation_override != false)
{
switch (manual_orientation_override)
{
//Auto
case SCROLLBAR_ORIENTATIONS_AUTO:
{orientation = ENUM_Scrollbar_Orientation.auto;}
break;
//Vert
case SCROLLBAR_ORIENTATIONS_VERTICAL:
{orientation = ENUM_Scrollbar_Orientation.vert;}
break;
//Horz
case SCROLLBAR_ORIENTATIONS_HORIZONTAL:
{orientation = ENUM_Scrollbar_Orientation.horz;}
break;
//Defaults to auto
default:
{orientation = ENUM_Scrollbar_Orientation.auto;}
break;
}
}
//use image index
else
{
switch (_id.image_index)
{
//Auto
case ENUM_Scrollbar_Orientation.auto:
{orientation = _id.image_index;}
break;
//Vert
case ENUM_Scrollbar_Orientation.vert:
{orientation = _id.image_index;}
break;
//Horz
case ENUM_Scrollbar_Orientation.horz:
{orientation = _id.image_index;}
break;
//Defaults to auto
default:
{orientation = ENUM_Scrollbar_Orientation.auto;}
break;
}
}
//Determine whether is vertical or horizontal if auto-orientation
if (orientation == ENUM_Scrollbar_Orientation.auto)
{
//Is taller
if (aspect_ratio <= 1)
{is_vertical = true;}
//is wider
else
{is_vertical = false;}
}
//Vertical
else if orientation == ENUM_Scrollbar_Orientation.vert
{is_vertical = true;}
//Horizontal
else if orientation == ENUM_Scrollbar_Orientation.horz
{is_vertical = false;}
//default to vertical
else
{is_vertical = true;}
show_debug_message("basic_Scrollbar_componets" + string(347));
#region ASSIGN VALUES TO BUTTONS
//Get height and width of buttons
//Vertical (Width matches bounding box [defined toward the start of this struct]) -- Decrease Button is top
if (is_vertical)
{
//decrease button
decrease_button_xx1 = xx1;
decrease_button_yy1 = yy1;
decrease_button_xx2 = xx2;
//Auto-square?
if (decrease_button_auto_to_square)
{decrease_button_yy2 = min((yy1 + bounds_width) + decrease_button_subrdinant_edge_size_modifier, yy1 + (bounds_height/2));}
//Traditional
else
{decrease_button_yy2 = yy1 + min(bounds_height/2, SCROLLBAR_SUBORDINANTE_DIMENSION_MAX_PIXEL_VALUE) + decrease_button_subrdinant_edge_size_modifier;}
decrease_button_width = bounds_width;
decrease_button_height = decrease_button_yy2 - decrease_button_yy1;
decrease_button_center_x = decrease_button_xx1 + decrease_button_width/2;
decrease_button_center_y = decrease_button_yy1 + decrease_button_height/2;
//increase button
increase_button_xx1 = xx1;
//Auto-square?
if (increase_button_auto_to_square)
{increase_button_yy1 = max((yy2 - bounds_width) + decrease_button_subrdinant_edge_size_modifier, yy2 - (bounds_height/2));}
//Traditional
else
{increase_button_yy1 = yy2 - min(bounds_height/2, SCROLLBAR_SUBORDINANTE_DIMENSION_MAX_PIXEL_VALUE) + increase_button_subrdinant_edge_size_modifier;}
increase_button_xx2 = xx2;
increase_button_yy2 = yy2;
increase_button_width = bounds_width;
increase_button_height = increase_button_yy2 - increase_button_yy1;
increase_button_center_x = increase_button_xx1 + increase_button_width/2;
increase_button_center_y = increase_button_yy1 + increase_button_height/2;
//bar button
//get available distance
bar_button_available_distance = point_distance(0, increase_button_yy1, 0, decrease_button_yy2);
//calculate width and height first
bar_button_width = bounds_width;
if (proportional_thumb)
{bar_button_height = min(bounds_width,increase_button_yy1-decrease_button_yy2);}
else
{bar_button_height = max(SCROLLBAR_BAR_BUTTON_MAX_SQUISH, (!is_infinity((bar_button_available_distance/((output_max_min_diff+large_change)/large_change))) && !is_nan((bar_button_available_distance/((output_max_min_diff+large_change)/large_change))) ? (bar_button_available_distance/((output_max_min_diff+large_change)/large_change)) : 0));}
//set the bar button's percentage as a portion of the available distance
bar_button_percent_of_dist = bar_button_height / (bar_button_available_distance - bar_button_height);
bar_button_size_of_dist = output_max_min_diff * bar_button_percent_of_dist;
bar_button_center_x = xx1 + bounds_width/2;
bar_button_center_y = decrease_button_yy2 + (bar_button_available_distance * (!is_infinity(output_value/(output_max_min_diff+large_change)) && !is_nan(output_value/(output_max_min_diff+large_change)) ? output_value/(output_max_min_diff+large_change) : 0)) + bar_button_height/2;
bar_button_xx1 = xx1;
bar_button_yy1 = bar_button_center_y - bar_button_height/2;
bar_button_xx2 = xx2;
bar_button_yy2 = bar_button_center_y + bar_button_height/2;
//background
background_xx1 = xx1;
background_yy1 = decrease_button_yy2;
background_xx2 = xx2;
background_yy2 = increase_button_yy1;
background_width = bounds_width;
background_height = bounds_height;
background_center_x = background_xx1 + background_width/2;
background_center_y = background_yy1 + background_height/2;
}
//Horizontal (Height matches bounding box [defined toward the start of this struct]) -- Decrease Button is left
else
{
//decrease button
decrease_button_xx1 = xx1;
decrease_button_yy1 = yy1;
//Auto-square?
if (decrease_button_auto_to_square)
{decrease_button_xx2 = min((xx1 + bounds_height) + decrease_button_subrdinant_edge_size_modifier, xx1 + (bounds_width/2));}
//Traditional
else
{decrease_button_xx2 = xx1 + min(bounds_width/2, SCROLLBAR_SUBORDINANTE_DIMENSION_MAX_PIXEL_VALUE) + decrease_button_subrdinant_edge_size_modifier;}
decrease_button_yy2 = yy2;
decrease_button_width = decrease_button_xx2 - decrease_button_xx1;
decrease_button_height = bounds_height;
decrease_button_center_x = decrease_button_xx1 + decrease_button_width/2;
decrease_button_center_y = decrease_button_yy1 + decrease_button_height/2;
//increase button
//Auto-square?
if (increase_button_auto_to_square)
{increase_button_xx1 = max((xx2 - bounds_height) + decrease_button_subrdinant_edge_size_modifier, xx2 - (bounds_width/2));}
//Traditional
else
{increase_button_xx1 = xx2 - min(bounds_width/2, SCROLLBAR_SUBORDINANTE_DIMENSION_MAX_PIXEL_VALUE) + increase_button_subrdinant_edge_size_modifier;}
increase_button_yy1 = yy1;
increase_button_xx2 = xx2;
increase_button_yy2 = yy2;
increase_button_width = increase_button_xx2 - increase_button_xx1;
increase_button_height = bounds_height;
increase_button_center_x = increase_button_xx1 + increase_button_width/2;
increase_button_center_y = increase_button_yy1 + increase_button_height/2;
//bar button
//get available distance
bar_button_available_distance = point_distance(0, increase_button_xx1, 0, decrease_button_xx2);
//calculate width and height first
//Auto-square?
if (proportional_thumb)
{bar_button_width = min(bounds_height,increase_button_xx1-decrease_button_xx2);}
//Traditional
else
{bar_button_width = max(SCROLLBAR_BAR_BUTTON_MAX_SQUISH, (!is_infinity((bar_button_available_distance/((output_max_min_diff+large_change)/large_change))) && !is_nan((bar_button_available_distance/((output_max_min_diff+large_change)/large_change))) ? (bar_button_available_distance/((output_max_min_diff+large_change)/large_change)) : 0));}
bar_button_height = bounds_height;
//set the bar button's percentage as a portion of the available distance
bar_button_percent_of_dist = bar_button_width / (bar_button_available_distance - bar_button_width);
bar_button_size_of_dist = output_max_min_diff * bar_button_percent_of_dist;
bar_button_center_x = decrease_button_xx2 + (bar_button_available_distance * (!is_infinity(output_value/(output_max_min_diff+large_change)) && !is_nan(output_value/(output_max_min_diff+large_change)) ? output_value/(output_max_min_diff+large_change) : 0)) + bar_button_width/2
bar_button_center_y = yy1 + bounds_height/2;
bar_button_xx1 = bar_button_center_x - bar_button_width/2;
bar_button_yy1 = yy1;
bar_button_xx2 = bar_button_center_x + bar_button_width/2;
bar_button_yy2 = yy2;
//background
background_xx1 = decrease_button_xx2;
background_yy1 = yy1;
background_xx2 = increase_button_xx1;
background_yy2 = yy2;
background_width = bounds_width;
background_height = bounds_height;
background_center_x = background_xx1 + background_width/2;
background_center_y = background_yy1 + background_height/2;
}
//lastly, set the bar_button min and max travel amounts
bar_button_min_travel_xy[of_x] = decrease_button_xx2 + bar_button_width/2;
bar_button_max_travel_xy[of_x] = increase_button_xx1 - bar_button_width/2;
bar_button_min_travel_xy[of_y] = decrease_button_yy2 + bar_button_height/2;
bar_button_max_travel_xy[of_y] = increase_button_yy1 - bar_button_height/2;
show_debug_message("basic_Scrollbar_componets " + string(483));
#endregion
#endregion
#region BUTTONS
decrease_button = noone;
increase_button = noone;
bar_button = noone;
background_plane = noone;
decrease_button = new basic_Command_Button_componets(_id); //COULD CALLING A CONSTRUCTOR WITHIN A CONSTRUCTOR BE CAUSING THE ERROR?
increase_button = new basic_Command_Button_componets(_id);
bar_button = new basic_Command_Button_componets(_id);
background = new basic_Command_Button_componets(_id);
#region BUTTON COLORS
//Font colors and dropshadow colors
decrease_button_caption_font_color1 = is_int64(_id.Decrease_Button_Caption_Font_Color1) ? _id.Decrease_Button_Caption_Font_Color1 : fore_color;
decrease_button_caption_font_color_drop_shadow1 = is_int64(_id.Decrease_Button_Caption_Font_Color_Drop_Shadow1) ? _id.Decrease_Button_Caption_Font_Color_Drop_Shadow1 : fore_color_drop_shadow;
increase_button_caption_font_color1 = is_int64(_id.Increase_Button_Caption_Font_Color1) ? _id.Increase_Button_Caption_Font_Color1 : fore_color;
increase_button_caption_font_color_drop_shadow1 = is_int64(_id.Increase_Button_Caption_Font_Color_Drop_Shadow1) ? _id.Increase_Button_Caption_Font_Color_Drop_Shadow1 : fore_color_drop_shadow;
bar_button_caption_font_color1 = is_int64(_id.Bar_Button_Caption_Font_Color1) ? _id.Bar_Button_Caption_Font_Color1 : fore_color;
bar_button_caption_font_color_drop_shadow1 = is_int64(_id.Bar_Button_Caption_Font_Color_Drop_Shadow1) ? _id.Bar_Button_Caption_Font_Color_Drop_Shadow1 : fore_color_drop_shadow;
background_caption_font_color1 = is_int64(_id.Background_Caption_Font_Color1) ? _id.Background_Caption_Font_Color1 : fore_color;
background_caption_font_color_drop_shadow1 = is_int64(_id.Background_Caption_Font_Color_Drop_Shadow1) ? _id.Background_Caption_Font_Color_Drop_Shadow1 : fore_color_drop_shadow;
decrease_button_caption_font_color2 = is_int64(_id.Decrease_Button_Caption_Font_Color2) ? _id.Decrease_Button_Caption_Font_Color2 : fore_color;
decrease_button_caption_font_color_drop_shadow2 = is_int64(_id.Decrease_Button_Caption_Font_Color_Drop_Shadow2) ? _id.Decrease_Button_Caption_Font_Color_Drop_Shadow2 : fore_color_drop_shadow;
increase_button_caption_font_color2 = is_int64(_id.Increase_Button_Caption_Font_Color2) ? _id.Increase_Button_Caption_Font_Color2 : fore_color;
increase_button_caption_font_color_drop_shadow2 = is_int64(_id.Increase_Button_Caption_Font_Color_Drop_Shadow2) ? _id.Increase_Button_Caption_Font_Color_Drop_Shadow2 : fore_color_drop_shadow;
bar_button_caption_font_color2 = is_int64(_id.Bar_Button_Caption_Font_Color2) ? _id.Bar_Button_Caption_Font_Color2 : fore_color;
bar_button_caption_font_color_drop_shadow2 = is_int64(_id.Bar_Button_Caption_Font_Color_Drop_Shadow2) ? _id.Bar_Button_Caption_Font_Color_Drop_Shadow2 : fore_color_drop_shadow;
background_caption_font_color2 = is_int64(_id.Background_Caption_Font_Color2) ? _id.Background_Caption_Font_Color2 : fore_color;
background_caption_font_color_drop_shadow2 = is_int64(_id.Background_Caption_Font_Color_Drop_Shadow2) ? _id.Background_Caption_Font_Color_Drop_Shadow2 : fore_color_drop_shadow;
decrease_button_caption_font_color3 = is_int64(_id.Decrease_Button_Caption_Font_Color3) ? _id.Decrease_Button_Caption_Font_Color3 : fore_color;
decrease_button_caption_font_color_drop_shadow3 = is_int64(_id.Decrease_Button_Caption_Font_Color_Drop_Shadow3) ? _id.Decrease_Button_Caption_Font_Color_Drop_Shadow3 : fore_color_drop_shadow;
increase_button_caption_font_color3 = is_int64(_id.Increase_Button_Caption_Font_Color3) ? _id.Increase_Button_Caption_Font_Color3 : fore_color;
increase_button_caption_font_color_drop_shadow3 = is_int64(_id.Increase_Button_Caption_Font_Color_Drop_Shadow3) ? _id.Increase_Button_Caption_Font_Color_Drop_Shadow3 : fore_color_drop_shadow;
bar_button_caption_font_color3 = is_int64(_id.Bar_Button_Caption_Font_Color3) ? _id.Bar_Button_Caption_Font_Color3 : fore_color;
bar_button_caption_font_color_drop_shadow3 = is_int64(_id.Bar_Button_Caption_Font_Color_Drop_Shadow3) ? _id.Bar_Button_Caption_Font_Color_Drop_Shadow3 : fore_color_drop_shadow;
background_caption_font_color3 = is_int64(_id.Background_Caption_Font_Color3) ? _id.Background_Caption_Font_Color3 : fore_color;
background_caption_font_color_drop_shadow3 = is_int64(_id.Background_Caption_Font_Color_Drop_Shadow3) ? _id.Background_Caption_Font_Color_Drop_Shadow3 : fore_color_drop_shadow;
decrease_button_caption_font_color4 = is_int64(_id.Decrease_Button_Caption_Font_Color4) ? _id.Decrease_Button_Caption_Font_Color4 : fore_color;
decrease_button_caption_font_color_drop_shadow4 = is_int64(_id.Decrease_Button_Caption_Font_Color_Drop_Shadow4) ? _id.Decrease_Button_Caption_Font_Color_Drop_Shadow4 : fore_color_drop_shadow;
increase_button_caption_font_color4 = is_int64(_id.Increase_Button_Caption_Font_Color4) ? _id.Increase_Button_Caption_Font_Color4 : fore_color;
increase_button_caption_font_color_drop_shadow4 = is_int64(_id.Increase_Button_Caption_Font_Color_Drop_Shadow4) ? _id.Increase_Button_Caption_Font_Color_Drop_Shadow4 : fore_color_drop_shadow;
bar_button_caption_font_color4 = is_int64(_id.Bar_Button_Caption_Font_Color4) ? _id.Bar_Button_Caption_Font_Color4 : fore_color;
bar_button_caption_font_color_drop_shadow4 = is_int64(_id.Bar_Button_Caption_Font_Color_Drop_Shadow4) ? _id.Bar_Button_Caption_Font_Color_Drop_Shadow4 : fore_color_drop_shadow;
background_caption_font_color4 = is_int64(_id.Background_Caption_Font_Color4) ? _id.Background_Caption_Font_Color4 : fore_color;
background_caption_font_color_drop_shadow4 = is_int64(_id.Background_Caption_Font_Color_Drop_Shadow4) ? _id.Background_Caption_Font_Color_Drop_Shadow4 : fore_color_drop_shadow;
//Vertex Colors
//Back colors
decrease_button_back_color = is_int64(_id.Decrease_Button_Back_Color) ? _id.Decrease_Button_Back_Color : back_color;
increase_button_back_color = is_int64(_id.Increase_Button_Back_Color) ? _id.Increase_Button_Back_Color : back_color;
bar_button_back_color = is_int64(_id.Bar_Button_Back_Color) ? _id.Bar_Button_Back_Color : back_color;
background_back_color = is_int64(_id.Background_Back_Color) ? _id.Background_Back_Color : back_color;
//Arrow colors
decrease_button_arrow_color = is_int64(_id.Decrease_Button_Arrow_Color) ? _id.Decrease_Button_Arrow_Color : fore_color;
increase_button_arrow_color = is_int64(_id.Increase_Button_Arrow_Color) ? _id.Increase_Button_Arrow_Color : fore_color;
//Options
//Bar Button
bar_button_blink_color1 = is_int64(_id.Bar_Button_Blink_Color1) ? _id.Bar_Button_Blink_Color1 : c_black;
bar_button_blink_color2 = is_int64(_id.Bar_Button_Blink_Color2) ? _id.Bar_Button_Blink_Color2 : c_black;
bar_button_blink_color3 = is_int64(_id.Bar_Button_Blink_Color3) ? _id.Bar_Button_Blink_Color3 : c_black;
bar_button_blink_color4 = is_int64(_id.Bar_Button_Blink_Color4) ? _id.Bar_Button_Blink_Color4 : c_black;
//Background
background_large_change_decrease_color1 = is_int64(_id.Background_Large_Change_Decrease_Color1) ? _id.Background_Large_Change_Decrease_Color1 : c_black;
background_large_change_decrease_color2 = is_int64(_id.Background_Large_Change_Decrease_Color2) ? _id.Background_Large_Change_Decrease_Color2 : c_black;
background_large_change_decrease_color3 = is_int64(_id.Background_Large_Change_Decrease_Color3) ? _id.Background_Large_Change_Decrease_Color3 : c_black;
background_large_change_decrease_color4 = is_int64(_id.Background_Large_Change_Decrease_Color4) ? _id.Background_Large_Change_Decrease_Color4 : c_black;
background_large_change_increase_color1 = is_int64(_id.Background_Large_Change_Increase_Color1) ? _id.Background_Large_Change_Increase_Color1 : c_black;
background_large_change_increase_color2 = is_int64(_id.Background_Large_Change_Increase_Color2) ? _id.Background_Large_Change_Increase_Color2 : c_black;
background_large_change_increase_color3 = is_int64(_id.Background_Large_Change_Increase_Color3) ? _id.Background_Large_Change_Increase_Color3 : c_black;
background_large_change_increase_color4 = is_int64(_id.Background_Large_Change_Increase_Color4) ? _id.Background_Large_Change_Increase_Color4 : c_black;
//Darken the background by a certain percentage
background_color_darken_amount = is_real(_id.Background_Color_Darken_Amount) ? _id.Background_Color_Darken_Amount : SKEUOMORPHIC_BUTTON_SHADED_AREA_COLOR_MERGE_PERCENTAGE;
show_debug_message("basic_Scrollbar_componets " + string(563));
#endregion
#region VERTEX AND PRIMS
//Vertex buffers
//Create vertex buffers for componets of scrollbar
//v_format = -1;
arr_v_buffers = array_create(ENUM_ScrollBar_Constituents.length,noone);
decrease_button_primitive_render_type = !is_undefined(_id.Decrease_Button_Primitive_Render_Type) ? _id.Decrease_Button_Primitive_Render_Type : control_primitivle_render_type;
increase_button_primitive_render_type = !is_undefined(_id.Increase_Button_Primitive_Render_Type) ? _id.Increase_Button_Primitive_Render_Type : control_primitivle_render_type;
bar_button_primitive_render_type = !is_undefined(_id.Bar_Button_Primitive_Render_Type) ? _id.Bar_Button_Primitive_Render_Type : control_primitivle_render_type;
background_primitive_render_type = !is_undefined(_id.Background_Primitive_Render_Type) ? _id.Background_Primitive_Render_Type : control_primitivle_render_type;
#endregion
#endregion
show_debug_message("basic_Scrollbar_componets " + string(579));
}