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

Author Topic: JRPG Style Text Menu by archentity Version 2.0!  (Read 2466 times)

0 Members and 1 Guest are viewing this topic.

archentity

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
JRPG Style Text Menu by archentity Version 2.0!
« on: May 07, 2014, 11:42:35 pm »
I have finally completed a better version of my original RPG text menu class from here:

http://en.sfml-dev.org/forums/index.php?topic=14322.msg100828#msg100828.

I really ended up not liking how that menu class worked, too much unnecessary stuff had to be managed by the menu. Then I realized that my implementation and way of thinking in regards to designing the menu were incorrect. I was trying to make the menu contain and manage the options that go into it when what a menu should really be doing is simply containing a copy of a list of something else and showing them to the user. Here are a couple of new features that have been added to this menu class that the previous one did not have.

- Support for text objects that display each menu option's quantity, for if there are duplicates of an option in the menu like in the case of rpg inventory menus where a character can have several of the same item at once.

- Better border support: the old menu could only have a plain square border around its edges. This new menu now only has support for using sprites for the border's corners and edges. This class also allows you to make the borders resize themselves along the edges as needed depending on the size of the menu automatically.

Basically the menu works by taking on a deque or vector of strings, quantifies any duplicate strings into a single option with its own variable for its quantity, and then shows it to the screen through its draw function. Reading through the function declarations in the Menu.h file should make using it pretty easy. But if you have any questions, reply to this post or email me at archentitykalim@gmail.com.