News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

passenger and mail classes

Started by Ves, August 24, 2017, 12:02:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ves

Well, he just said that it would be better to allocate and remove instead of booking so much memory. However, I think I found out how to delete them again creating this:
vehicle_class_manager_t::~vehicle_class_manager_t()
{
for (int i = 0; i < pass_class_sel.get_count(); i++)
{
if (pass_class_sel.at(i))
{
delete pass_class_sel.at(i);
}
}
for (int i = 0; i < mail_class_sel.get_count(); i++)
{
if (mail_class_sel.at(i))
{
delete mail_class_sel.at(i);
}
}
}

and then in a for loop delete all comboboxes which was created.
I think it works, and my experiments with breakpoints suggests that this piece of code is accesed whenever the window is closed.

New version on the github branch together with some other small fixes!

jamespetts

Splendid, thank you for that; now incorporated. May I ask whether base-texts-classes_gui_2.dat is ready to upload yet?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

Well, I cant think of any more translations just yet.  :P
I whish however that there was a simpler way of doing it with those files, so one dont have to create new files for just some words, clogging up the folder.
Is there not any other way it could be done, so one could just only be updating one single file?

jamespetts

I am not aware of any other way of doing it: the files need to be compatible with the Simutranslator interface, and that is run by Frank, rather than by me. I will upload the new file now. Incidentally, have you done any Swedish translation on these new texts?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

I have not done any swedish translations of several reasons, the biggest reason being that it is a gigantic work to begin with. Secondly, as the game developes, there will allways come new texts to translate so I would never feel finish with it, and lastly I have not gotten around to setup an account on simutranslator. Also, the paksweden has alot of translation to be done, both english and swedish and I think I would rather have it all in one go.
When I play, I play in the english language.

jamespetts

That seems reasonable - I was asking in case I needed to import any texts. I imagine that there are higher priority tasks.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

Thanks for asking, and you are right, other tasks, like painting the actual stuf, has a higher priority  :P

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.