Skip to content

A clean and easy to use header file for a selection menu with arrow keys and return values

License

Notifications You must be signed in to change notification settings

xedtofficial/ArrowKey_Menu_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

ArrowkeyMenu_C++

v0.1.1

Overview

A clean and easy to use header file for a selection menu with arrow keys and return values.
The code is designed so that you can modify it yourself without much difficulty.
However, everything works out of the box.

Features

  • Toggle with ↑↓ and select with →
  • Up to any amount of selection options you want
  • Get return values
  • Customize color
  • Customize header
  • Easy to use

Deployment

Simply download the file and then insert it into the desired directory.
Next, add #include "menuclass.h" at the beginning of the instance you want to run.

How To Use

Use the menu keyword to create a menu first.
Then use .setTitle() to add option titles.
Next, use .chooseTitle() to let the user choose an option and to get the return value.
You can use .ModeToSet to store the return value as integer.

int main(){
  menu home;
  home.setTitle(" Option ~~~~~~~~~~ 1 ");
  home.setTitle(" Option ~~~~~~~~~~ 2 ");
  home.setTitle(" Option ~~~~~~~~~~ 3 ");
  home.setTitle(" Option ~~~~~~~~~~ 4 ");
  home.setTitle(" Option ~~~~~~~~~~ 5 ");
  home.setTitle(" Option ~~~~~~~~~~ 6 ");
  //...

  home.ModeToSet = home.chooseTitle() ;
  cout<<"Selected Option: "<<home.ModeToSet;
}    

Preview

Screenshot

image

Video

Menu_Demo.mp4

File Contains

  • #include "iostream"
  • #include "string"
  • #include "windows.h"
  • #include "cstdio"
  • #include "vector"

Note

MIT License
This program can cause unexpected behavior.
This program uses the WindowsAPI.
First option will have the return value 0 by default.

About

A clean and easy to use header file for a selection menu with arrow keys and return values

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages