Game Development Community

dev|Pro Game Development Curriculum

GuiModernTextListCtrl - Columns, bitmaps, & colors!

by Nathan Martin · 08/22/2011 (7:13 am) · 21 comments

Introduction

For about nine years now I have always wanted to have the text list control that was used in Tribes 2's server browser and game lobby, that was used for listing servers and players respectively, in the Torque game engine so I could use in it my own game server browser and other dialogs, but it was one of many controls that were removed from V12(original name of Torque Game Engine) to make Sierra happy. That control was called ShellFancyTextList and it sure was fancy at the time as it had textured bitmap column headers, bitmap icons could be drawn within text cells, column sorting, and this one feature called virtual scroll where you could set as to which column would start to become apart of a horizontal scroll container that was used in the server browser making it where the servers' name was always visible no matter how far you horizontally scrolled the list.

So, after nearly nine years later of wanting that control in TGE back in 2002 I had decided to make it a personal challenge to recreate that very control the best I could and now a month later, using only my spare free time I had available after work hours and some weekends, I have done it. I call it the GuiModernTextListCtrl as it is modern compared to today's standards as a huge upgrade from the GuiTextListCtrl that is currently in Torque now. It pretty much has all the features that Tribes 2's ShellFancyTextList had and more, except for the virtual horizontal column container fancy feature as that will have to be a separate challenge all in its own, possibly later on.


Screenshots

dottools.net/downloads/imgs/t3d/modernTextListCtrl_ss2b.pngdottools.net/downloads/imgs/t3d/modernTextListCtrl_ss3.png

Requirements

This control was specifically developed for and tested on Torque 3D 1.1 Final, no promises it'll compile and run on any other Torque engine. But patches to make it work on other Torque engines are welcome.


Documentation and Download

Right now the only documentation available for this control is on my personal wiki at:
dottools.net/doku.php/programming/tge/controls/guimoderntextlistctrl
Changelog and known bugs can be found on the project's Status page.

Source Code: v1.01 GuiModernTextListCtrl101.zip (404KByte zip)
Also comes with instructions and an example GUI dialog that semi-simulates a game server browser as seen in the screenshots above.


Final Notes

This control might have bugs or could be flawless, but I won't know until this control has been downloaded and used out there by you fellow Torque users and you guys post comments about the results you're getting. As such I'll continue to be maintaining this control until I'm completely satisfied with it and no bugs prop up anywhere. The documentation on my personal wiki is a work in progress and I'll continue to be working on it as my free time allows.


Change Log

2011-09-19 - v1.01

  • Added workaround to resolve error C2668: 'std::swap' : ambiguous call to overloaded function for Visual Studio 2010.
  • Fixed Bitmaps (<bitmap> tag) not being drawn vertically centered in the row column contents.
  • Fixed draw clip rectangle bug in parent control GuiArrayCtrl.
  • Fixed row selection highlight color as expected for rows in an inactive state.
  • Fixed usage of mMarkup (internal useMarkup reference) in the GuiModernSort column sort manager's comparator operator.
  • Fixed addRow method not validating and returning the correct inserted row position.
  • Added a new argument field flags to the addRow method for textual flags support.
  • Added a new getColumnFlags method to retrieve a column's textual flags state.
  • Added a new setRowFlags method to set a row's textual flags.
  • Added a new getRowFlags method to retrieve a row's textual flags state.
  • Updated the GameBrowserGui.gui example script to make use of the new row textual flag features and improved column sorting for user accessibility.


As always, Enjoy! :)

About the author

By day I work as an embedded microcontroller programmer for mainly Blackfin MCU/DSPs, and by night, and free time too, I'm a hobbyist game developer.

Page «Previous 1 2
#1
08/22/2011 (7:20 am)
I'm aware this article ended up in Blogs instead of Resources even though I clicked on Add a Resource in the More dropdown menu, but apparently it's bugged right now.
#2
08/22/2011 (8:33 am)
Thanks man - I'll give it a go and see how it works for me.
#3
08/22/2011 (11:55 am)
Just excellent.

I will have a look at it in the coming weeks. Try to work with GG to get it in std build!

#4
08/22/2011 (12:01 pm)
Cool thingy! Thanks for sharing!
#5
08/22/2011 (3:18 pm)
This looks useful, thanks!
#6
08/22/2011 (4:36 pm)
Man! You Just made my day! I had my old TGE table control and was really lazy to try and upgrade it to T3D...

Just one question? Does it support mouse over events? Else I just can implement them myself later and update your resource!

Luck!
Guimo
#7
08/22/2011 (5:02 pm)
Guimo: It does for row highlight and select, and for columns highlight, select, and depress visual response. But it doesn't generate any callbacks for those events other than what are documented in the control page on my personal wiki as linked in the article.
#8
08/22/2011 (7:50 pm)
Nathan, I love you.
#9
08/26/2011 (12:39 pm)
Thanks for sharing, Nathan!
#10
08/26/2011 (12:42 pm)
This is one of the slickest GUI resources I have seen in a long time. Nicely done. Also, you get over 9,000 bonus points for including documentation.
#12
08/26/2011 (5:56 pm)
Loving it. :)
Now to figure out how to get a master server working lol

Thank you very much.
#13
08/26/2011 (6:36 pm)
Dude - it's over NINE THOUSAND!!! Sorry.
#14
09/02/2011 (4:21 pm)
Love this thing!
#15
09/13/2011 (8:12 pm)
Hot damn, that looks good.
#16
09/19/2011 (2:18 pm)
I have updated this resource for the new v1.01 release of GuiModernTextListCtrl. This release importantly has fixed the compiler error on Visual Studio 2010.
#17
09/29/2011 (2:10 am)
can i request for gantt chart cotroller?
#18
03/11/2012 (6:03 am)
This works great with T3D 1.2. Thank you very much!
#19
12/06/2012 (4:08 pm)
How to add some other gui controls(such as button control,text edit control) in the grid of GuiModernTextListControl?anyone can give some suggestion?
#20
11/27/2018 (8:39 pm)
Found this control last night. Just what I needed and is working great! I'm using it in Torque3D 3.10.1. The code patch you mention in the notes was applied to the mainline Torque source at some point.
Page «Previous 1 2