View Issue Details

IDProjectCategoryView StatusLast Update
0004949Multi Theft Auto : San AndreasClientpublic2010-11-19 21:45
Reporterx86Assigned ToTalidan 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Target Version1.1Fixed in Version1.1 
Summary0004949: Add GUI dropdown widgets
Description

The current release lacks any support for any dropdown widgets. Adding dropdown widgets to the GUI subsystem and exposing the appropriate scripting functions would be nice for a number of reasons (e.g. easy selection of various options in the interface).

Additional Information

Example widget: http://www.google.com/help/hc/images/news_4104_en.gif

TagsNo tags attached.

Relationships

child of 0003344 closed New Feature Requests Requested features tracker 

Activities

robhol

2009-09-06 00:27

reporter   ~~0010422

Seconded. Although it's possible to make a similar object with a gridlist, support for "real" dropdowns/comboboxes would be much simpler and neater...

subenji99

2009-09-06 21:32

viewer   ~~0010427

I don't understand why we don't already have them, seeing as they are already provided in CEGUI.

Xalphox

2009-09-06 21:33

viewer   ~~0010428

agreed son

x86

2009-09-12 20:01

administrator   ~~0010476

What I mean:
http://www.google.com/help/hc/images/news_4104_en.gif

jyrno42

2010-04-03 01:09

viewer   ~~0011323

Last edited: 2010-04-03 01:09

Added the following functions:
gui-element guiCreateComboBox( float x, float y, float width, float
height, string caption, bool relative [, gui-element parent ] );
bool guiComboBoxAddItem( gui-element comboBox, string value );
nil/string guiComboBoxGetSelected( gui-element comboBox );

Signed-off-by: Jyrno42 <jyrno42@gmail.com>

http://www.everfall.com/paste/id.php?vi7nwucxyi10

http://github.com/Jyrno42/multitheftauto/commit/afaac54d586c7a81e6116a262a4e6217665c7801

Maccer

2010-04-03 05:01

viewer   ~~0011324

That's kick ass, Jyrno42. Good job.

Now only if we could implement a right click dropdown box, also supported by the gui.

jyrno42

2010-04-03 16:52

viewer   ~~0011326

Last edited: 2010-04-03 17:26

A new patch for #4949.

As recommended by lil_Toady, I made comboboxes kinda like gridlists. The
functions are now like this:

gui-element guiCreateComboBox( float x, float y, float width, float
height, string caption, bool relative [, gui-element parent ] );

int guiComboBoxAddItem( gui-element comboBox, string value );

bool/string guiComboBoxGetItemText( gui-element comboBox, int itemId );
bool guiComboBoxSetItemText( gui-element comboBox, int itemId, string
value );
bool guiComboBoxRemoveItem( gui-element comboBox, int itemId );

nil/int guiComboBoxGetSelected( gui-element comboBox );
bool guiComboBoxSetSelected( gui-element comboBox, int itemId );

PS: Someone should hook events cause I can't grasp the thing's needed for
getting them to work.

Signed-off-by: Jyrno42 <jyrno42@gmail.com>

http://github.com/Jyrno42/multitheftauto/commit/a147b217b161178823b8bef6a3dbaede8e4f588c

R3mp

2010-04-03 17:10

viewer   ~~0011327

Sounds great, might also be nice to have a guiComboBoxGetItems (or guiComboBoxGetRowCount)

Talidan

2010-07-09 04:10

administrator   ~~0011714

Modified jyrno42's polished patch, it's now up to scratch after some tweaks.

Issue History

Date Modified Username Field Change