Skip to: Site menu | Main content

### Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums |

October 09, 2007, 12:55:19 PM
Welcome, Guest. Please login or register. Did you miss your activation email? Login with username, password and session length |

News: Firmware 3.52 is out. |

|  | Home |  | Help | Search | Shop | Login | Register |

Pages: [1] |
| Print |

| Author | Topic: Help! GUI? im not completly noob (Read 141 times)

Blmaster Newbie Karma: +0/-2 Offline Posts: 41 5303.60 points View Inventory Send Money to Blmaster |
| Help! GUI? im not completly noob « on: September 30, 2007, 06:19:48 PM » |
ok so, its been a while since i coded, but i have done all the tutorials and completed them and it worked! so i know a bit of C++ whats a GUI?? i know its graphic user interphase but i mean what is it for! Is it just for game homebrew because it requires graphics... and i know like if you use GUI and stuff it better because of the color and stuff or something... basically i just need help on how to get started on GUI coding!? anyone want to help me!
| Logged
sk8inrox Newbie Karma: +7/-2 Offline Posts: 43 410.83 points View Inventory Send Money to sk8inrox |
| Re: Help! GUI? im not completly noob « Reply #1 on: September 30, 2007, 07:12:49 PM » |
The graphical user interface in Windows is like the taskbar and the windows with the minimize, maximize and close buttons. If your just starting out I wouldn't recommend starting off with making a gui 'cause it's too complicated. Try starting out simple.
| Logged
2.6,CRACKED! Full Member Karma: +0/-36 Offline Posts: 109 3783.20 points View Inventory Send Money to 2.6,CRACKED! |
| Re: Help! GUI? im not completly noob « Reply #2 on: September 30, 2007, 10:55:18 PM » |
its not too hard, tutorial 4 has laid it out for him. If you understand C syntax which im guessing you can then doing it won't be hard if you use graphics.c and graphics.h but make sure you have downloaded libzlib and libpng
| Logged
Raphael Global Moderator Hero Member Karma: +150/-5 Offline Posts: 930 15115.64 points View Inventory Send Money to Raphael |
| Re: Help! GUI? im not completly noob « Reply #3 on: October 01, 2007, 05:40:27 AM » |
A GUI is not necessarily a full window manager. A GUI can be as simple as a number of selectable "buttons". A good example is next to every games main menu. A GUI's most important feature is being graphical - ie not text-based - and other than that it just needs to be a UI.
| Logged
Don't push the river, it flows. http://wordpress.fx-world.org - my devblog http://wiki.fx-world.org - VFPU documentation wiki Alexander Berl "A good mod is a combination playground monitor, priest, big brother/sister, psychiatrist, professor and more."
Blmaster Newbie Karma: +0/-2 Offline Posts: 41 5303.60 points View Inventory Send Money to Blmaster |
| Re: Help! GUI? im not completly noob « Reply #4 on: October 02, 2007, 11:52:46 AM » |
yea so its just graphics... and i already did all the tutorials and i want to start doing graphics now, because i already created text based programs and i think i have the hang of that so graphics.c and graphics.h is all you need, and the commands are in there!!! well i tired to do this, and it didnt work. (tired it long time ago, and dont have any source to show you sry) how do i load an image in the background with a menu in the the front?
| Logged
2.6,CRACKED! Full Member Karma: +0/-36 Offline Posts: 109 3783.20 points View Inventory Send Money to 2.6,CRACKED! |
| Re: Help! GUI? im not completly noob « Reply #5 on: October 02, 2007, 12:03:00 PM » |
well, if it didnt compile make sure: You have installed the libraries properly, make && make install You link them properly in the makefile if it compiles... make sure: You load a png image The image is in the right folder or even on mem stick Also read parameters: Code:
    /**
     * Blit a rectangle part of an image to screen without alpha pixels in source image.
     *
     * @pre source != NULL && destination != NULL &&
     *      sx >= 0 && sy >= 0 &&
     *      width > 0 && height > 0 &&
     *      sx + width <= source->width && sy + height <= source->height &&
     *      dx + width <= SCREEN_WIDTH && dy + height <= SCREEN_HEIGHT
     * @param sx - left position of rectangle in source image
     * @param sy - top position of rectangle in source image
     * @param width - width of rectangle in source image
     * @param height - height of rectangle in source image
     * @param source - pointer to Image struct of the source image
     * @param dx - left target position in destination image
     * @param dy - top target position in destination image
     */
    extern void blitAlphaImageToScreen(int sx, int sy, int width, int height, Image* source, int dx, int dy);
So to load a background picture for example in the main function... you should read headerfiles.... if you understand C or can even read english it is easy.... Code:
    Image *Background;

    Background = loadImage("background.png");

    while(1)
    {
    blitAlphaImageToScreen(0, 0, 480, 272,Background, 0, 0);

        sceDisplayWaitVblankStart();
        flipScreen();
    }
Read up on the rest... your lazy
| Logged
Vincent Hero Hero Member Karma: +53/-40 Offline Posts: 614 30899.66 points View Inventory Send Money to Vincent |
| Re: Help! GUI? im not completly noob « Reply #6 on: October 02, 2007, 01:10:16 PM » |
You'll want to look into optimizing what you've got there in the graphics library too. There's some simple things you can do to make it much quicker as well. There's a few threads on this forum that explains in great detail what I mean. Just do a search on "graphics optimization" in these forums, and you'll see what I mean.
| Logged
flatmush Suck my rock! C/C++ Developer Hero Member Karma: +44/-23 Offline Posts: 711 1333.95 points View Inventory Send Money to flatmush The Omniscient One |
| Re: Help! GUI? im not completly noob « Reply #7 on: October 02, 2007, 02:18:30 PM » |
I would advise you get to a point where you can see the need for optimization first, if your program runs at over 60 fps without optimizations then you don't need to invest the extra time in it.
| Logged
Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c Hehe I'm a "Hero Member" because I bought posts back when they were in the shop. Creator of FlatEditPSP
A_Nub gibbocool rules! C/C++ Developer Hero Member Karma: +89/-25 Offline Posts: 621 81502.93 points View Inventory Send Money to A_Nub Noob am I |
| Re: Help! GUI? im not completly noob « Reply #8 on: October 02, 2007, 10:13:42 PM » |
But why not do it for teh LOLZ? Or just write it Optimized the first time so you dont have to worry about it later ehh? (Lol my canadian is coming out )
| Logged
Check out my dev teams SITE!! http://pxp.thayer-remodeling.com InsertWittyName: That's like saying because you wank with your right hank all the time, and one day you wank with your left, that you invented left handed wanking..
yaustar All-Around Dev Sr. Member Karma: +70/-5 Offline Posts: 385 11378.04 points View Inventory Send Money to yaustar |
| Re: Help! GUI? im not completly noob « Reply #9 on: October 03, 2007, 02:47:35 AM » |
Quote from: A_Nub on October 02, 2007, 10:13:42 PM But why not do it for teh LOLZ? Or just write it Optimized the first time so you dont have to worry about it later ehh? (Lol my canadian is coming out ) Optimised code is harder to refractor and maintain then non-optimised code. Get it working. If the game runs too slowly, profile to find the bottlenecks. Attempt to optimise the bottlenecks. Profile again to see if it made a difference.
| Logged
[Blog] [Portfolio]
Raphael Global Moderator Hero Member Karma: +150/-5 Offline Posts: 930 15115.64 points View Inventory Send Money to Raphael |
| Re: Help! GUI? im not completly noob « Reply #10 on: October 03, 2007, 03:52:03 AM » |
Vincent: Not everyone has the need for optimizing every bit of code. The OP just wanted to know how a GUI basically works - not how he can make it blazing fast. Also, it's not even sure if he would be capable of optimizing the graphics lib himself, so advising him to do so is pretty useless. If he gets his GUI working and notices it doesn't run smooth enough (which it most likely won't since a GUI is next to never the bottleneck), he will for sure come back and ask on how he can make it faster.
| Logged
Don't push the river, it flows. http://wordpress.fx-world.org - my devblog http://wiki.fx-world.org - VFPU documentation wiki Alexander Berl "A good mod is a combination playground monitor, priest, big brother/sister, psychiatrist, professor and more."
Blmaster Newbie Karma: +0/-2 Offline Posts: 41 5303.60 points View Inventory Send Money to Blmaster |
| Re: Help! GUI? im not completly noob « Reply #11 on: October 03, 2007, 05:19:04 PM » |
thanks for all your help, i will see if i can get the background working now... i will ask you guys if i need more help. Thanks! lets see if i can get this to work
| Logged

Pages: [1] |
| Print |

Jump to:

| Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC |

Page created in 0.663 seconds with 32 queries.
Loading...