| 12079 | |
| 12080 | |
| 12081 | Integer* Widget::checkBoxButtonTexture(Tree_p self, |
| 12082 | double w, double h, Text_p name, |
| 12083 | Text_p lbl, Text_p sel, Tree_p act) |
| 12084 | // ---------------------------------------------------------------------------- |
| 12085 | // Make a texture out of a given checkbox button |
| 12086 | // ---------------------------------------------------------------------------- |
| 12087 | { |
| 12088 | if (w < 16) w = 16; |
| 12089 | if (h < 16) h = 16; |
| 12090 | |
| 12091 | // Get or build the current frame if we don't have one |
| 12092 | AbstractButtonSurface *surface = name->GetInfo<AbstractButtonSurface>(); |
| 12093 | if (!surface) |
| 12094 | { |
| 12095 | surface = new CheckBoxSurface(name, this, +name->value); |
| 12096 | name->SetInfo<AbstractButtonSurface> (surface); |
| 12097 | } |
| 12098 | |
| 12099 | // Resize to requested size, bind texture and save current infos |
| 12100 | surface->resize (w, h); |
| 12101 | uint texId = surface->bind(lbl, act, sel); |
| 12102 | layout->Add(new FillTexture(texId)); |
| 12103 | GL.TextureSize (w, h); |
| 12104 | |
| 12105 | return new Integer(texId, self->Position()); |
| 12106 | } |
| 12107 | |
| 12108 | |
| 12109 | Tree_p Widget::pushButton(Tree_p self, |
nothing calls this directly
no test coverage detected