2011-02-27 09:05:10 +00:00
|
|
|
bool pRadioItem::checked() {
|
|
|
|
return radioItem.state.checked;
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
|
2011-02-27 09:05:10 +00:00
|
|
|
void pRadioItem::setChecked() {
|
2011-09-27 11:55:02 +00:00
|
|
|
for(auto &item : radioItem.state.group) {
|
2011-02-24 09:25:20 +00:00
|
|
|
//CheckMenuRadioItem takes: lo, hi, id; checking only id when lo <= id <= hi
|
|
|
|
//phoenix does not force IDs to be linear, so to uncheck id, we use: lo == hi == id + 1 (out of range)
|
|
|
|
//to check id, we use: lo == hi == id (only ID, but in range)
|
2011-09-05 03:48:23 +00:00
|
|
|
if(item.p.parentMenu) CheckMenuRadioItem(item.p.parentMenu->p.hmenu, item.p.id, item.p.id, item.p.id + (id != item.p.id), MF_BYCOMMAND);
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Update to v088r02 release.
byuu says:
Basically, the current implementation of nall/array is deprecated now.
The old method was for non-reference types, it acted like a vector for
POD types (raw memory allocation instead of placement new construction.)
And for reference types, it acted like an unordered set. Yeah, not good.
As of right now, nall/array is no longer used. The vector type usage was
replaced with actual vectors.
I've created nall/set, which now contains the specialization for
reference types.
nall/set basically acts much like std::unordered_set. No auto-sort, only
one of each type is allowed, automatic growth.
This will be the same both for reference and non-reference types ...
however, the non-reference type wasn't implemented just yet.
Future plans for nall/array are for it to be a statically allocated
block of memory, ala array<type, size>, which is meant for RAII memory
usage.
Have to work on the specifics, eg the size as a template parameter may
be problematic. I'd like to return allocated chunks of memory (eg
file::read) in this container so that I don't have to manually free the
data anymore.
I also removed nall/moduloarray, and moved that into the SNES DSP class,
since that's the only thing that uses it.
2012-04-26 10:56:15 +00:00
|
|
|
void pRadioItem::setGroup(const set<RadioItem&> &group) {
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
|
2011-02-27 09:05:10 +00:00
|
|
|
void pRadioItem::setText(const string &text) {
|
2011-02-24 09:25:20 +00:00
|
|
|
if(parentWindow) parentWindow->p.updateMenu();
|
|
|
|
}
|
|
|
|
|
2011-02-27 09:05:10 +00:00
|
|
|
void pRadioItem::constructor() {
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
2011-09-05 03:48:23 +00:00
|
|
|
|
|
|
|
void pRadioItem::destructor() {
|
|
|
|
if(parentMenu) parentMenu->remove(radioItem);
|
|
|
|
}
|