Hello everyone.
How can i create image combo box in renpy? For example I have a screen where i add several image button. But one button on click return value (using ui.interact()) and next button only set value of some variable. But remember it is only on 1 screen. If user choose one of "image" combo box and then use image button for action, for example.
If you have any resources, which can help please share.
"Image" combo box
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.
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.
Re: "Image" combo box
No one knows how to implement a combo box? I will approach for any example of implementing the combo box.
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: "Image" combo box
I don't really understand your question. Could you ask it again in a different way...or provide a drawing of what you want?
Also, why are you using ui.interact? That is old style code.
If you have code post it.
Also, why are you using ui.interact? That is old style code.
If you have code post it.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: "Image" combo box
Sorry for my english and bad explanation.
I have 5 buttons. Four of them change value of any parameter. The fifth button is waiting for a response from the user.
For example, we have clicked the first button. It must change its image and to apply the parameter. Then we decided to change the parameter and press the second button. At this time the first button should reset the picture. And so on. Then we decided to choose the third button eventually. Now we click on the fifth button and an run action with a parameter from a third button.
Sorry again for my English. I think now it will be clearer what needs to be done.
I have 5 buttons. Four of them change value of any parameter. The fifth button is waiting for a response from the user.
For example, we have clicked the first button. It must change its image and to apply the parameter. Then we decided to change the parameter and press the second button. At this time the first button should reset the picture. And so on. Then we decided to choose the third button eventually. Now we click on the fifth button and an run action with a parameter from a third button.
Code: Select all
init python:
a = 0
def CreateButton():
ui.imagebutton( auto = "button_%s.png", clicked= SetVariable('a', a+1), pos = (0,0)) # 1
ui.imagebutton(auto = "button_%s.png", clicked= SetVariable('a', a+2), pos = (0,100)) # 2
ui.imagebutton(auto = "button_%s.png", clicked= SetVariable('a', a+3), pos = (0,200)) # 3
ui.imagebutton(auto = "button_%s.png", clicked= SetVariable('a', a+4), pos = (0,300)) # 4
# code...
ui.imagebutton(auto = "button_%s.png", clicked=ui.returns(("done", True)), pos = (300,0)) #5
type, value = ui.interact()
if type == "done":
ui.text('DONE!', align = (0.6,0.5))
return
label start:
scene black
$ CreateButton()
show text str(a)
pause
return
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: "Image" combo box
Why are you using the ui code and why are you making a function? I think you really should be using screen language instead.
Also...you say you want the image on the button to change when clicked...from what to what? What happens if the user clicks the same button more than once?
Also...you say you want the image on the button to change when clicked...from what to what? What happens if the user clicks the same button more than once?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: "Image" combo box
1) I don't know how to create the same situation using screen language. If you know please share with me.
2) If we again click on this button the image is not change. Simple example on Windows form. Can I do same thing in renpy? Thank you very much for your time.
2) If we again click on this button the image is not change. Simple example on Windows form. Can I do same thing in renpy? Thank you very much for your time.
Who is online
Users browsing this forum: No registered users