Thread: GUI's
View Single Post
06-03-05, 12:36 PM   #52
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
Just a sneak peek at part of what I am working on:



I moved all of the default micro menu buttons to the bar at the top, and mde a minimap toggle button with the minimap docked to the bar in a way that makes it look integrated to the bar. I know this looks like Titan Panel, which is true only in appearance, as all base coding is original, not to mention this is NOT meant to use plugins. In fact, if anything, I designed this bar to be a companion to Titan panel, as you can effectively have both on screen at the same time, with Titan panel docked to the bottom.

I have done tons of experimentation with code standards, playing with different methods of writing my lua scripts, in order to see which works the best / fastest. For the sake of standard compliance and making sure my mod never uses the same namespace for a function or widget that another mod uses, I have started putting ALL my functions and such into tables. Basically if I have a mod called myMod, I create a table called myMod, and all functions that go into that mod are children of that table. For example myMod.onUpdate(); could be a valid function. It also makes it easier to add new functions into that table within other lua scripts, sot aht other mods could effectively "plug in" to my mod. It also makes it MUCH less likely that my mod will conflict with other mods because of a shared namespace.

The other thing I have started experimenting with is disabling default functions that no longer serve a purpose. For instance, if you decided to hide something in the ui permanently (as long as the mod is installed anyway), then that ui element no longer really needs to exist. yet there are all these functions in the background that may or may not be firing, and as a result are taking up engine and memory space. So why not rehook them to a blank function? Less memory used = faster gameplay in my opinion. If the widget you disable is the only thing using that function, then there is no reason on earth the widget needs to exist at all. SO FAR this has worked like a charm for me, but as I do further testing I will know for sure. Obviously some functions may be best to leave alone, as they may be in use elsewhere...

Hopefully this gave people ideas. My eventual goal is to almost completely redesign the look and feel of the ui, rather than just add little things here and there.
  Reply With Quote