Commit 27a03d67 authored by Dennis Payne's avatar Dennis Payne

Converted options screen for AlchemyQuest. DirectX9 renderer is removed from options screen.

parent b80a2e77
AUTHOR: guigoz
AUTHOR: usr_share and dulsi
CONTACT:
LICENSE: See: http://creativecommons.org/licenses/by-sa/2.0/fr/legalcode
LICENSE: See: https://creativecommons.org/licenses/by-sa/3.0/
Please tell to the author when you make derivated project, since he is curious.
Original artwork: https://opengameart.org/content/openalchemist-as-an-nes-game-v099
......@@ -15,184 +15,120 @@
<!-- Sprite for the background -->
<sprite name="dialog_background">
<image file="dialogs/options/background.png">
<grid pos="0,0" size="463,454" />
<grid pos="0,0" size="198,144" />
</image>
</sprite>
<!-- Render item -->
<section name="render">
<sprite name="selected">
<image file="dialogs/options/render-selected.png" />
</sprite>
<sprite name="unselected">
<image file="dialogs/options/render-unselected.png" />
</sprite>
<integer name="top" value="100" />
<integer name="left" value="65" />
<integer name="width" value="100" />
<integer name="height" value="16" />
<string name="text" value="RENDER" />
<integer name="top" value="16" />
<integer name="left" value="17" />
</section>
<!-- Render choices -->
<section name="render-choices">
<integer name="left" value="170" />
<sprite name="opengl">
<image file="dialogs/options/render-opengl.png" />
</sprite>
<integer name="left" value="100" />
<sprite name="dx9">
<image file="dialogs/options/render-dx9.png" />
</sprite>
<sprite name="software">
<image file="dialogs/options/render-software.png" />
</sprite>
<sprite name="opengl2">
<image file="dialogs/options/render-opengl2.png" />
</sprite>
<string name="0" value="OPENGL" />
<string name="1" value="OPENGL2" />
<string name="2" value="SOFTWARE" />
</section>
<!-- Fullscreen item -->
<section name="fullscreen">
<sprite name="selected">
<image file="dialogs/options/fullscreen-selected.png" />
</sprite>
<sprite name="unselected">
<image file="dialogs/options/fullscreen-unselected.png" />
</sprite>
<integer name="top" value="150" />
<integer name="left" value="65" />
<integer name="width" value="100" />
<integer name="height" value="16" />
<string name="text" value="FULLSCREEN" />
<integer name="top" value="32" />
<integer name="left" value="17" />
</section>
<!-- Fullscreen choices -->
<section name="fullscreen-choices">
<integer name="left" value="300" />
<integer name="left" value="100" />
</section>
<!-- Framerate item -->
<section name="framerate">
<sprite name="selected">
<image file="dialogs/options/framerate-selected.png" />
</sprite>
<sprite name="unselected">
<image file="dialogs/options/framerate-unselected.png" />
</sprite>
<integer name="top" value="200" />
<integer name="left" value="65" />
<integer name="width" value="100" />
<integer name="height" value="16" />
<string name="text" value="FRAMERATE" />
<integer name="top" value="48" />
<integer name="left" value="17" />
</section>
<!-- Framerate choices -->
<section name="framerate-choices">
<integer name="left" value="250" />
<sprite name="30">
<image file="dialogs/options/framerate-30.png" />
</sprite>
<sprite name="40">
<image file="dialogs/options/framerate-40.png" />
</sprite>
<sprite name="50">
<image file="dialogs/options/framerate-50.png" />
</sprite>
<sprite name="60">
<image file="dialogs/options/framerate-60.png" />
</sprite>
<sprite name="80">
<image file="dialogs/options/framerate-80.png" />
</sprite>
<sprite name="100">
<image file="dialogs/options/framerate-100.png" />
</sprite>
<sprite name="no-limit">
<image file="dialogs/options/framerate-no-limit.png" />
</sprite>
<integer name="left" value="100" />
<string name="0" value="30" />
<string name="1" value="40" />
<string name="2" value="50" />
<string name="3" value="60" />
<string name="4" value="80" />
<string name="5" value="80" />
<string name="6" value="100" />
<string name="7" value="NO LIMIT" />
</section>
<!-- Color Blind item -->
<section name="colorblind">
<sprite name="selected">
<image file="dialogs/options/colorblind-selected.png" />
</sprite>
<sprite name="unselected">
<image file="dialogs/options/colorblind-unselected.png" />
</sprite>
<integer name="top" value="250" />
<integer name="left" value="65" />
<integer name="width" value="100" />
<integer name="height" value="16" />
<string name="text" value="COLORBLIND" />
<integer name="top" value="64" />
<integer name="left" value="17" />
</section>
<!-- Color Blind choices -->
<section name="colorblind-choices">
<integer name="left" value="300" />
<integer name="left" value="100" />
</section>
<!-- Sound level item -->
<section name="sound">
<sprite name="selected">
<image file="dialogs/options/sound-selected.png" />
</sprite>
<sprite name="unselected">
<image file="dialogs/options/sound-unselected.png" />
</sprite>
<integer name="top" value="300" />
<integer name="left" value="65" />
<integer name="width" value="100" />
<integer name="height" value="16" />
<string name="text" value="SOUND" />
<integer name="top" value="80" />
<integer name="left" value="17" />
</section>
<section name="sound-choices">
<integer name="left" value="100" />
</section>
<!-- Music level item -->
<section name="music">
<sprite name="selected">
<image file="dialogs/options/music-selected.png" />
</sprite>
<sprite name="unselected">
<image file="dialogs/options/music-unselected.png" />
</sprite>
<integer name="top" value="350" />
<integer name="left" value="65" />
<integer name="width" value="100" />
<integer name="height" value="16" />
<string name="text" value="MUSIC" />
<integer name="top" value="96" />
<integer name="left" value="17" />
</section>
<section name="music-choices">
<integer name="left" value="100" />
</section>
<!-- Quit menu item -->
<section name="quit">
<sprite name="selected">
<image file="dialogs/options/quit-selected.png" />
</sprite>
<sprite name="unselected">
<image file="dialogs/options/quit-unselected.png" />
</sprite>
<integer name="top" value="400" />
<integer name="left" value="65" />
<integer name="width" value="100" />
<integer name="height" value="16" />
<string name="text" value="RETURN" />
<integer name="top" value="112" />
<integer name="left" value="17" />
</section>
<section name="yesno">
<string name="0" value="NO" />
<string name="1" value="YES" />
</section>
<sprite name="item-yes">
<image file="dialogs/yes.png" />
</sprite>
......@@ -203,51 +139,17 @@
<!-- Sound level numbers -->
<section name="sound_level">
<integer name="left" value="265" />
<sprite name="0">
<image file="dialogs/options/level-0.png" />
</sprite>
<sprite name="1">
<image file="dialogs/options/level-1.png" />
</sprite>
<sprite name="2">
<image file="dialogs/options/level-2.png" />
</sprite>
<sprite name="3">
<image file="dialogs/options/level-3.png" />
</sprite>
<sprite name="4">
<image file="dialogs/options/level-4.png" />
</sprite>
<sprite name="5">
<image file="dialogs/options/level-5.png" />
</sprite>
<sprite name="6">
<image file="dialogs/options/level-6.png" />
</sprite>
<sprite name="7">
<image file="dialogs/options/level-7.png" />
</sprite>
<sprite name="8">
<image file="dialogs/options/level-8.png" />
</sprite>
<sprite name="9">
<image file="dialogs/options/level-9.png" />
</sprite>
<sprite name="10">
<image file="dialogs/options/level-10.png" />
</sprite>
<string name="0" value="0%" />
<string name="1" value="10%" />
<string name="2" value="20%" />
<string name="3" value="30%" />
<string name="4" value="40%" />
<string name="5" value="50%" />
<string name="6" value="60%" />
<string name="7" value="70%" />
<string name="8" value="80%" />
<string name="9" value="90%" />
<string name="10" value="100%" />
</section>
......
bin_PROGRAMS = openalchemist
openalchemist_SOURCES = ../src/Application.cpp ../src/AudioManager.cpp ../src/Board.cpp ../src/CombosPainter.cpp ../src/CommonResources.cpp ../src/DemoPlayer.cpp ../src/FrameRateCounter.cpp ../src/FrontLayer.cpp ../src/GameEngine.cpp ../src/HumanPlayer.cpp ../src/IniFile.cpp ../src/Keys.cpp ../src/LoadingScreen.cpp ../src/Player.cpp ../src/Preferences.cpp ../src/ProgressBar.cpp ../src/Skin.cpp ../src/SkinsManager.cpp ../src/Window.cpp ../src/main.cpp ../src/memory.cpp ../src/misc.cpp ../src/states/CommonState.cpp ../src/states/GameOverState.cpp ../src/states/GameState.cpp ../src/states/InGameState.cpp ../src/states/MenuState.cpp ../src/states/MenuState/BasicItem.cpp ../src/states/MenuState/BasicTextItem.cpp ../src/states/MenuState/DualChoiceItem.cpp ../src/states/MenuState/MenuItem.cpp ../src/states/MenuState/MultipleChoicesItem.cpp ../src/states/MenuState/TableChoicesItem.cpp ../src/states/OptionsMenuState.cpp ../src/states/PauseMenuState.cpp ../src/states/QuitMenuState.cpp ../src/states/SkinsMenuState.cpp ../src/states/TitleState.cpp
openalchemist_SOURCES = ../src/Application.cpp ../src/AudioManager.cpp ../src/Board.cpp ../src/CombosPainter.cpp ../src/CommonResources.cpp ../src/DemoPlayer.cpp ../src/FrameRateCounter.cpp ../src/FrontLayer.cpp ../src/GameEngine.cpp ../src/HumanPlayer.cpp ../src/IniFile.cpp ../src/Keys.cpp ../src/LoadingScreen.cpp ../src/Player.cpp ../src/Preferences.cpp ../src/ProgressBar.cpp ../src/Skin.cpp ../src/SkinsManager.cpp ../src/Window.cpp ../src/main.cpp ../src/memory.cpp ../src/misc.cpp ../src/states/CommonState.cpp ../src/states/GameOverState.cpp ../src/states/GameState.cpp ../src/states/InGameState.cpp ../src/states/MenuState.cpp ../src/states/MenuState/BasicItem.cpp ../src/states/MenuState/BasicTextItem.cpp ../src/states/MenuState/DualChoiceItem.cpp ../src/states/MenuState/ChoiceItem.cpp ../src/states/MenuState/MenuItem.cpp ../src/states/MenuState/MultipleChoicesItem.cpp ../src/states/MenuState/MultipleTextChoicesItem.cpp ../src/states/MenuState/TableChoicesItem.cpp ../src/states/OptionsMenuState.cpp ../src/states/PauseMenuState.cpp ../src/states/QuitMenuState.cpp ../src/states/SkinsMenuState.cpp ../src/states/TitleState.cpp
AM_CXXFLAGS = `pkg-config --cflags clanCore-2.3 clanDisplay-2.3 clanApp-2.3 clanGL1-2.3 clanGL-2.3 clanSWRender-2.3` -DDATA_DIR="\"$(datadir)/\""
......
......@@ -119,8 +119,10 @@ am_openalchemist_OBJECTS = ../src/Application.$(OBJEXT) \
../src/states/MenuState/BasicItem.$(OBJEXT) \
../src/states/MenuState/BasicTextItem.$(OBJEXT) \
../src/states/MenuState/DualChoiceItem.$(OBJEXT) \
../src/states/MenuState/ChoiceItem.$(OBJEXT) \
../src/states/MenuState/MenuItem.$(OBJEXT) \
../src/states/MenuState/MultipleChoicesItem.$(OBJEXT) \
../src/states/MenuState/MultipleTextChoicesItem.$(OBJEXT) \
../src/states/MenuState/TableChoicesItem.$(OBJEXT) \
../src/states/OptionsMenuState.$(OBJEXT) \
../src/states/PauseMenuState.$(OBJEXT) \
......@@ -170,9 +172,11 @@ am__depfiles_remade = ../src/$(DEPDIR)/Application.Po \
../src/states/$(DEPDIR)/TitleState.Po \
../src/states/MenuState/$(DEPDIR)/BasicItem.Po \
../src/states/MenuState/$(DEPDIR)/BasicTextItem.Po \
../src/states/MenuState/$(DEPDIR)/ChoiceItem.Po \
../src/states/MenuState/$(DEPDIR)/DualChoiceItem.Po \
../src/states/MenuState/$(DEPDIR)/MenuItem.Po \
../src/states/MenuState/$(DEPDIR)/MultipleChoicesItem.Po \
../src/states/MenuState/$(DEPDIR)/MultipleTextChoicesItem.Po \
../src/states/MenuState/$(DEPDIR)/TableChoicesItem.Po
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
......@@ -321,8 +325,10 @@ openalchemist_SOURCES = ../src/Application.cpp ../src/AudioManager.cpp \
../src/states/MenuState/BasicItem.cpp \
../src/states/MenuState/BasicTextItem.cpp \
../src/states/MenuState/DualChoiceItem.cpp \
../src/states/MenuState/ChoiceItem.cpp \
../src/states/MenuState/MenuItem.cpp \
../src/states/MenuState/MultipleChoicesItem.cpp \
../src/states/MenuState/MultipleTextChoicesItem.cpp \
../src/states/MenuState/TableChoicesItem.cpp \
../src/states/OptionsMenuState.cpp \
../src/states/PauseMenuState.cpp \
......@@ -486,12 +492,18 @@ clean-binPROGRAMS:
../src/states/MenuState/DualChoiceItem.$(OBJEXT): \
../src/states/MenuState/$(am__dirstamp) \
../src/states/MenuState/$(DEPDIR)/$(am__dirstamp)
../src/states/MenuState/ChoiceItem.$(OBJEXT): \
../src/states/MenuState/$(am__dirstamp) \
../src/states/MenuState/$(DEPDIR)/$(am__dirstamp)
../src/states/MenuState/MenuItem.$(OBJEXT): \
../src/states/MenuState/$(am__dirstamp) \
../src/states/MenuState/$(DEPDIR)/$(am__dirstamp)
../src/states/MenuState/MultipleChoicesItem.$(OBJEXT): \
../src/states/MenuState/$(am__dirstamp) \
../src/states/MenuState/$(DEPDIR)/$(am__dirstamp)
../src/states/MenuState/MultipleTextChoicesItem.$(OBJEXT): \
../src/states/MenuState/$(am__dirstamp) \
../src/states/MenuState/$(DEPDIR)/$(am__dirstamp)
../src/states/MenuState/TableChoicesItem.$(OBJEXT): \
../src/states/MenuState/$(am__dirstamp) \
../src/states/MenuState/$(DEPDIR)/$(am__dirstamp)
......@@ -554,9 +566,11 @@ distclean-compile:
@[email protected]@[email protected] @[email protected]/src/states/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
@[email protected]@[email protected] @[email protected]/src/states/MenuState/$(DEPDIR)/[email protected][email protected] # am--include-marker
$(am__depfiles_remade):
......@@ -748,9 +762,11 @@ distclean: distclean-am
-rm -f ../src/states/$(DEPDIR)/TitleState.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/BasicItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/BasicTextItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/ChoiceItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/DualChoiceItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/MenuItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/MultipleChoicesItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/MultipleTextChoicesItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/TableChoicesItem.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
......@@ -831,9 +847,11 @@ maintainer-clean: maintainer-clean-am
-rm -f ../src/states/$(DEPDIR)/TitleState.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/BasicItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/BasicTextItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/ChoiceItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/DualChoiceItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/MenuItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/MultipleChoicesItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/MultipleTextChoicesItem.Po
-rm -f ../src/states/MenuState/$(DEPDIR)/TableChoicesItem.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
......
......@@ -396,3 +396,67 @@ MenuItem *MenuState::load_basic_menu_item(CL_GraphicContext& gc, CL_ResourceMana
_items.insert (_items.end (), item);
return item;
}
ChoiceItem *MenuState::load_basic_multiple_choices_item(CL_GraphicContext& gc, CL_ResourceManager &gfx, const std::string &basename, const std::string &basechoiceposition, const std::string &basechoice, int x, int y)
{
ChoiceItem *item;
if (gfx.resource_exists(basename + "text"))
{
MultipleTextChoicesItem *text_item = new MultipleTextChoicesItem;
text_item->set_w(CL_Integer_to_int (basename + "width", &gfx));
text_item->set_h(CL_Integer_to_int (basename + "height", &gfx));
text_item->set_locked(CL_Boolean_to_bool (basename + "locked", &gfx));
text_item->set_text(gfx.get_string_resource(basename + "text", ""));
item = text_item;
int i=0;
while (gfx.resource_exists(basechoice + to_string(i)))
{
text_item->add_choice(gfx.get_string_resource(basechoice + to_string(i), ""));
i++;
}
if (gfx.resource_exists(basechoiceposition + "left"))
text_item->set_choice_x(x + CL_Integer_to_int(basechoiceposition + "left", &gfx));
else
text_item->set_choice_x(x + CL_Integer_to_int (basename + "left", &gfx) + 250);
if (gfx.resource_exists(basechoiceposition + "top"))
text_item->set_choice_y(y + CL_Integer_to_int(basechoiceposition + "top", &gfx));
else
text_item->set_choice_y(y + CL_Integer_to_int (basename + "top", &gfx));
}
else
{
MultipleChoicesItem *basic_item = new MultipleChoicesItem;
if (gfx.resource_exists(basename + "unavailable"))
{
basic_item->set_description_sprites (gc, gfx,
basename + "unselected",
basename + "selected",
basename + "unavailable");
}
else
{
basic_item->set_description_sprites (gc, gfx,
basename + "unselected",
basename + "selected");
}
int i=0;
while (gfx.resource_exists(basechoice + to_string(i)))
{
basic_item->add_choice(gc, gfx, basechoice+to_string(i));
i++;
}
if (gfx.resource_exists(basechoiceposition + "left"))
basic_item->set_choice_x(x + CL_Integer_to_int(basechoiceposition + "left", &gfx));
else
basic_item->set_choice_x(x + CL_Integer_to_int (basename + "left", &gfx) + 250);
if (gfx.resource_exists(basechoiceposition + "top"))
basic_item->set_choice_y(y + CL_Integer_to_int(basechoiceposition + "top", &gfx));
else
basic_item->set_choice_y(y + CL_Integer_to_int (basename + "top", &gfx));
item = basic_item;
}
item->set_x (x + CL_Integer_to_int (basename + "left", &gfx));
item->set_y (y + CL_Integer_to_int (basename + "top", &gfx));
_items.insert (_items.end (), item);
return item;
}
......@@ -28,6 +28,7 @@ enum ActionType{
};
class MenuItem;
class ChoiceItem;
/**
* Menu State - a based class for all menus
......@@ -69,6 +70,8 @@ public:
MenuItem *load_basic_menu_item(CL_GraphicContext& gc, CL_ResourceManager &gfx, const std::string &basename, int x, int y);
ChoiceItem *load_basic_multiple_choices_item(CL_GraphicContext& gc, CL_ResourceManager &gfx, const std::string &basename, const std::string &basechoiceposition, const std::string &basechoice, int x, int y);
protected:
/** Menu state (is it appearing, active, disappearing...) */
......
......@@ -4,7 +4,7 @@
//
// File : BasicTextItem.cpp
// Description :
// Author : Guillaume Delhumeau <[email protected].com>
// Author : Dennis Payne <[email protected].com>
// License : GNU General Public License 2 or higher
//
// **********************************************************************
......@@ -50,7 +50,6 @@ void BasicTextItem::draw(CL_GraphicContext& gc)
}
else if (is_locked())
{
// std::cout << "Locked" << _text << std::endl;
p_resources -> main_font.draw_text(gc, _x, _y + _h, _text, CL_Colorf(115, 115, 115));
}
else
......
......@@ -4,7 +4,7 @@
//
// File : BasicTextItem.h
// Description :
// Author : Guillaume Delhumeau <[email protected].com>
// Author : Dennis Payne <[email protected].com>
// License : GNU General Public License 2 or higher
//
// **********************************************************************
......
// **********************************************************************
// OpenAlchemist
// ---------------------
//
// File : ChoiceItem.cpp
// Description :
// Author : Dennis Payne <[email protected]>
// License : GNU General Public License 2 or higher
//
// **********************************************************************
#include <iostream>
#include "ChoiceItem.h"
#include "../../memory.h"
/************************************************************************/
/* Constructor */
/************************************************************************/
ChoiceItem::ChoiceItem()
{
_is_selected = false;
_is_locked = false;
_alpha = 1.0f;
}
/************************************************************************/
/* Destructor */
/************************************************************************/
ChoiceItem::~ChoiceItem()
{
}
/************************************************************************/
/* Set current choice */
/************************************************************************/
void ChoiceItem::set_current_choice(unsigned int choice)
{
if(choice < get_number_choices())
{
_selection = choice;
}
}
// **********************************************************************
// OpenAlchemist
// ---------------------
//
// File : ChoiceItem.h
// Description :
// Author : Dennis Payne <[email protected]>
// License : GNU General Public License 2 or higher
//
// **********************************************************************
#ifndef _CHOICE_ITEM_H_
#define _CHOICE_ITEM_H_
#include "MenuItem.h"
/**
* Generic (abstract) Choice Item class
*/
class ChoiceItem : public MenuItem {
public:
/** Constructor */
ChoiceItem();
/** Destructor */
virtual ~ChoiceItem();
/** Set current choice */
void set_current_choice(unsigned int choice);
/** Return current choice */
unsigned int get_current_choice(){ return _selection; }
virtual unsigned int get_number_choices() = 0;
protected:
/** Current selection */
unsigned int _selection;
};
#endif
......@@ -80,14 +80,11 @@ void MultipleChoicesItem::add_choice(CL_GraphicContext& gc,
}
/************************************************************************/
/* Set current choice */
/* Get the number of choices */
/************************************************************************/
void MultipleChoicesItem::set_current_choice(unsigned int choice)
unsigned int MultipleChoicesItem::get_number_choices()
{
if(choice < _choices_list.size())
{
_selection = choice;
}
return _choices_list.size();
}
/************************************************************************/
......@@ -153,4 +150,4 @@ void MultipleChoicesItem::action_performed(ActionType action_type)
void MultipleChoicesItem::mouse_moved(int mouse_x, int mouse_y)
{
}
\ No newline at end of file
}
......@@ -15,12 +15,12 @@
#include <vector>
#include <ClanLib/display.h>
#include "MenuItem.h"
#include "ChoiceItem.h"
/**
* Multiples choices item
*/
class MultipleChoicesItem : public MenuItem{
class MultipleChoicesItem : public ChoiceItem{
public: