Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 1003 vs 1004 for /trunk/Source Code/GUI/GUIInterface.cpp

Diff revisions: vs.
  @@ -153,17 +153,12 @@
153 153 const stringImpl& text,
154 154 const RelativePosition2D& position,
155 155 const RelativeScale2D& size,
156 - ButtonCallback callback,
157 156 const stringImpl& rootSheetID) {
158 157 assert(getGUIElement(guiID) == nullptr);
159 158
160 - CEGUI::Window* parent = nullptr;
159 + CEGUI::Window* parent = _context->getCEGUIContext().getRootWindow();
161 160 if (!rootSheetID.empty()) {
162 - parent = _context->getCEGUIContext().getRootWindow()->getChild(rootSheetID.c_str());
163 - }
164 -
165 - if (!parent) {
166 - parent = _context->rootSheet();
161 + parent = parent->getChild(rootSheetID.c_str());
167 162 }
168 163
169 164 ResourceDescriptor beepSound("buttonClick");
  @@ -178,9 +173,9 @@
178 173 _context->guiScheme(),
179 174 position,
180 175 size,
181 - parent,
182 - callback,
183 - onClickSound);
176 + parent);
177 +
178 + btn->setEventSound(GUIButton::Event::MouseClick, onClickSound);
184 179
185 180 addElement(guiID, btn);
186 181
  @@ -209,7 +204,7 @@
209 204 const stringImpl& name,
210 205 const RelativePosition2D& position,
211 206 const stringImpl& font,
212 - const vec4<U8>& colour,
207 + const UColour& colour,
213 208 const stringImpl& text,
214 209 U8 fontSize) {
215 210 assert(getGUIElement(guiID) == nullptr);