mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 15:36:59 +00:00
static with lambdas apparently does not work in old compilers
This commit is contained in:
parent
645e4fa56c
commit
52f273e3f2
@ -306,10 +306,13 @@ vector<pair<cellwalker,int> > drawbugs;
|
|||||||
|
|
||||||
bool debugmode = false;
|
bool debugmode = false;
|
||||||
|
|
||||||
|
// static apparently does not work in old compilers
|
||||||
|
int bitfield_v;
|
||||||
|
|
||||||
template<class T> void bitfield_editor(int val, const T& setter, string help = "") {
|
template<class T> void bitfield_editor(int val, const T& setter, string help = "") {
|
||||||
static int v = val;
|
bitfield_v = val;
|
||||||
dialog::editNumber(v, 0, 100, 1, v, help, "");
|
dialog::editNumber(bitfield_v, 0, 100, 1, bitfield_v, help, "");
|
||||||
dialog::reaction = [&setter] () { setter(v); };
|
dialog::reaction = [&setter] () { setter(bitfield_v); };
|
||||||
}
|
}
|
||||||
|
|
||||||
struct debugScreen {
|
struct debugScreen {
|
||||||
|
Loading…
Reference in New Issue
Block a user