minigame screen alignment.

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
thooruchan
Regular
Posts: 47
Joined: Wed Sep 03, 2014 1:48 pm
Completed: The Festival, a YGO fangame
Projects: Charming Monsters (WIP)
Organization: DrawOrDrop Studio
Tumblr: thooruchan
Deviantart: thooruchan
Skype: thooru-chan
Location: Spain
Contact:

minigame screen alignment.

#1 Post by thooruchan »

Hi there.

Again, I come up with a really newbie problem, but you guys are patient and really great, so I hope you'll help with my problem.

I've tried implementing one of Alex's great minigames to my VN (the pairs one) and though I've managed no problem to add card images, change rows and the timer, I'm running with style problems.

I want the cards to be centered on the screen so they don't cover the timer. I'd also like to add a background, and personalize the looks of the game, but I admit, I've no idea how styles work. I look at the documentation and I'm super confused because I don't really get how I'm supposed to write styles in the code, where or what they can or cannot affect.

Help?
Image
Charming Monsters, the webcomic Visual Novel BL game.

User avatar
Alex
Lemma-Class Veteran
Posts: 3093
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: minigame screen alignment.

#2 Post by Alex »

The cards in game are placed in grid, so you need to add some positional properties for it, like

Code: Select all

    grid 3 4:
        align (0.5, 0.5)
        for card in cards_list:
http://www.renpy.org/doc/html/style_pro ... properties

User avatar
thooruchan
Regular
Posts: 47
Joined: Wed Sep 03, 2014 1:48 pm
Completed: The Festival, a YGO fangame
Projects: Charming Monsters (WIP)
Organization: DrawOrDrop Studio
Tumblr: thooruchan
Deviantart: thooruchan
Skype: thooru-chan
Location: Spain
Contact:

Re: minigame screen alignment.

#3 Post by thooruchan »

wow, thank you!
I've been reading the documentation about styles, but... I just didn't understand the sintax! Your example was really helpful, and your game works really well!

I guess I need to stop jumping to hard stuff and get a thorough look at the tutorial game first.
Image
Charming Monsters, the webcomic Visual Novel BL game.

Post Reply

Who is online

Users browsing this forum: No registered users