Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Newbie: Background image loading

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-27-2008, 03:41 PM
enonod's Avatar
Basic4ppc Veteran
 
Join Date: Oct 2007
Location: U.K.
Posts: 324
Default Newbie: Background image loading

Question 1...
I have just loaded an image to form a background for adding sprites. I am following the sprite example and modifying it to learn the syntax etc.
I have a background that will appear in the centre of the screen only but cannot find any X,Y to position it. and the smaller (than screen size) image seems to fill the screen.
Do I have to treat the image as a sprite in order to position it?
Or
Do I have to produce a larger image with blank areas?

Question 2...
I notice the loading of sprites uses Sprite.new1 -Spr1.new1 -Spr2.new1.
I am not quite understanding where these names came from or rather were declared, I'm assuming they are names like fred.New1.

A little guidance here should get me going. Thank you.
Reply With Quote
  #2 (permalink)  
Old 04-27-2008, 03:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

1. Drawing an image on the background should be done with GameWindow.DrawBackgroundImage.
The image will stretch to fit the GameWindow size. So you should produce a larger image with blank areas.
Another solution is to treat the background image as a sprite.
2. Spr1 and Spr2 are Sprite objects added from the Tools menu: Tools - Add Object.
You could see the complete list of objects in the right pane (on the desktop).
I recommend you to read the GPS tutorial as it explains this topic:http://www.basic4ppc.com/forum/tutorials/1093-gps-application-part-i.html
Reply With Quote
  #3 (permalink)  
Old 04-27-2008, 03:58 PM
enonod's Avatar
Basic4ppc Veteran
 
Join Date: Oct 2007
Location: U.K.
Posts: 324
Default

Thank you Erel, I'll read that now. That was quick, as if you were just waiting.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background Task RandomCoder Questions (Windows Mobile) 11 07-01-2008 12:06 PM
Background Color im4retro Basic4ppc Wishlist 1 05-27-2008 05:11 PM
Background Color im4retro Questions (Windows Mobile) 2 05-27-2008 03:55 PM
Can I do programs in background colin9876 Questions (Windows Mobile) 1 12-18-2007 07:33 AM
Move an image inside an image control Cableguy Questions (Windows Mobile) 5 05-14-2007 07:40 PM


All times are GMT. The time now is 09:20 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0