Stuff that needs doing

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

Re: Stuff that needs doing

Post  pygasos on Sat Jan 15, 2011 6:10 pm

Ok I will put modal inside the yaml file , but tell me which windows must be modal?
I found out what I did wrong ( and panic Very Happy ) , Well I am a noob Embarassed
I want to say that movement looks great and your decision about region base is paying off

cheers

ps: How many hours give or take have you spend in this project ( in all the years)?
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Sat Jan 15, 2011 7:42 pm

pygasos wrote:Ok I will put modal inside the yaml file , but tell me which windows must be modal?
I found out what I did wrong ( and panic Very Happy ) , Well I am a noob Embarassed
I want to say that movement looks great and your decision about region base is paying off

cheers

ps: How many hours give or take have you spend in this project ( in all the years)?

Any modal windows will say that in the code. In fact, I'm sure that ALL the current windows should be modal, but thats not the default, except for messageboxes.

Glad you like the regions approach, let's hope it plays great as well Very Happy

Finally, how many hours? Well, it's hard to say, I worked on SPQR in these periods:

Jan - Apr 2005
Jan - Mar 2006
Oct - Dec 2006
Apr - May 2010

So you can see it's not been continuous development, and sometimes I have advanced a lot and then had to retreat. My Python skills were not good when I started SPQR (I was a real newbie).

I suppose if I was to estimate it might be about 300 - 400 hours in total?
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Mon Jan 17, 2011 7:22 pm

Ok progress report.

I have finished the implementation of all widgets and we can now set modal windows from the yaml file.
spqr_ybuild.py is now bug free and the code is more clear.
I have added the ability to add functions inside the yaml files into arithmetic fields (x,y,w,h,start,stop,initial).
so when you want the width of a widget to be the width of an image you go like this :
w: "SGFX.gui.iWidth('test_image')"
I have done this to widget_test.yaml for example.

Now we can create every window from a yaml file .
cheers

furthermore I have made the followings pop up windows into yaml files.

window_test
widget_test
menupreferences
welcomescreen (need some work here )

I don't know if anything else must be in yaml??
I will check today's work once more and I will update the svn Wink
Finally I will move the old code ( widget_test2() , window_test2() , ect... ) from spqr_events.py
to spqr_events_old.py because it's getting too large and unreadable , if you are ok with this.
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Mon Jan 17, 2011 9:46 pm

Sounds good to me!

pygasos wrote:Finally I will move the old code ( widget_test2() , window_test2() , ect... ) from spqr_events.py
to spqr_events_old.py because it's getting too large and unreadable , if you are ok with this.

Just throw the old code away. It's still in SVN if we need it. Better there than to have in an _old file Smile
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Mon Jan 17, 2011 11:04 pm

I have updated the svn without the welcome screen finished. I couldn't make it work due to a strange bug.
When I use the file , the callbacks don't work . I will see it again tommorow Rolling Eyes

Because I made the changes so we can use functions inside the arithmetical fields now all the arithmetical
fields must be characters so we must define them like x: "10" or x: "x+10-y^2"
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Tue Jan 18, 2011 3:28 pm

Found the bug. I made by default all widgets active and so was the image in welcome screen and that's why the callbacks didn't work.
So I will insert active and visible variables in all windows and widgets. Problem solved. So today when I update the svn I will have completed
the 2 tasks #1 Yaml files and #3 window layouts lol!

I think I will continue with #4 but this is beyond my skills, so if you think that something else is more critical for me to continue with
or I have forgot something please tell. If not I will start with small steps with ...

#4: In the GUI part, the code says that the menu MUST be first on the window list. Why is that? Change it so that this is not the case, and then extend the code so that more than one menu is available

Suspect
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Fri Jan 21, 2011 1:47 pm

Hi pygasos

I'm a bit busy for the next week or so with another (paid) project I have, so you won't see me do any commits for another week or so. I'm still here though!

One clue to help you - is to look at spqr_defines.py, where it says:

# index numbers of windows that are always present
WIN_MENU = 1


this is what needs to be removed, for a start Very Happy
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Fri Jan 21, 2011 7:48 pm

maximinus wrote:Hi pygasos

I'm a bit busy for the next week or so with another (paid) project I have, so you won't see me do any commits for another week or so. I'm still here though!

One clue to help you - is to look at spqr_defines.py, where it says:

# index numbers of windows that are always present
WIN_MENU = 1


this is what needs to be removed, for a start Very Happy

That makes us 2... I got a big project at the hospital so I won't do much work ether. Never the less I will try to understand
how menus work and we 'll see from there Very Happy
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Wed Feb 02, 2011 7:29 pm

Well I am making small steps here due to heavy work obligation ( replacing production servers take all of your time even that you don't have Suspect ).
I have managed to experiment with the menu code. I understand that we need an object to keep all the menus there and track them! I am trying to make something like that and add to the code so we can have multiple menus without using the CMenu class second time. If you thing something else that could
help me and speed up my search It would be very big help for me. All I need is directions because I am little confused to what would be better to do Rolling Eyes
Anyway I don't have much time to spend but I am still thrilled we the game cheers and hope you get soon on track...
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Thu Feb 10, 2011 7:17 pm

Ok , I have managed to change the menu code slightly so now I can create single menus for right click events. I know what I must change in the code so we
can create more menus ( not just the main menu ) but the problem is how will this menus look like? If the gui must support multiple menus like the main menu on top of the screen we must have the flexibility to fit them in any part of the screen! So my question is do we need more than just context sensitive right click menus ? if so how we need them to look like ( an example of a similar menu in some game or app would be nice ). If not I will finish up the code and update the svn Cool
Hope to hear from you soon Razz
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Fri Feb 11, 2011 8:10 pm

ok revision 143 has the right click menu code. I made an example in the double click label inside the widget test. Now except the dclick function
we have an right click menu on it. Check it out. I used the your drawmenu function so the menu appear the same as the title bar. I haven't removed the

# index numbers of windows that are always present
WIN_MENU = 1

because I haven't completely removed the cmenu class because it wasn't really necessary except if we want to make more full featured menus.
Wink cya

ps : I will now begin to work on a function for dialog display. I don't know if it will be useful but I liked the idea since I don't have anything else to do until
you saw up and give me more things to do Very Happy
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Sat Feb 19, 2011 9:03 pm

Looks like I might actually be able to do some coding again in the next week or so. Apologies for being away, let's just accept that these things happen and let's move on.... Very Happy
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Thu Mar 10, 2011 3:45 pm

I have slowly did some code. I have almost finished the new code that displays dialogues for example story advancement. Take a look
This feature isn't in the todo list but I thought it might come in handy. It's not so good looking but graphics isn't my strong ability , anyway
I will do my best to fit in.
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Tue Mar 15, 2011 2:37 pm

It's ok just drop a word from time to time Rolling Eyes
maximinus wrote:Looks like I might actually be able to do some coding again in the next week or so. Apologies for being away, let's just accept that these things happen and let's move on.... Very Happy


Furthermore I have made an text widget for keyboard input. I think it may come handy. I run out of ideas that we could use in the game so I will experiment
with the game data such as unit info ( for battle etc ). I will update the svn with the text widget maybe tommorow
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Sat Mar 26, 2011 8:45 pm

OK, I am really back on the case now. I will take a look at the new code and let you know what I think in a day or two.
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Sun Mar 27, 2011 1:17 pm

Hi

I took a look at the dialog code today. Seems ok to me. However, it's probably better if it was to be class of some kind. Perhaps we can sub-class CWindow?

Also, I'm not a great fan of waiting around for text to display, I think it needs a 'next' button to go to next part.

Otherwise, looks ok!
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Mon Mar 28, 2011 12:57 pm

I like the right click code! In fact, I might have to start using it for region and unit highlight selection.
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Mon Mar 28, 2011 2:56 pm

maximinus wrote:I like the right click code! In fact, I might have to start using it for region and unit highlight selection.

Due to I used your drawing code I am relieved that you liked it. If you didn't liked it , I had to make it all over Very Happy
As I said before this way we can make as many right click menus as we like but we can have only 1 main menu.
So if you want more main menus I have an idea or two.

maximinus wrote:Hi

I took a look at the dialog code today. Seems ok to me. However, it's probably better if it was to be class of some kind. Perhaps we can sub-class CWindow?

Also, I'm not a great fan of waiting around for text to display, I think it needs a 'next' button to go to next part.

Otherwise, looks ok!

Glad you like cheers I have made the code so if you press enter or space the code prints hole lines and thus speeds up the process and
with escape it goes away all together. So it's not so binding to wait for the text. I can make it with any key to skip lines to be more easier to do.
I don't like the next button idea personally but we can do it never the less.
As for sub-classing Cwindow affraid I will try that. I hope I want produce a mushroom cloud during my attempt Very Happy

And finally I just want to mention that in the text widget code the text you pass to the widget at first is something that is permanent. So if you like
to add a ".jpg" to the text or a question in front you use it. If you want a clear text input the text in the function must be "" or None in yml file.
Check it out!
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  maximinus on Mon Mar 28, 2011 3:02 pm

pygasos wrote:Due to I used your drawing code I am relieved that you liked it. If you didn't liked it , I had to make it all over Very Happy
As I said before this way we can make as many right click menus as we like but we can have only 1 main menu.
So if you want more main menus I have an idea or two.

I really can think of any reason why we would need 2 main menus. Can you? So this part looks solved to me. I'm going to add some right-click functions to some of the game objects over the next week or so.

pygasos wrote:And finally I just want to mention that in the text widget code the text you pass to the widget at first is something that is permanent. So if you like
to add a ".jpg" to the text or a question in front you use it. If you want a clear text input the text in the function must be "" or None in yml file.
Check it out!

OK, I checked out the text widget. It needs bit more work, although potential is there. For example, it didn't like my delete button! The hard part is that it will need to have some kind of text cursor.
avatar
maximinus
Admin

Posts : 143
Join date : 2010-03-21
Age : 45
Location : Harbin, China

View user profile http://sourceforge.net/projects/spqr/

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Thu Apr 14, 2011 8:07 pm

Trying to fix up the text widget I run across this project http://pygame.org/project-ask-1571-3155.html
So last few days I tried to implement this to the gui code. It was impossible, for me at lest, so I merged it all in the widget.py
I think now the widget is more than complete Very Happy I will update soon

As for sub classing the dialog window i think it's more practical to make it a widget than sub classing it to CWindow. I want your input in this.

Last but not least because I didn't have to much time the last 2 weeks I haven't done much but now I am ready for more.
So I am waiting for new challenges Wink
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  pygasos on Tue May 31, 2011 3:30 am

Made messabox() into a subclass of CWindow in revision 221. Story() will come next with lot of changes.
I have changed the quitSpqr() function with the new messabox class, if you like it change the rest.

Since this project runs slow I have forked the GUI code and started one new. I will try to make a
"Heroes of might and magic" like game and I hope that my skills will get better that way.
Since the GUI will be similar everything I do like now with messabox I will update SPQR too.

If you need my help again off course I will be at your disposal. Thanks for the opportunity to join this
project , I have learned a lot about python (and pygame) in a few months.

Waiting to hear news from you whenever you have the time cheers
avatar
pygasos

Posts : 36
Join date : 2010-06-01
Age : 39
Location : Athens, Greece

View user profile

Back to top Go down

Re: Stuff that needs doing

Post  Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum