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
February 10, 2012, 02:03:10 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Check out the Code Section!
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: User Interface via Images vs Graphics  (Read 1019 times)
singha
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8
583.04 points

View Inventory
Send Money to singha

View Profile
« on: March 17, 2010, 11:04:44 PM »

Hello all,

I am attempting to implement a user interface on the PSP (to input text).  I need to draw a keyboard on the screen and update the cursor, text, etc.  I was wondering what the best way to go about it might be.

METHOD 1: Images
Use Photoshop to create pngs and draw them on top of each other.  For example, draw the keyboard below and the cursor highlight above it, placed in the correct position to be above a letter.

METHOD 2: Graphics
Go through those GU tutorials.  Draw each key by itself and highlight when selected.

I'm leaning towards METHOD 1 because there's no learning curve (anymore since I did tutorial 4, I believe).  It doesn't seem like it would be terribly inefficient in comparison to METHOD 2.

Is there some reason to use METHOD 2 over METHOD 1?  Am I missing something?

Thanks very much!
L

And thank you very much for this forum and the tutorials!  They are both quite helpful.
Logged


AlphaDingDong
Combat Muskrat
All-Around Dev
Hero Member
*

Karma: +32/-3
Offline Offline

Posts: 882
2044.69 points

View Inventory
Send Money to AlphaDingDong
Hey... Are you gonna eat that?


View Profile
« Reply #1 on: March 18, 2010, 03:11:37 AM »

If you're aware that the PSP OSK can be used and still want to create your own OSK then I'd recommend learning the GU and then using method 1.  Draw your keyboard and then use some form of hilight on the selected key.  As for the key hilight, however, I don't know if overlaying a second image would be best.  You could just as easily create a dynamic polygon of some sort for hilighting the selected key.  That way if your keys aren't all the same size you can just adjust the polygon shape for the indicated key rather than having a different overlay image for each key size.  It's also easy to have pulsing hilight effects, etc.
Logged
singha
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8
583.04 points

View Inventory
Send Money to singha

View Profile
« Reply #2 on: March 18, 2010, 09:03:03 AM »

Yes, I don't want to use the PSP's standard text entry.  Your advice seems solid.  I'm going to go through  the GU tutorials here (http://www.psp-programming.com/code/doku.php?id=c:pspgu-neheport-lesson1).  Please let me know if these are outdated and there is a better place to learn this.  Just that one broken screenshot is making me question it is all.

Thanks!
L
Logged
AlphaDingDong
Combat Muskrat
All-Around Dev
Hero Member
*

Karma: +32/-3
Offline Offline

Posts: 882
2044.69 points

View Inventory
Send Money to AlphaDingDong
Hey... Are you gonna eat that?


View Profile
« Reply #3 on: March 18, 2010, 03:55:29 PM »

Well, they're old, but the GU hasn't really changed.  They're still probably the best place to learn.  You can also read through graphics.c and try to understand what each line does.  Anything you don't get, either in nehe or in graphics.c, you can ask about here.
« Last Edit: March 18, 2010, 03:57:41 PM by AlphaDingDong » Logged
singha
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8
583.04 points

View Inventory
Send Money to singha

View Profile
« Reply #4 on: March 18, 2010, 04:32:36 PM »

Thank you very much!
Logged
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.174 seconds with 28 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com