Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Main Menu in SFML need tips  (Read 15682 times)

0 Members and 1 Guest are viewing this topic.

darekg11

  • Full Member
  • ***
  • Posts: 127
    • View Profile
Main Menu in SFML need tips
« on: September 26, 2010, 10:45:31 am »
Hello.
I want to create simple main menu, which way to do it is the best?
a)Create JPG with static buttons on its
b)Create background and create buttons with SFML
c)Create background and buttons and then place buttons on background?

I think C options is the best way to do this?
Do You have any protips for main menu?

PeterWelzien

  • Newbie
  • *
  • Posts: 38
    • View Profile
Main Menu in SFML need tips
« Reply #1 on: September 26, 2010, 11:09:12 am »
If you want to easily be able to change the text of the buttons. I suggest you make an image a button, load it, display it and then place the text you want on top of it.
/Peter Welzien

Friend

  • Newbie
  • *
  • Posts: 12
    • View Profile
Main Menu in SFML need tips
« Reply #2 on: September 28, 2010, 06:23:48 pm »
I've been working on the same thing pretty much. At first I did background image, then text as buttons. Later, I realized the font I used looks really bad when it was used under the SFML font stuff, so I ended up putting them through photoshop and exporting png images (that way I can put shadows behind the text to make them look good as well.

Once all that's done, I use a background image, then display the buttons (texts) on top of it, with the shadows and all, it looks really great. Really simple and looks the best out of all 3 of your choices IMO.

Here's a screenshot of the final version of the menu I did.


darekg11

  • Full Member
  • ***
  • Posts: 127
    • View Profile
Main Menu in SFML need tips
« Reply #3 on: October 10, 2010, 09:42:58 am »
Lol Your main menu is just too fucking epic.

code315

  • Newbie
  • *
  • Posts: 1
    • View Profile
Main Menu in SFML need tips
« Reply #4 on: December 05, 2010, 03:53:38 am »
Can you tell me how to create these menus? thank you

Finn

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Main Menu in SFML need tips
« Reply #5 on: December 05, 2010, 10:06:40 am »
There a several ways to do it, but most of them are really easy!
I did mine with Images as buttons. Then just check if one of the buttons is clicked and if so, go on to whawtever the button says :)

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Main Menu in SFML need tips
« Reply #6 on: December 05, 2010, 10:45:02 pm »
Quote from: "Finn"
There a several ways to do it, but most of them are really easy!
I did mine with Images as buttons. Then just check if one of the buttons is clicked and if so, go on to whawtever the button says :)


Ya create 1 image for normal and then when scrolled over then set another image that is like a highlight.

Uless you just create a text one like i did with a rectangle as a shader

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
Main Menu in SFML need tips
« Reply #7 on: December 06, 2010, 02:09:13 pm »
I don't intend to thread-hijack but I have a question related to main menus as well.
I did the same thing as Friend I think.

First made a background, and then made an image that contained the menu text like this:


I was wondering: What would be the most efficient way to display each option?
Creating a Sprite object for each selection?
Or using just one Sprite object but setting a SetSubRect() each part each frame?
Like this:
Code: [Select]

sMenu.SetImage("The menu image posted loaded into an sf::Image Object");

while(App.IsOpened())
{
        (...)
//Iniciar selected
sMenu.SetSubRect(IntRect(0,25,174, 55));
App.Draw(sMenu);

//Definições unselected
sMenu.SetSubRect(IntRect(0,60,174,90));
App.Draw(sMenu);
}
(...)


burningprodigy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Main Menu
« Reply #8 on: April 26, 2011, 07:51:45 am »
Awesome menu, I sure hope the game is equally good. What is the game , by the way, Rpg? The menu reminds me of visual novels, is it one of those? I sure hope it isnt some idiotic arcade game.