Suggestions (not the SOAD song)

Started by Paper Carnival, Fri 07/11/2003 19:25:18

Previous topic - Next topic

Paper Carnival

Hey guys, it's been a while I last posted here, but that's because I've been busy with school. Here are all the suggestions I can think of right now:

a) "Absolute" GUI visibility; Kinda like Popup Modal, only now clicks on other GUIs will not be detected if an absolute gui is on

b) More gui properties, like x and y for everything, center alignment for textboxes etc

c) GetLocationProperty(int x, int y): Kinda like GetCharacter/Item/Hotspot/ObjectProperty, only it gets the property of the location. I can go around it, but it will certainly reduce the code by 50 lines of code the minimum

d) Different properties for characters/objects/items/rooms/hotspots. There should be a global properties editor (for properties working for everything) but also a specific type's property editor. For example, I want the property "male" to be in characters only, or I want to have different default properties for characters.

e)Function GetMouseCursor()

f)Function SetGUIClickable(int GUI, int clickable);

g)Function SetFontSize(int font, int size);

[EDIT:]
Here are more suggestions I wanted to post yesterday but I couldn't afford the time:

h)Function StrDelCharAt(string, int position);

i)Function StrPixLen(int font, string); Kinda like StrLen but returns the width in pixels

j)Function IsSpriteLoaded(int spriteslot);

k)3d support.......(just kidding ;))

l)maybe more but I've forgotten them now. I'll post them as soon as I remember them.

Pumaman

#1
Quote from: Guybrush Peepwood on Fri 07/11/2003 19:25:18
a) "Absolute" GUI visibility; Kinda like Popup Modal, only now clicks on other GUIs will not be detected if an absolute gui is on

Seems reasonable to me, I'll add it to my list.

Quoteb) More gui properties, like x and y for everything, center alignment for textboxes etc

Centre alignment for textboxes would be rather problematic; however, X & Y settings for the GUI controls is something that has been requested before and I will try to get added.

Quotec) GetLocationProperty(int x, int y): Kinda like GetCharacter/Item/Hotspot/ObjectProperty, only it gets the property of the location. I can go around it, but it will certainly reduce the code by 50 lines of code the minimum

As you note, you can write this yourself as a script function using the GetCharacterAt and so forth commands, so it's a low priority addition.

Quoted) Different properties for characters/objects/ items/rooms/hotspots. There should be a global properties editor (for properties working for everything) but also a specific type's property editor. For example, I want the property "male" to be in characters only, or I want to have different default properties for characters.

Yes - the most important thing here I feel is to seperate room properties from everything else, because room properties are generally very different to hotspot/object/character properties.

Quote
e)Function GetMouseCursor()
f)Function SetGUIClickable(int GUI, int clickable);

Seems reasonable enough, I'll add them to my list.

Quoteg)Function SetFontSize(int font, int size);

Not really practical I'm afraid - SCI fonts cannot be resized, and TTF fonts are preloaded at startup in the size requested, so I can't see this being added.

Quoteh)Function StrDelCharAt(string, int position);

You can use StrSetCharAt, passing 0, to truncate a string.

Quotei)Function StrPixLen(int font, string); Kinda like StrLen but returns the width in pixels

A possible addition can be worked around using a centred GUI label.

Quotej)Function IsSpriteLoaded(int spriteslot);

Why would you need to know this? The sprite cache manages it all for you, I can't see what this function would give you.

Thanks for your input and ideas.

RickJ

Quote
Quote:
i)Function StrPixLen(int font, string); Kinda like StrLen but returns the width in pixels

A possible addition can be worked around using a centred GUI label.

CJ, I could use this one.  When using a listbox to display a text file, it's very tricky knowing when to wrap the text to the next line.  This could be very handy if it's not too much hassle.

Pumaman

Sure thing, wouldn't be too hard to add, I'll put it on my list.

Paper Carnival

thank you again Chris! I can see some of the bugs/suggestion I said are fixed in the new beta (I'm about to download it now).

Quote
Quotej)Function IsSpriteLoaded(int spriteslot);

Why would you need to know this? The sprite cache manages it all for you, I can't see what this function would give you.

Well, I need it to know if an external sprite was loaded, so I can remove it later. Now removing a non existing sprite gives an error. So, this function wouldn't be useful if the sprites were not deleted when they were not loaded

QuoteCentre alignment for textboxes would be rather problematic
Quotei)Function StrPixLen(int font, string); Kinda like StrLen but returns the width in pixels

Ok, I understand about the first one. As for the second one, I found out that I needed it to simulate the first one and that's why I posted it here. Knowing that ScrnWidth/2-SmthngWidth/2 = center x position of something, I can use the second function to place the textbox text in the middle of the screen (as long as I don't use a border for it, otherwise it would look bad).

Quote
Quoteh)Function StrDelCharAt(string, int position);

You can use StrSetCharAt, passing 0, to truncate a string.

Well, I want to delete specific characters, but this is a low priority one anyway. You see, I don't use listboxes for my save/load dialog but I use a lot of labels instead; a more painful way but a lot more customizable (and I managed to simulate label clicks with on_event GUI_MDOWN). When somebody specifies @overhotspot@ as save description, you realize the funny results ;). I made it replace '@' characters with a ' ' (space) one but I thought it would be better if they got deleted.

Quote
Quotec) GetLocationProperty(int x, int y): Kinda like GetCharacter/Item/Hotspot/ObjectProperty, only it gets the property of the location. I can go around it, but it will certainly reduce the code by 50 lines of code the minimum

As you note, you can write this yourself as a script function using the GetCharacterAt and so forth commands, so it's a low priority addition.

Well, if you remember the trouble I had a while ago about the properties there was a huge code there which could be less if there was that function. I also use a similar code next to that one and all that is in the repeatedly_execute() function! If this GetLocationProperty function does not make a noticable speed improvement in the FPS then I don't need it. You see, most of the code in repeadedly execute function is like "if location is an item then GetInvPropertyText, if location is an object then GetObjectPropertyText etc".

QuoteThanks for your input and ideas.

No, you are the one who should be thanked

Gilbert

If an external sprite is loaded, it is the game creator's own responsibility to keep track on it.

When you create such a sprite (either by loading external graphic file or a screenshot in a savegame file), it is you who script in the line to load it, so you should be able to keep track of it, moreover, it's important to save the sprite slot number as a handle (like the overlays, it's not something static, each time you load into a sprite, it can be some number you didn't expect), so to refer to it if you want to use it or remove it.

SMF spam blocked by CleanTalk