Murga-Projects Forums
Windows position - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: Windows position (/showthread.php?tid=30)


Windows position - chrimo - 05-29-2007 08:14 AM

Hello community,

is there a way of postioning a new window at the desktop ?
I found no sample, how to add coordinates for new winows at the desktop...

example:
first window appears at the desktop, but seconds window hides the first on.

What do I miss ?

Thanks for some hints
Bye
Christian


RE: Windows position - mikshaw - 05-29-2007 01:57 PM

second_window=fltk:Fl_Window(width,height,label)
second_windowTongueosition(x_position,y_position)
first_window:hide()
second_window:show()


RE: Windows position - chrimo - 05-30-2007 06:32 AM

Hi Mikshaw,
you are great Big Grin

mikshaw Wrote:
second_window=fltk:Fl_Window(width,height,label)
second_windowTongueosition(x_position,y_position)
first_window:hide()
second_window:show()


Why do I cannot find it at documentation ?
Are you using a special one ?

I think, we need a separate doc for Lua-GUI-Beginners Big Grin

Thanks
Bye
Christian


RE: Windows position - mikshaw - 05-30-2007 07:09 AM

Depending on what you want to do, the documentation you need might be Lua, FLTK, or other (the official docs from the individual applications combined to build murgaLua). In this case, since you want to control widgets, you'd need to refer to the FLTK documentation, which is included with murgaLua. When you need Lua documentation, it can be found at lua.org.

Keep in mind that most of the FLTK documentation focuses on C++ syntax, so you will probably find yourself doing some trial-and-error work in order to figure out the syntax needed for some parts of murgaLua. maybe you won't, but I certainly do. Some things seem to be inconsistent, and I have trouble sometimes deciding on whether to use, for example, fltk<dot>something or fltk<colon>something. I'm sure it's logical to people who are "true" programmers, but personally I don't get it =o)
Ideally a complete murgaLua-specific doc would be awesome, so there would not need to be any guessing or translation, but unfortunately very few people actually get any sort of satisfaction from writing documentation.


RE: Windows position - chrimo - 05-30-2007 08:02 AM

Hi mikshaw,
Lua is no problem, but I'm a beginner of GUI programming ;-(
I'm currently have problems to find the correct methods for each widget-class.
General it is hard for me to understand new concepts of general GUI programming, but I try to ask questions just once ...

A murgaLua-GUI doc would be nice, but as you told me, a hard and long way...

Thanks for all your very useful tips and I try to spread them all over germany Big Grin
Bye
Christian


mikshaw Wrote:
Depending on what you want to do, the documentation you need might be Lua, FLTK, or other (the official docs from the individual applications combined to build murgaLua). In this case, since you want to control widgets, you'd need to refer to the FLTK documentation, which is included with murgaLua. When you need Lua documentation, it can be found at lua.org.

Keep in mind that most of the FLTK documentation focuses on C++ syntax, so you will probably find yourself doing some trial-and-error work in order to figure out the syntax needed for some parts of murgaLua. maybe you won't, but I certainly do. Some things seem to be inconsistent, and I have trouble sometimes deciding on whether to use, for example, fltk<dot>something or fltk<colon>something. I'm sure it's logical to people who are "true" programmers, but personally I don't get it =o)
Ideally a complete murgaLua-specific doc would be awesome, so there would not need to be any guessing or translation, but unfortunately very few people actually get any sort of satisfaction from writing documentation.




RE: Windows position - mikshaw - 05-30-2007 09:23 AM

It took me a long time to really begin to understand how the FLTK documentation is organized. I started using it with Lua-FLTK a couple of years ago, and I still have trouble understanding parts of it. One thing that might help with the methods, though, is to note the class hierarchy. Typically the methods of the higher levels are inherited by those below it, as far as I understand it. Actually using these methods, though, has be the most difficult thing for me. Some methods are used to perform actions, some simply return a property of a widget, and some are completely beyond my understanding of what they do or how to make them do anything.

But as with anything new, even the basics seem terribly complicated until you start learning, then the more you work with it the faster things seem to click. That first push always seems to be the hardest, though. I've been poking at Tcl/Tk and C programming for nearly as long as Lua/FLTK, but have yet to actually learn anything useable about either one. But I guess with Lua, as with shell scripting, I actually had projects in mind to begin with, so there was something to motivate me. With C I have no small projects that I couldn't instead do with script more easily, so I guess there's little motivation beyond "Gee, it'd be useful if I knew how to program with c".


RE: Windows position - chrimo - 05-30-2007 08:32 PM

Hi,
I try it the same way Big Grin
Learning by doing. I've started a small project of Roboter-Simulation.
Currently I'm using a Lego Mindstorms NXT Robot with pbLua-OS and try to write a simple simulation. That's the reason for using murgaLua's FLTK.
Step by step, the project is goin on Big Grin

Bye
Christian



mikshaw Wrote:
It took me a long time to really begin to understand how the FLTK documentation is organized. I started using it with Lua-FLTK a couple of years ago, and I still have trouble understanding parts of it. One thing that might help with the methods, though, is to note the class hierarchy. Typically the methods of the higher levels are inherited by those below it, as far as I understand it. Actually using these methods, though, has be the most difficult thing for me. Some methods are used to perform actions, some simply return a property of a widget, and some are completely beyond my understanding of what they do or how to make them do anything.

But as with anything new, even the basics seem terribly complicated until you start learning, then the more you work with it the faster things seem to click. That first push always seems to be the hardest, though. I've been poking at Tcl/Tk and C programming for nearly as long as Lua/FLTK, but have yet to actually learn anything useable about either one. But I guess with Lua, as with shell scripting, I actually had projects in mind to begin with, so there was something to motivate me. With C I have no small projects that I couldn't instead do with script more easily, so I guess there's little motivation beyond "Gee, it'd be useful if I knew how to program with c".




RE: Windows position - widged - 06-02-2007 03:49 AM

chrimo Wrote:
Hi,
I try it the same way Big Grin
Learning by doing. I've started a small project of Roboter-Simulation.
Currently I'm using a Lego Mindstorms NXT Robot with pbLua-OS and try to write a simple simulation. That's the reason for using murgaLua's FLTK.
Step by step, the project is goin on Big Grin

Bye
Christian


Learning by doing is the best way. Ever read "mindstorm", the book by Papert?Nice stuff.

I am busy with a project involving another language till end of June. After that I plan to take some time to do serious learning of murgalua and other alternatives and write a bit of documentation/tutorials.

One of the thing I have in mind, to keep me on track is to write a monthly newsletter on some gaming related content.

If I was to do that, would other members of the community be keen to contribute? This nxt mindstorm project seems like an excellent candidate.

This would be hosted on this wiki
I can provide moderator access to anybody who wants. That access can be limited to some sections of the wiki, etc., etc.

I also have a system in place to provide a gallery of murgalua demos

Oh, this can be in English or French (I am French speaking... and I would bet that Christian is as well).


RE: Windows position - chrimo - 06-03-2007 05:13 AM

widged Wrote:

chrimo Wrote:
Hi,
I try it the same way Big Grin
Learning by doing. I've started a small project of Roboter-Simulation.
Currently I'm using a Lego Mindstorms NXT Robot with pbLua-OS and try to write a simple simulation. That's the reason for using murgaLua's FLTK.
Step by step, the project is goin on Big Grin

Bye
Christian


Learning by doing is the best way. Ever read "mindstorm", the book by Papert?Nice stuff.

I am busy with a project involving another language till end of June. After that I plan to take some time to do serious learning of murgalua and other alternatives and write a bit of documentation/tutorials.

One of the thing I have in mind, to keep me on track is to write a monthly newsletter on some gaming related content.

If I was to do that, would other members of the community be keen to contribute? This nxt mindstorm project seems like an excellent candidate.

This would be hosted on this wiki
I can provide moderator access to anybody who wants. That access can be limited to some sections of the wiki, etc., etc.

I also have a system in place to provide a gallery of murgalua demos

Oh, this can be in English or French (I am French speaking... and I would bet that Christian is as well).


ReHi,

I've finished today my working NXTLuaSim and I'd like to give it away Big Grin
Problem: I'm no Software Developer and the code is extrem ugly and should be reviewed and cleaned before using it as an example...
Preview:
http://www.mindstormsforum.de/bilder/data/media/15/NXTpbLuaSim-Beta-1.jpg

Sorry I'm from germany Big Grin

Bye
Christian


RE: Windows position - iGame3D - 06-03-2007 08:52 AM

Christian you big tease, giving us just a screen shot.

Start a new thread all about your cool app, and we'll run it through the trial by fire, before it hits the killer robot programming public at large.

I should take my own advice, I need to get an iGame3D build up,
I'm sure my code is even less pretty.

By the way Tobi is from Germany.
See if you can find him at the big music festival this weekend. ha!


RE: Windows position - widged - 06-06-2007 12:54 AM

chrimo Wrote:
I've finished today my working NXTLuaSim and I'd like to give it away Big Grin
Problem: I'm no Software Developer and the code is extrem ugly and should be reviewed and cleaned before using it as an example...


It would be cool to see that. Ugly code doesn't seem to be a problem... release it with ample warnings as to the draft status, let persons play with this. We are all beginners for now ;-).

chrimo Wrote:
Sorry I'm from germany Big Grin


Nothing to be sorry about Wink.


RE: Windows position - chrimo - 06-06-2007 03:31 AM

widged Wrote:
It would be cool to see that. Ugly code doesn't seem to be a problem... release it with ample warnings as to the draft status, let persons play with this. We are all beginners for now ;-).


Give me a few days to correct my stupid try and error version of SpriteCollisionDetect and SpriteDistanceCheck. Big Grin

Has anbody else a working solution or ideas to realize this ?
Currently I created different object[x][y] into a table world = {}
Then I fill up the area around the object with copies of object[x][y].
This makes the object bigger than ONE point Big Grin.
Detection and Distance to walls and other objects now can be checked
by testing for NIL or userdata ;-(

This is my first try to write some graphics application (NXTLuaSim)

Bye
Christian


RE: Windows position - widged - 06-06-2007 03:43 AM

chrimo Wrote:
Has anbody else a working solution or ideas to realize this ?


No working solution in murgalua

For an excellent tutorial Tile-Based Games by Tonypa

A lot of code on websites about the PSP lua player

EvilMania.com

PSP extra

PSP Homebrew

AnimatedSprite ClassLibrary v2.1

Slightly related. What would be the difficulty to produce a version of murgalua that runs on PSP?


RE: Windows position - widged - 06-06-2007 03:53 AM

I was planning to do something of the like myself. In fact, I wanted to take advantage of the creative commons "free remix" license, to rewrite the tonypia tutorial to work with murgalua.

You can find sprites, props, and content for games, completely free to re-use at http://reinerstileset.4players.de/

You can find more game-content materials on my widged wiki


RE: Windows position - widged - 06-06-2007 03:55 AM

We should probably stop writing here and rather create a thread "game programming in murgalua"

Anyway another forum could be created (parallel to the "general")?


RE: Windows position - chrimo - 06-06-2007 04:13 AM

Very good idea.

@John: what about new forum:

murgaLua runtime (installation and runtime features)
murgaLua game programming
murgaLua ports (ports to PSP, WM5, other platforms)
Cheers
Christian


RE: Windows position - chrimo - 06-06-2007 07:09 AM

Hi,
one last reply:

Quote:
For an excellent tutorial Tile-Based Games by Tonypa


This links is a golden shot for me !
WOW. Now, all my open questions get an answer.

We should do the same for murgaLua.
Thanks for this cool hint

Bye
Christian


RE: Windows position - widged - 06-06-2007 08:52 AM

chrimo Wrote:
We should do the same for murgaLua.


yeah, I had the same thought... and prepared the ground murgalua tile engine

I won't have time to work on this before 3-4 weeks. I can copy it on the wiki and give you editor authorisation, if you like. You will also have the possibility to add a page of links and other info.

Don't worry about language issues. The idea of a wiki is that a first person can edit a draft and then other ones improve on it. Note that simply registering won't give you any edit authorisation. I need to set that manually (avoidance of automated spam).

Cheers,
Marielle