Results 1 to 3 of 3

Thread: Scroll large image in game

  1. #1
    Join Date
    Feb 2006
    Posts
    209
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Scroll large image in game

    Here is the problem: I want to have a black background and a lot of planets drawn on the map. I want to be able to click on a planet, and then this planet should send a signal to a slot that will show information about this specific planet.

    The question is then how to do this.
    Should I draw a large image and then just scroll it, and when I click on the image, should I search for the planet to see if any one was selected?

    Any ideas on this?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Scroll large image in game

    It depends how much is "a lot of planets". Large image will consume large amount of memory. If you redraw your scroll area wisely, you might not need the pixmap.

  3. #3
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Scroll large image in game

    Maybe you can just create pushbuttons (masked by a round QBitmap) to represent your planets, and have them located all around your background. And just connect the buttons to open a message box, or just use the tooltips text even, to show information about a planet.
    Software Engineer



Similar Threads

  1. "sensitising" an image
    By TheKedge in forum Qt Programming
    Replies: 2
    Last Post: 28th June 2006, 08:21
  2. Fast image drawing/scaling in Qt 3.3
    By eriwik in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2006, 11:45
  3. problem with the back ground image
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2006, 22:34
  4. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 17:36
  5. Question about updating an image on screen
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 20:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.