You can post your code snippets here for others to use and learn from
Post Reply
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am


Post by djrikki » Wed Apr 15, 2015 11:07 pm

This is a replacement for the internal SystemRequest() command, or rather an extended version of the original which goes one step further and removes them pesky formatting characters that can appear; tbh since I've moved over to MUI Royale I don't really encounter the formatting characters anymore.

Code: Select all

Global base
base = {}

;; base:StripBoldandUnderlineFormatting(gadgets$)
; Removes underline characters from a string, used when displaying locales via a SystemRequest call for example
Function base:StripBoldandUnderlineFormatting(gadgets$)
    gadgets$ = ToString(gadgets$)
    gadgets$ = ReplaceStr(gadgets$,"[u]","")
    gadgets$ = ReplaceStr(gadgets$,"[/u]","")
    gadgets$ = ReplaceStr(gadgets$,"[b]","")
    gadgets$ = ReplaceStr(gadgets$,"[/b]","")
    Return (gadgets$)
Function base:SystemRequest(title,body,gadgets,icon)
	Local res = SystemRequest(base:StripBoldandUnderlineFormatting(title),base:StripBoldandUnderlineFormatting(body),base:StripBoldandUnderlineFormatting(gadgets),icon)
	Return (res)
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI

Post Reply