Hello guys,
I need sticky windows, and i heard a lot of people asking for that.
By clicking a new button on the window bar, you can stuck/unstuck each window :
-Backspace close all windows except those which are stuck
-Escape close current window, even if its stuck
So I did ;
Here are the patches for the sticky windows. (3 files, but minor modifications).
I think the only thing left todo is modifying the skins.dat and skins.png to have a nice button image ;
But i'm really not a graphist :)
What do you think about that ?
Thanks for your answers.
See ya,
Marc.
If we need to change skin.dat, I would also suggest introduction of skinned scroll bars ... So I put it here until at least a good graphic for the default skin.
Great addition.
Just a minor suggestion :) How about using "sticky" consistently in your code instead of "stuck"? Or, if you prefer, "stickied", which is usually used for sticky forums topics.
Good idea, since in our local lingo: sticky = at the top, stuck = problems ;) For example "vehicles stuck in a traffic jam"...
Hello,
Thanks for your answers.
Here is what I did today :
- modified 'stuck' to 'sticky' in code (I'm not very good in english...)
- modified skins.png and skins.dat to get the new pin icon
- modified gui_button.cc/h to get rid of hard-coded get_bild values
My new sticky button looks nice now, with a pin icon ;)
Here is the complete patch, in attachment.
Pleaz, let me know what you think about that.
Thanks.
See ya,
Marc.
I like this idea! Help texts will need updating, though.
Note : For the new button icon, we need to increment by 1 all get_bild values (using vars from gui_button.h).
For example : window_skin->get_bild(10)->get_nummer();
Modified in : window_skin->get_bild(icon_right_normal)->get_nummer();
In those files :
vehikelbauer.cc
citylist_stats_t.cc
curiositylist_stats_t.cc
fahrplan_gui.cc
factorylist_stats_t.cc
labellist_stats_t.cc
message_stats_t.cc
See ya,
Marc.
Changing button numbers in skin.dat is a nono, otherwise many paks will cease working at once. Adding to the end is the only compatible way to do.
On a further note: Please use "SVN DIFF" to avoid getting lots of single patch files.
Ok, after some heavy modification: Added to SVN