|
Revision 95:2a364c7d82c9, 357 bytes
(checked in by Diggory Hardy <diggory.hardy@gmail.com>, 2 months ago)
|
Boolean options can be adjusted from the gui now (using a very basic widget). Also some bug-fixes.
Fixed a minor bug where layouts with the same id but without shared alignments would be messed up.
Tracked down the "nothing trawn until a resize" bug (see jobs.txt).
If widgets throw during creation they're now replaced by debug widgets.
Function pointers are converted to delegates using a safer method.
|
| Line | |
|---|
| 1 |
module mde.util; |
|---|
| 2 |
|
|---|
| 3 |
/// Not my code: http://www.dsource.org/projects/tango/ticket/1174#comment:7 |
|---|
| 4 |
R delegate(T) toDg(R, T...)(R function(T) fp) { |
|---|
| 5 |
if (!fp) return null; |
|---|
| 6 |
struct dg { |
|---|
| 7 |
R opCall(T t) { |
|---|
| 8 |
return (cast(R function(T)) this) (t); |
|---|
| 9 |
} |
|---|
| 10 |
} |
|---|
| 11 |
R delegate(T) t; |
|---|
| 12 |
t.ptr = fp; |
|---|
| 13 |
t.funcptr = &dg.opCall; |
|---|
| 14 |
return t; |
|---|
| 15 |
} |
|---|