FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Pages: 1 [2] 3 4

Author Topic: PyChan Feedback  (Read 22883 times)

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: PyChan Feedback
« Reply #15 on: February 06, 2008, 03:57:40 am »

Small message before I leave to catch my train :

You're right, I've nothing against it being posted here, it's just that as I was unsure of the interest of it I just sent it to the potential "checkers" who could determine it.
Logged

phoku

  • Developer
  • Full Member
  • *
  • Posts: 102
    • View Profile
    • IZ dev blog
Re: PyChan Feedback
« Reply #16 on: February 06, 2008, 08:08:22 am »

 :o  :o  :o huge diff!

From a first look it looks good and coherent :)

Well, sorry for your pychan problems, I'll try to figure out, what went wrong.

And thanks barra - i have no problem with posting this PM.

-phoku
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: PyChan Feedback
« Reply #17 on: February 06, 2008, 01:10:04 pm »

The hugness is partly due to the uncleverness of my TortoiseSVN : it delete and add again a lot of lines that haven't changed for a slightest bit. Sometimes, entire files get deleted and added again whereas only a few lines have changed.
Logged

yakslem

  • Newbie
  • Posts: 1
    • View Profile
Re: PyChan Feedback
« Reply #18 on: February 07, 2008, 03:17:29 pm »

First of all, a tabbed area is included in the SVN version of Guichan and will end up in the upcoming 0.8.0 release.

Now, about the filled issue, http://code.google.com/p/guichan/issues/detail?id=24, I've added a comment. So please read it.

I know you prefer to talk about this bug on this forum, however, I'm not entirely comfortable with that idea as other people involved with Guichan might benefit from the information about this possible bug. So I would appreciate if future communication could take place in our issue tracker as it's connected to our development mailing list making every developer notified about changes.

Finally I just want to say that the Guichan python bindings sure are interesting. I've actually been thinking about making Python bindings of my own, but never gotten around to it.

/ Olof - Guichan developer
Logged

phoku

  • Developer
  • Full Member
  • *
  • Posts: 102
    • View Profile
    • IZ dev blog
Re: PyChan Feedback
« Reply #19 on: February 07, 2008, 04:12:01 pm »

Hi, I am very happy for the quick reply :-) Thank you.

As I said in the Issue tracker comment, I am sorry for
forwarding you to this forum and will use the guichan
issue tracker from now on.

See my comments there.

--

The python bindings I think are tied to the FIFEngine
although not that deeply, as we try to follow guichans
development. As far as I can see now, they are rather
plain SWIG wrappers.

The python wrapper of the API - PyChan - is less tied to FIFE ATM.
and should be portable to any SWIG wrapped Guichan API.

You are very welcome to have a look at the code, ask questions or whatever.

- phoku
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: PyChan Feedback
« Reply #20 on: February 11, 2008, 03:24:12 am »

Finally, I played around with pychan, too. First of all - I'm impressed how quick & easy a gui is build with FIFE now - good work phoku :)

By working with pychan, I encountered some problems. Some of them are already solved, thanks to phokus quick reaction. :)

Here are some additional issues (I'll update it when I've found more ^^):

  • widget.findChild(name="") seems not to work with vars, only directly placed strings
  • widget.hide() / show() seems only to work for containers, not for widgets like labels etc.. (although it is mentioned in the doc that these widgets have this function)
  • widget.BaseColor(), widget.BackgroundColor() seems not to work for Clicklabels

Questions:

  • Can colors also have an alpha value? The old LUA core was able to handle (R,B,G,A)
And as pictures say more than 1000 words, here are some examples what pychan can do for you :)



phoku

  • Developer
  • Full Member
  • *
  • Posts: 102
    • View Profile
    • IZ dev blog
Re: PyChan Feedback
« Reply #21 on: February 11, 2008, 05:39:40 am »

Wow, that's what I allways loved about FIFE.

Once you get something useful working, people (i.e. chewie) will take it and create something amazing from it :) . Thanks!

It also means one has to live with bug reports, though ^^

Anyway:
Labels
ClickLabel and Labels in general will go through a rework, that finally ClickLabel will be renamed to Label (it was a funny distinction anyway) and be able to handle multiline text with optional text-wrapping.

This is also important for November, as I ditched the idea of incorporating your patch as a whole, but will concentrate on supplying the basic Gui functionality you need and later help with using pychan.

I think this should be okay for you? Multiline Labels and text wrapping are sure needs that other Gui users have, too.

Regarding that, I hope I will be able to get an interface to the text-wrapping so that the floating text can use that, too.

RGBA
I have to admit that I don't even know whether the alpha value works, but I'll make sure that it will work. (Might take some time though.)

Other stuff: FIXED/INVALID

Questions to chewie:
  • Did you use XML to define the GUI or the direct API?
  • Did you use styles?

« Last Edit: February 11, 2008, 10:31:50 am by phoku »
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: PyChan Feedback
« Reply #22 on: February 11, 2008, 05:59:59 am »

@phoku

Labels

Good idea with the labels - in fact most scenarios where you use labels may need a callback function later. (e. g. for tooltips etc...)

As we're talking about improved labels - is there a possibility to include hover effects? (switching colors should be enough - but every additional effect like borders, background color etc. would be interesting, too ^^)

RGBA

Perhaps this feature isn't necessary at all - I only try to find a way to make the background of ScrollArea / Textbox / whatever invisible. Opaque 1/0 for all widgets should work, too. (ScrollArea doesn't have this function)

XML / Styles

I'm working mostly with XML, but ATM without styles. But as I love the power of CSS I'll make heavy use of styles later.

I use the direct API to "make things dynamic" - e. g. if I paint certain labels with a different font color (like in the audioplayer, to show the active track) or if we have to update multiple labels with new values. (character screen)

In short: Basic design XML, modification with direct API.

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: PyChan Feedback
« Reply #23 on: February 11, 2008, 11:29:05 am »

Concerning labels :
I have no problem with that, since you are the GUI coder and have much more coding experience than me.
By "functionality" I suppose you mean auto text split (to label width) since this is the only real functionality my patch added. As long as you plan to implement it, I'm fine.

If you have the time to rework my gui dialog so it fits with the new features you will add to pychan it would be great. If you don't have the time I'll just do it myself when I come back in one week and a half.

Anyway, long live to pychan.

PS : Your first attempts at using pychan for your interfaces show great results, chewie.
Logged

Sadr

  • Newbie
  • Posts: 34
    • View Profile
    • Radakan
Re: PyChan Feedback
« Reply #24 on: February 13, 2008, 06:40:17 pm »

Wow, those pictures look stunning! We definately gotta make sure to have some impressive interfaces to show off with in the techdemo.
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: PyChan Feedback
« Reply #25 on: February 22, 2008, 11:40:17 am »

I have two requests to make :

-Possibility to hide child widgets and not just the top container of a hierarchy : I presently need it for a browsing interface for my dialogue editor, to expand/shrink "folders", like in any explorer interface.
-Possibility to delete widgets : would be really useful for dynamic interfaces such as inventory or dialogue


EDIT : I just found out about removeChild(). I assume a removed child is totally deleted. So it only resolve my second request, but not the first one.
« Last Edit: February 22, 2008, 11:52:58 am by November »
Logged

phoku

  • Developer
  • Full Member
  • *
  • Posts: 102
    • View Profile
    • IZ dev blog
Re: PyChan Feedback
« Reply #26 on: February 23, 2008, 10:04:36 am »

Heya November :)

You should be able to use removeChild in this case as well.
You'll have to call adaptLayout after removal, so that the layout
changes.

Enabling the hide()/show() methods would need some work
on the layouting code which is hard to get right. SO this won't
happen until i spend some serious time on it.

I hope you can cope with the technique layed out above.

A removed child widget is not deleted at all, this should be
handled by python garbage collection.

-phoku
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: PyChan Feedback
« Reply #27 on: March 03, 2008, 11:30:11 am »

This code will cause pychan to draw the elements incorrectly :
Code: [Select]
<HBox>
<ImageButton up_image="path" down_image="path"/>
<Label text="Test"/>
</HBox>
And basically any HBox with an ImageButton in it : the ImageButton won't show, only the Label gets drawed



However if you try this code :
Code: [Select]
<VBox>
<ImageButton up_image="path" down_image="path"/>
<Label text="Test Label"/>
</VBox>
The ImageButton is drawed, but the button width is the width of the Label, whereas it should be the width of the image.

Something else : by default, it could be good if the ImageButton hadn't a border around it.



Also, concerning Icon :
Code: [Select]
<VBox>
<Icon image="path"/>
<Label text="Test Label"/>
</VBox>
Try this code : the Icon image width is set to the Label width, whereas I think it should stay to the width of the Icon. Maybe by just setting the max_size of the Icon/ImageButton automatically ?

In the case of the Icon widget, HBox layout seem to work correctly. Just the annoying border.

Also same remarks about borders : I don't think Icon should have a border by default.
« Last Edit: March 03, 2008, 11:36:34 am by November »
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: PyChan Feedback
« Reply #28 on: March 03, 2008, 05:31:22 pm »

Another "issue" I found :
The resizing function of a HBox (resp. VBox) automatically set the height (resp. width) of any contained widget to the max height of its child widgets.

I'm not sure this behavior is really useful, but more importantly : it causes display bugs.

This happened to me : take a HBox that contain, an Icon and a VBox :
1) The Icon's height is set to the VBox height when the HBox resizing function is called. This should not happen, first because it cause strange visual appearance (an Icon's height isn't supposed to change dynamically), second because of the following :
2) When the HBox resizing function is called a second time (suppose the VBox content has changed), the VBox height is flawed : after being set to the correct height it should have based on its content, its height is then set to the Icon's height, which itself is flawed. The result is the two having a too important height coming from nowhere.


A solution would be to set the Icon max_size, but this would just be a "hack" : the fact is I hardly get the point of this automatic height/width expanding.
Logged

phoku

  • Developer
  • Full Member
  • *
  • Posts: 102
    • View Profile
    • IZ dev blog
Re: PyChan Feedback
« Reply #29 on: March 04, 2008, 04:40:12 am »

Hi November,

I'll address your issues hopefully this week or weekend.
I guess the first fix will be to have an Icon
set it's size fixed to the image you set.

For the other stuff I'll have to set up a test case.
Please keep in mind that the layouting code is
really simplistic for now :-|

Did you get any further with the dialog system?

-phoku
Logged
Pages: 1 [2] 3 4