08-13-2023, 09:25 PM
(This post was last modified: 08-13-2023, 09:26 PM by DerVVulfman.)
(08-13-2023, 03:01 AM)DerVVulfman Wrote: I do need to work upon the colors system for the scrolling listboxes as changing the contents of the lists will disable/remove any color changes made. Change the colors after??? That works. But I wish this to be automatic. But fonts, sizes, bold and Italics seems to be quite fine.
I haven't worked on the 'Title Boxes' in the windows yet, but I got the colors and fonts working perfectly now. Any time you update, remove, add to the data, the fonts and colors refresh fine.
There is still an issue when it comes to changing the data of these list. Whenever the data is changed by way of an add/delete command, it nullifies the system that adds the mouse-key controls. Typically, you add the mouse-input control commands 'after' everything else. So if I make a button that adds data to the list, I need to also include the mouse-input control commands right after.
--- At least, for now.
And I fixed up the scrollbar system by setting a minimum size for the scrollbar tab. That little doo-hickey on the side that you can move up and down to scroll the bar faster is called a 'Tab'. Well, it resizes depending on how large the list becomes. But if the list is too large, you won't be able to see it or even use it. So I set up an absolute minimum system. The tab can be no smaller than 4 pixels in height, but the game developer could set the minimum size to 16px if they wished.
FUN stuff... and that's me just messing around.
Scroll window shape and design:
- scrolling_list.width = numeric
- scrolling_list.height = numeric
- scrolling_list.border = numeric The default gives a 1px padding around the contents.
- scrolling_list.border_outline = boolean (true/false) False(default) is the classic Windows-style. Set to true, and its 1px solid black.
- scrolling_list.border_color = color_array Here, you can change the color of the 1px solid black border (if on).
Font and color:
- scrolling_list.font_name = string_name
- scrolling_list.font_size = numeric
- scrolling_list.font_bold = boolean (true/false)
- scrolling_list.font_italic = boolean (true/false)
- scrolling_list.font_color = color_array The text color
- scrolling_list.font_highlight = color_array The text color if highlighted
- scrolling_list.highlight = color_array The color of the highlight bar
- scrolling_list.background_fill = color_array[i] [/i]The background color of the list (usually white-ish)
Data Manipulation
- scrolling_list.tab_min = numeric
- scrolling_list.data = data_array
- scrolling_list.add_item(displayed_text, returned_data [, (optional) index [, (optional) enabled_flag ]])
- scrolling_list.delete_item(numeric)
- scrolling_list.disable_item(numeric)
- scrolling_list.enable_item(numeric)
- scrolling_list.clear_list
- scrolling_list.clear_selection
The data array is a list where each item is in the form of [displayed_text, returned_data. enabled_flag]. If you were to make a list of weapons from the database, you would 'think' that the displayed text would be the item's name, and the returned data could be the item's ID. the enabled flag is defaulted to 'true' as it is a boolean (true/false) value.