Member Controls

Developers > Strings plugin
pljonesLink to postposted: Sun Apr 10, 2005 9:51 am

Member since:
 2005-04-02
Posts:
 616
"quaxi" wrote:
He could totally write a new String Plugin.


Okay, I've had a look through the wrapper end of the code and I'm about to start looking at the UI part.

What needs to change?


I've done a patch with some changes to the wrapper code (and the knock-on effects). It's fairly basic stuff, just tidying up and doesn't address the UI at all.
File attachment (49K so I'm not pasting it here!)
quaxiLink to postposted: Sun Apr 10, 2005 1:39 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
I don't know what needs to be changed!

Inge said she wanted some changes there.
pljonesLink to postposted: Sat Apr 16, 2005 3:06 pm

Member since:
 2005-04-02
Posts:
 616
Okay, I've split out my changes into two patches:

File attachment (35K) - please apply to CVS.
This applies some updates to StrItem and other language-string handling. Unfortunately, it applies across the whole source tree as StrItem is used in many places and I've changed the constructor and removed a couple of methods I felt might introduce more problems than they solved. I'd suggest reviewing the changes but they're all fairly "obvious". I didn't appear to have broken anything when I tested it.

(Note that this also incorporates the latest BHAV changes but leaves them disabled. Comment out "#define QUAXI" to enable. They work now.)

File attachment (52K)
This is my first stab at UI code in C#... and it sucks... and isn't functional yet. It doesn't touch any existing code in CVS (so it doesn't replace the existing STR# UI). I'll keep that change out of CVS for now..! :)

(These are against the latest CVS. I just re-sync'd.)
quaxiLink to postposted: Sun Apr 17, 2005 2:22 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Those are quality changes :D

I am commiting them to the repository right now. The only thing i had to change was to add back the ToString Method to the StrItem class, otherwise the current Str-UI would just list the class Name, instead of real content.
pljonesLink to postposted: Sun Apr 17, 2005 4:56 pm

Member since:
 2005-04-02
Posts:
 616
Thanks!
"quaxi" wrote:
The only thing i had to change was to add back the ToString Method to the StrItem class, otherwise the current Str-UI would just list the class Name, instead of real content.

Oops, yes, I forgot to test with the existing StrUI! (It compiled... ;) )

I might - just might - have a new string editor today... if not, it'll be next weekend.
pljonesLink to postposted: Sun Apr 24, 2005 12:54 am

Member since:
 2005-04-02
Posts:
 616
Okay, new UI code committed to CVS. Not enabled - comment out #define QUAXI in StrWrapper.cs to turn it on.

The (current) version uploaded is non-functional - that is, it updates nothing and none of the context menus are active (indeed, they're not even properly context-sensitive yet - they will check the content of the clipboard before enabling "Paste" and some of the menu labels will change dynamically).

I'm considering making it so an external editor can be used for editing the string data - but I'll be doing some more user walkthroughs before the design goes any further.
pljonesLink to postposted: Thu Apr 28, 2005 11:11 pm

Member since:
 2005-04-02
Posts:
 616
Whoops.

My general changes had an unwanted side-effect. Even with the re-instatement of ToString on StrItem(), the listbox containing the strings was unnumbered.

For the time-being, I've re-instated the "index" attribute on StrItem() objects but, as the index is for display purposes only, I'll be removing it when I return to hacking STR#..!

I've also committed some additional changes that need "PLJ" defined (there's a "Release PLJ" configuration where the symbol is defined for projects that use it). At the weekend, I'll finish what these changes start (basically, removing StrUI.cs, back out the (disabled) StrForm.cs and rename Elements2.cs to StrForm.cs). But "index" will still be around at that point.


viewthread, 0, 0, Strings-plugin