MCPcopy Create free account
hub / github.com/MyGUI/mygui / parseColour3

Method parseColour3

Tools/EditorFramework/PropertyColourControl.cpp:197–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 }
196
197 bool PropertyColourControl::parseColour3(const std::string& _value, MyGUI::Colour& _resultValue)
198 {
199 if (!_value.empty())
200 {
201 float red;
202 float green;
203 float blue;
204 float alpha;
205 std::istringstream stream(_value);
206 stream >> red >> green >> blue >> alpha;
207 if (!stream.fail())
208 {
209 int item = stream.get();
210 while (item != -1)
211 {
212 if (item != ' ' && item != '\t')
213 return false;
214 item = stream.get();
215 }
216
217 _resultValue = MyGUI::Colour(red, green, blue, alpha);
218 return true;
219 }
220 }
221
222 return false;
223 }
224
225 void PropertyColourControl::notifyMouseButtonClick(MyGUI::Widget* _sender)
226 {

Callers

nothing calls this directly

Calls 3

ColourFunction · 0.50
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected