Titan Logo

 Menu

 Developer

TitanConfig.lua


TitanConfig.lua
This file contains routines used by Titan to show and process the Titan options.
Titan uses Ace libraries to place the Titan options within the Blizzard option screens.

Most routines in this file are local because they create the Titan options.
These routines are called first when Titan processes the 'player entering world' event.
If an options list (skins, extra, etc) is changed by the user then the Ace table needs to be updated and Blizz informed to 'redraw'.


TitanAdjustPanelScale
Set the Titan bars and plugins to the selected scale then adjust other frames as needed.

Inputs
scale - the scale the user has selected for Titan

Outputs
None


TitanPanel_TicketReload
When the user changes the option to adjust for the Blizz ticket frame the UI must be reloaded. Ask the user if they want to do it now.

Inputs
None

Outputs
None


optionsControl
Local table to hold the 'about' Titan info in the options.


optionsTrans
Local table to hold the Titan transparency options. Each bar and the tooltip can be set to a different transparancy setting.
This is the starting shell
- the option description
- add the tooltip transparency (at the bottom of the options screen)
- the code for each bar will be added via another routine.


TitanPanel_TransOptions
This will add each Titan bar to the transparency option table so it can be adjusted by the user. Each bar is shown whether ot not the user has them displayed.

Inputs
args - the table holding the Titan option data

Outputs
None


TitanPanel_SetCustomTexture
Update the skin when the user changes it.

Inputs
path - the file path to the skin

Outputs
None


TitanPanel_AddNewSkin
Add each skin to the options list. If the user had added custom skins these will be shown as well.

Inputs
skinname - the file name to use
skinpath - the file path to use

Outputs
None

Notes
- Blizz *does not allow* LUA to access the user file system dynamically so the skins have to be input by hand. Titan can not search for available skins in the Artwork folder.
- On the flip side a user can add a custom skin to the Titan saved variables then later delete the skin from the file system. This will not cause an error when the user tries to use (show) that skin but Titan will show a 'blank' skin.


optionsSkins
Local table to hold the Titan skins options. Shows default Titan and any custom skins the user has added.


optionsSkinsCustom
Local table to hold the Titan custom skins options that allow a user to add or delete skins.
- You may not remove the currently used skin
- or the default one
- or a Titan default skin (it would only come back...)


optionsUIScale
Local table to hold the Titan options that allow a user to adjust:
- UI scale
- Titan scale for bars
- Spacing between Titan plugins (right side)
- Spacing between Titan icons (left side)
- Titan tooltip font scale (bar and plugins)
- Toggle the tooltip font scale (allow Titan or Blizz to control)
- Set Titan font (bar and plugins)
- Set Titan font size
- Set Titan bar strata (tells Blizz which frames could go over Titan bar (and plugins)


optionsBars
Bar control for the main (top) bars:
Each bar:
- Show
- Auto hide
- Center text (plugins)
Main (top) controls:
- Disable screen adjust - allows character frame and minimap to be 'over' the Titan bars
- Disable minimap adjust - allows the minimap to be 'over' the Titan bars
- Ticket frame adjust - adjusts the Blizz open ticket frame to be under the Titan bar(s)


optionsAuxBars
Bar control for the aux (bottom) bars:
Each bar:
- Show
- Auto hide
- Center text (plugins)
Main (top) controls:
- Disable screen adjust - allows action button bar to be 'over' the Titan bars
- Log adjust - move the chat frame to be 'above' the Titan bars
- Bag adjust - move the bag frames to be 'above' the Titan bars


optionsFrames
Show the general Titan options that hte user can change:
Tooltips:
- Hide in combat
- Show (or not)
Frames (bars):
- Lock buttons (plugins) - do not allow plugins to be moved via drag & drop. Shift left / right is still allowwed.
- Show plugin versions - show the version in the tooltips
Actions:
- Force LDB laucnhers to right side - This will move all converted LDB plugins of type launcher to the right side of the Titan bar.
- Refresh plugins - This can be used when a plugin has not updated its text. It may allow a plugin to show if it is not visible but the user has selected show.
- Reset Titan to default - used when the user wants to reset Titan options to a fresh install state. No plugins are removed by this.


optionsAddonAttempts
This is the table shell. The plugin info will be added by another routine.


TitanUpdateAddonAttempts
Show the each plugin that attempted to register with Titan. This can be used by plugin developers as the create / update plugins (Titan or LDB). It can also be used by user to attempt to figure out why a plugin is not shown or to report an issue to Titan.

Inputs
None

Outputs
None

Notes
- This is called after the plugins are registered in the 'player entering world' event. It can be called again as plugins registered.
- Any plugins that attempted to register (no child frames though) are shown. See the Titan Utils section for more details on plugin registration.
- This option page is for display only. The user can take not action.


optionsExtras
This is the table shell. The plugin info will be added by another routine.


TitanUpdateAddonAttempts
Show plugins that are not registered (loaded) but have config data. The data can be deleted by the user.

Inputs
None

Outputs
None

Notes
- As users change the plugins they use the old ones still have saved variable data stored by Titan.
- The old plugin data can be removed by the user when they will not longer use that plugin.
- This routine is called to 'redraw' the list as a user deletes data.
- A message is sent to chat that the plugin data has been deleted.


optionsChars
This is the table shell. The toon info will be added by another routine.


TitanUpdateChars
Allow the user to delete toon data (just not the one they are logged into).

Inputs
None

Outputs
None

Notes
- Users can delete toons but the saved variable data is still stored by Titan.
- The old toon data can be removed by the user.
- This routine is called to 'redraw' the list as a user deletes toon data.
- A message is sent to chat that the plugin data has been deleted.


optionsAddons
This is the table shell. The plugin controls will be added by another routine.


TitanUpdateConfigAddons
Allow the user to control each plugin registered to Titan.
Controls honored from the plugin .registry:
- Show
- Show label text
- Right side
- Show icon
- Show text
Position:
- Shift left one plugin position on the bar
- Shift right one plugin position on the bar
- The shift is on the same bar
- The shift will not move a plugin from one side to the other
Bar:
- Drop down so the user can pick the bar the plugin is to be shown on.
- The list contains only the bars the user has selected to be shown.
- The user can not move a plugin to a hidden bar to 'hide' it. The user should ensure "Show Plugin" is unchecked.

Inputs
None

Outputs
None


optionsAdvanced
Set the table to allow the user to control advanced features.
Controls:
- Entering world timer - some users need Titan to wait longer whenever the splash / loading screen is shown before adjusting frames and (re)setting data.
- Vehicle timer - some users need Titan to wait longer whenever entering or leaving a vehicle before adjusting frames.


optionsDebugArray
Show the 'print' strings fir debug purposes,


TitanUpdateConfig
This routine will handle the requests to update the various data items in Titan options screens.

Inputs
None

Outputs
None

Notes
- This is called after the plugins are registered in the 'player entering world' event. It can be called again as more plugins are registered.