Zum Inhalt wechseln

Foto

Custom UI Information (Repost)


  • Bitte melde dich an um zu Antworten
6 Antworten in diesem Thema

#1
MokahTGS

MokahTGS
  • Members
  • 946 Beiträge

Posted 11/29/06 21:21 (GMT) by Anthony Davis

I've been going through the UI packages that people have been made, and overall they are astounding.  I just wanted to add a quick note to this process.

When making or modifying a new UI/GUI, make sure you do it at 1024x768.  This is our 'base' resolution.  All of our scaling/resizing/repositoning is done with this in mind.  Making or modifying a UI/GUI at a resolution OTHER than 1024x768 can cause some alignment and sizing issues for resolutions bigger than or smaller than 1024x768.

Thanks and keep up the good work!


Also a link to the old thread.

#2
0100010

0100010
  • Members
  • 87 Beiträge
Reposting the listbox row name info:



"Keep in mind, we didn't always name listbox rows. The listbox row names were almost never actually used in-code but rather were specified mostly as debugging aids.

The listbox manipulating script functions came along well after NWN2 had shipped, and as a result, many of the old list boxes from the original game were not implemented in a way that followed a convention compatible with the list box script functions.



That said, these seem to be the names that I was able to determine.:

characterscreen.xml ListBoxName=SKILLPANE_LIST - Name of skill (from the strref in the skills 2da)

characterscreen.xml ListBoxName=FEAT_LIST - Name of feat (from the strref in the feats 2da)

characterselection.xml ListBoxName=CharacterListBox - no names

chargen_align.xml ListBoxName=ALIGNMENT_LIST - Names of the rows are in the XML

chargen_animal.xml ListBoxName=COMPANION_LIST - Resref of the familiar

chargen_appearance.xml ListBoxName=APPEARANCE_LIST - The rows are defined in the XML

chargen_background.xml ListBoxName=BACKGROUND_LIST - Do not appear to be named

chargen_bfeats.xml ListBoxName=ADDED_FEAT_LIST - Name of the Feat (from the strref in the feats 2da)

chargen_bfeats.xml ListBoxName=AVAILABLE_FEAT_LIST - Name of the feat (from the strref in the feats 2da)

chargen_class.xml ListBoxName=class_LIST - Name of the class (from the strref in the classes 2da)

chargen_complex.xml ListBoxName=BACKGROUND_LIST - Do not appear to be named

chargen_deity.xml ListBoxName=DEITY_LIST - Do not appear to be named

chargen_domain.xml ListBoxName=ADDED_DOMAIN_LIST - Name of domain (from the strref for that domain)

chargen_domain.xml ListBoxName=AVAILABLE_DOMAIN_LIST - Name of domain (from the strref for that domain)

chargen_familiar.xml ListBoxName=FAMILIAR_LIST - Resref of the familiar

chargen_finish.xml ListBoxName=SOUNDSET_LISTBOX - Do not appear to be named

chargen_packages.xml ListBoxName=PACKAGE_LIST - Do not appear to be named

chargen_race.xml ListBoxName=RACE_LIST - RaceConstant from races 2da

levelup_ranger.xml ListBoxName=STYLE_LIST - The rows are defined in the XML

chargen_school.xml ListBoxName=SCHOOL_LIST - Do not appear to be named

chargen_skills.xml ListBoxName=SKILLPANE_LIST - Name of skill (from the strref in the skills 2da)

chargen_spells.xml ListBoxName=ADDED_SPELL_LIST - Name of spell (from the strref in the spells 2da)

chargen_spells.xml ListBoxName=AVAILABLE_SPELL_LIST - Name of spell (from the strref in the spells 2da)

chargen_subrace.xml ListBoxName=SUBRACE_LIST - SubraceConstant from 2da

cutscene.xml ListBoxName=toplistbox - Not named

cutscene.xml ListBoxName=bottomlistbox - Not named

cutscene.xml ListBoxName=replieslistbox - Not named

journal.xml ListBoxName=JournalEntryList - Do not appear to be named

module.xml ListBoxName=ModuleListBox - Do not appear to be named

partybar.xml ListBoxName=PARTY_LIST - CHAR_BOX #, where # is the index in the list

partychat.xml ListBoxName=npclistbox - Not named

partychat.xml ListBoxName=replieslistbox - Not named

quickspell.xml ListBoxName=QuickSpellListbox - Name of class (from the strref in classes 2da)

spells_memorized.xml ListBoxName=SpellList - SPELL_LEVEL_0 through SPELL_LEVEL_9

spells_known.xml ListBoxName=AVAILABLE_SPELL_LIST - KNOWN_LIST

EMPOWERED_LIST

EXTENDED_LIST

MAXIMIZED_LIST

QUICKENED_LIST

SILENT_LIST

STILL_LIST

PERSISTENT_LIST

PERMANENT_LIST

ELDRITCH_ESSENCE_LIST

ELDRITCH_SHAPE_LIST




#3
The Fred

The Fred
  • Members
  • 2.516 Beiträge
Awesome! I've been wanting to know that list box stuff for ages, I didn't know the info was even out there.

#4
The Fred

The Fred
  • Members
  • 2.516 Beiträge
I should mention these links too:

NWN2 Wiki - good, if patch, information.

Rich Taylor's Blog - some great in-depth explainations of UI things.

The Grinning Fool's UI Reference - a reference for basically all UI objects and things.

#5
Lance Botelle

Lance Botelle
  • Members
  • 1.480 Beiträge
Maybe some people will get some help from my own tutorial as well:

NWN2 XML & GUI for Beginners.

EDIT: Link updated to new Vault.

Lance

Bearbeitet von Lance Botelle, 20 April 2015 - 10:11 .


#6
0100010

0100010
  • Members
  • 87 Beiträge
Some newly discovered information about listboxes containing radio buttons.

If you want to edit or create a UI listbox, and you give it a protortype row continaing a single buttons whose buttontype=radio, there are some issues in extracting data from it. For an example see levelup_animalx2.xml as shown below:

[nwscript]
<UIListbox name="COMPANION_LIST" x="30" y=70 width=229 height=550 xPadding="0" yPadding="5" 
          showpartialchild="true" scrollbaronright="true" unequalcontrols="true" scrollsegmentsize="10"
          hidescrollbarwhennotneeded="true"  hideoverride=true  update="true" OnUpdate=UIListBox_OnUpdate_CreateFamiliarList("LEVELUP","ANIMAL_COMPANION","INFOPANE_TEXT") >
   
        <UIButton name="COMPANION_BUTTON" x=0 y=0 width=210 height=40 buttontype=radio groupid=1 prototype=true
            OnLeftClick0=UIObject_Misc_StoreObjectData(local:100)
            OnLeftClick1=UIObject_Misc_ExecuteServerScript("gui_elu_selectcompanion",local:100,0) >       
[/nwscript]           
         
         
In the above, I have added the two leftclick callbacks, because I have during the OnAdd for this scenes manipulated the listbox rows via the scriptfunction ModifyListBoxRow in order to set some unique variables on it so that I would know which row was selected by the user. The normal means of getting at this data is via

OnLeftClick0=UIObject_Misc_ExtractData("selected:listboxname","string",0,local:100)

Well it turns out, that for radio buttons the above ExtraData function does not work and will return no values for any data type (int, string, float, etc)  Nor will the other  lookup variables work (listboxtext:listboxname.textfieldname, or listboxrow:listboxname)

However the one function that does work is the one I have in the code above:

UIObject_Misc_StoreObjectData

For this, the only variable value you can retrieve is what was stored at index 0 as a string.  So if you need multiple values, you'll have to either only store a reference , which on your execute cvallback you can use to look up a larger set of values, or embeed all the values ito the string varable value via a concatenated string that you must parse.

I discovered this little quick while figuring out how to manipulate the levelup screens for animal companions and familiars in order to expand and filter the choices lists and provide support for feats like Improved Familiar and so on.

Bearbeitet von 0100010, 26 Dezember 2010 - 02:35 .


#7
The Fred

The Fred
  • Members
  • 2.516 Beiträge
From my own experiments, it appears that the names for the levelup screen list boxes are the same as the character creation ones. I haven't tested them all, but it would make sense (not that what makes sense has ever been true of NWN before...).