MCPcopy Create free account
hub / github.com/DFHack/dfhack / insert_markup_text_wordst

Function insert_markup_text_wordst

library/modules/Gui.cpp:2286–2303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2284}
2285
2286static bool insert_markup_text_wordst(vector<df::markup_text_wordst *> &vec, string &str, int32_t link_index, int32_t color)
2287{
2288 if (str.empty())
2289 return false;
2290
2291 auto ptr = new df::markup_text_wordst();
2292 ptr->str = str;
2293 ptr->link_index = link_index;
2294
2295 ptr->red = gps->uccolor[color][0];
2296 ptr->green = gps->uccolor[color][1];
2297 ptr->blue = gps->uccolor[color][2];
2298
2299 vec.push_back(ptr);
2300 str.clear();
2301
2302 return true;
2303}
2304
2305void Gui::MTB_parse(df::markup_text_boxst *mtb, string parse_text)
2306{ // Reverse-engineered from "markup_text_boxst::process_string_to_lines" FUN_1409f70b0 (v50.11 win64 Steam)

Callers 1

MTB_parseMethod · 0.85

Calls 2

emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected