custom preference screen [SOLVED]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
saskuto
Regular
Posts: 64
Joined: Fri Jan 15, 2010 2:56 pm
Contact:

custom preference screen [SOLVED]

#1 Post by saskuto »

Hey in need of help, again ^^;

I have my preference menu screen and hover screen,
pref.jpg
pref_hover.jpg
like when u customise the main menu and have the code like this

Code: Select all

    layout.imagemap_preferences("pref.jpg", "pref_hover.jpg", [
    (350,83,447,127, "Window"),
    (465,81,554,125, "Fullscreen"),

           
    (351,131,446,175, "Seen Messages"),
    (467,129,587,173, "All Messages"),
           
    (345,189,449,226, "Stop Skipping"),
    (467,186,582,224, "Keep Skipping"),


    (339,357,609,399, "Music Volume"),
    (335,412,605,454, "Sound Volume"),


    (332,291,607,335, "Auto-Forward Time"),
    (330,236,611,280, "Text Speed"),
    
    (332,291,607,335, "All"),
    (330,236,611,280, "None"),

    # Also define the game menu buttons.
    (198,0,272,52, "Return"),
    (273,0,344,52, "Save Game"),
    (346,0,423,52, "Load Game"),
    (427,0,474,42, "Preferences"),
    (477,0,550,42, "Main Menu"),
    (552,0,601,42, "Quit"),
    (486,491,599,536, "Gore")#Custom new menu
    ])
  

but i keep getting this

Code: Select all

I'm sorry, but an exception occured while executing your Ren'Py
script.

TypeError: imagemap_preferences() takes exactly 6 arguments (3 given)

While executing init code:
 - script at line 19 of L:\Visual Novels\software\renpy-6.10.0\Cafe avec de L'amour/game/options.rpy
 - python at line 82 of L:\Visual Novels\software\renpy-6.10.0\Cafe avec de L'amour/game/options.rpy.

-- Full Traceback ------------------------------------------------------------

  File "L:\Anime\Visual Novels\software\renpy-6.10.0\renpy\bootstrap.py", line 260, in bootstrap
  File "L:\Anime\Visual Novels\software\renpy-6.10.0\renpy\main.py", line 253, in main
  File "L:\Anime\Visual Novels\software\renpy-6.10.0\renpy\execution.py", line 230, in run
  File "renpy-6.10.0/renpy/ast.py", line 557, in execute
  File "L:\Anime\Visual Novels\software\renpy-6.10.0\renpy\python.py", line 927, in py_exec_bytecode
  File "L:\Visual Novels\software\renpy-6.10.0\Cafe avec de L'amour/game/options.rpy", line 82, in <module>
TypeError: imagemap_preferences() takes exactly 6 arguments (3 given)

While executing init code:
 - script at line 19 of L:\Visual Novels\software\renpy-6.10.0\Cafe avec de L'amour/game/options.rpy
 - python at line 82 of L:\Visual Novels\software\renpy-6.10.0\Cafe avec de L'amour/game/options.rpy.

Ren'Py Version: Ren'Py 6.10.0e
Any help much appreciated
Last edited by saskuto on Mon Mar 22, 2010 7:09 pm, edited 1 time in total.

Asphodel
Regular
Posts: 28
Joined: Sat Jan 17, 2009 1:40 am
Contact:

Re: custom preference screen

#2 Post by Asphodel »

Unlike a simple imagemap, which only requires a "ground" image and a "hover" image, a preferences imagemap takes five images to toggle between. In order of appearance, the five images are: nonhotspot or disabled hotspot, unselected unhovered, unselected hovered, selected unhovered, selected hovered. (You can use fewer than five distinct images; just give the same imagename as the value of more than one argument.) So your code will end up something like this:

Code: Select all

layout.imagemap_preferences("pref.jpg", "pref.jpg", "pref_hover.jpg", "pref_select.jpg", "pref_hover.jpg", [
    (350,83,447,127, "Window"),
    (465,81,554,125, "Fullscreen"),
...etc. The rest (where you define the hotspots) is as it was before.

Shake0615
Regular
Posts: 30
Joined: Thu May 07, 2009 9:42 am
Location: United Statesia
Contact:

Re: custom preference screen

#3 Post by Shake0615 »

Nice image map graphics!

...But isn't it supposed to be "avec du amour?" Cause the partitive article de contracts with le?

I don't mean to be pretentious or anything. Just wondering.

saskuto
Regular
Posts: 64
Joined: Fri Jan 15, 2010 2:56 pm
Contact:

Re: custom preference screen

#4 Post by saskuto »

Asphodel wrote:Unlike a simple imagemap, which only requires a "ground" image and a "hover" image, a preferences imagemap takes five images to toggle between. In order of appearance, the five images are: nonhotspot or disabled hotspot, unselected unhovered, unselected hovered, selected unhovered, selected hovered. (You can use fewer than five distinct images; just give the same imagename as the value of more than one argument.) So your code will end up something like this:

Code: Select all

layout.imagemap_preferences("pref.jpg", "pref.jpg", "pref_hover.jpg", "pref_select.jpg", "pref_hover.jpg", [
    (350,83,447,127, "Window"),
    (465,81,554,125, "Fullscreen"),
...etc. The rest (where you define the hotspots) is as it was before.
thanks very much!!!

saskuto
Regular
Posts: 64
Joined: Fri Jan 15, 2010 2:56 pm
Contact:

Re: custom preference screen

#5 Post by saskuto »

Shake0615 wrote:Nice image map graphics!

...But isn't it supposed to be "avec du amour?" Cause the partitive article de contracts with le?

I don't mean to be pretentious or anything. Just wondering.
Oooooooh! So does avec du mour translate into coffee with love? (Never was that good at french ^^; )

Colo
Newbie
Posts: 21
Joined: Sat Mar 06, 2010 8:42 am
Projects: Some Testgames ^^
Location: Germany
Contact:

Re: custom preference screen

#6 Post by Colo »

NO!!!

It is "Café avec l'amour" ^^
Real stregth is to show weakness.

saskuto
Regular
Posts: 64
Joined: Fri Jan 15, 2010 2:56 pm
Contact:

Re: custom preference screen

#7 Post by saskuto »

Colo wrote:NO!!!

It is "Café avec l'amour" ^^
AAAh, so strike the de then XD lol got it! <3
Thankyou!

Shake0615
Regular
Posts: 30
Joined: Thu May 07, 2009 9:42 am
Location: United Statesia
Contact:

Re: custom preference screen

#8 Post by Shake0615 »

LOL.

Well, I don't claim to have a lot of background in French, so I don't know if you use the partitive de with avec, but whenever de comes in front of le, it becomes du. Although I have heard things like "café avec du lait" or "une recette avec du jambon."

I'm a Spanish major, so what do I know anyway XD

filsduloup
Regular
Posts: 65
Joined: Thu Aug 28, 2008 3:00 pm
Projects: Alchimical Girl -Homuncule-
Location: France
Contact:

Re: custom preference screen [SOLVED]

#9 Post by filsduloup »

Phrase correcte en français !

Un café au lait
Une recette avec du jambon

Un café d'amour (plus jolie)
Un café avec amour

Post Reply

Who is online

Users browsing this forum: No registered users