Everything is in the panel. Feel free to give an astuce about.
*on saiL*
GML:
/*
/// the string replacer project _ shared code + structure reconstitution
// Hi there, i'm blocked into a bug ? i share my code for looking at it
// and talk eventualy about code portativiness. :/
// To the follow, the shared code of my thread.
//////_Font
// police name : Arial
// police size : 22
//////_Create_event
x=100;y=160;image_index=0;image_speed=0;
cc=$120630; pp=Arial_22; pc=$ABFF09;
mx=x; my=y; //panel_position
rx=160; ry=460; //panel_dimension
tx=10; ty=10; //text_offset
zz=rx-ceil(tx/2)-1; //text_autobck
txt_jiki = "ugbggrggeqeffg"
// this variable is what it is searhed to be return by the functions
// BUT, as a programmer i try to work with script wich variables
// recorvery and manipulation are by arguments only.
// You will see later on what i mean (cf. r01m_mbleft_txtcleaner)
//////_Step_event
r01m_mbleft_txtcleaner(mx,my,rx,ry,mb_left,txt_jiki)
//////_Draw_event
r01m_sauto_txtupanel(pc,cc,pp,mx,my,rx,ry,tx,ty,txt_jiki)
*/
/*
//////_Script gms_2 2.3.x ----- the string replacer script _ labotest
// To the follow : 2 functions
// the interesting one is the mbleft_txtcleaner for the room 01
// what i try to do when i code script is to conceive them
// with no functions external variable at all in it, so i'm block
// to the returning of f (cf. f is txt_jiki ***into the script***)
// I don't know if it's a bug, or what to do.
// it's play between txt_jiki and f
// at the end of the function i want to recorver f and not txt_jiki
// so txt_jiki=f for returning txt_jiki is a program-scripter failure.
// if someone knows how to return f without by passing by txt_jiki=f
// you'r welcome.
*/
function r01m_mbleft_txtcleaner(a,b,c,d,e,f){
if mouse_x>a && mouse_x<a+c
&& mouse_y>b && mouse_y<b+d {
if mouse_check_button_pressed(e) {
if (string_count("g", f) >0) {while (string_count("g", f) !=0) {f=string_replace(f,"g","zz")}}
//function_external variable ....... as doomer
txt_jiki=f;
//function_external variable ...... as tester
cc=choose(c_dkgray,c_teal,c_maroon,c_purple,$04B4C8);
}}}
function r01m_sauto_txtupanel(a,b,c,d,e,f,g,h,i,j){
draw_set_alpha(1.0);
up=d+f; uq=e+g; draw_set_color(b); draw_rectangle(d,e,up,uq,0);
tp=d+h; tq=e+i; draw_set_color(a); draw_set_font(c); draw_text(tp, tq,j);
}