TempleOSCDV4.06.ISO
This commit is contained in:
1 parent
6fe38d2d9d
commit
b632ab9a4f
261 files changed
+6282
-5801
No files matched your search
+14
-14
@@ -43,7 +43,7 @@ public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
|
||||
I64 num_states=1,U8 *state_texts,
|
||||
I32 *state_colors,CCtrlButtonState *_s=NULL)
|
||||
{//Create button ctrl. See $LK,"::/Apps/Strut/Strut.CPP"$.
|
||||
CCtrl *result;
|
||||
CCtrl *res;
|
||||
CCtrlButtonState *s;
|
||||
I64 i,j,l;
|
||||
U8 *st;
|
||||
@@ -57,7 +57,7 @@ public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
|
||||
width=BUTTON_BORDER*4+l*FONT_WIDTH;
|
||||
}
|
||||
if (height<0) height=BUTTON_BORDER*4+FONT_HEIGHT;
|
||||
result=CAlloc(sizeof(CCtrl));
|
||||
res=CAlloc(sizeof(CCtrl));
|
||||
if (_s) {
|
||||
s=_s;
|
||||
MemSet(s,0,sizeof(CCtrlButtonState));
|
||||
@@ -68,18 +68,18 @@ public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
|
||||
s->num_states=num_states;
|
||||
s->state_texts=state_texts;
|
||||
s->state_colors=state_colors;
|
||||
result->win_task=Fs;
|
||||
result->flags=CTRLF_SHOW;
|
||||
result->type=CTRLT_GENERIC;
|
||||
result->state=s;
|
||||
result->draw_it=&DrawCtrlButton;
|
||||
result->left_click=&LeftClickCtrlButton;
|
||||
result->left=x;
|
||||
result->top=y;
|
||||
result->right=result->left+width-1;
|
||||
result->bottom=result->top+height-1;
|
||||
QueIns(result,Fs->last_ctrl);
|
||||
return result;
|
||||
res->win_task=Fs;
|
||||
res->flags=CTRLF_SHOW;
|
||||
res->type=CTRLT_GENERIC;
|
||||
res->state=s;
|
||||
res->draw_it=&DrawCtrlButton;
|
||||
res->left_click=&LeftClickCtrlButton;
|
||||
res->left=x;
|
||||
res->top=y;
|
||||
res->right=res->left+width-1;
|
||||
res->bottom=res->top+height-1;
|
||||
QueIns(res,Fs->last_ctrl);
|
||||
return res;
|
||||
}
|
||||
|
||||
public U0 CtrlButtonDel(CCtrl *c)
|
||||
|
||||
+10
-10
@@ -16,18 +16,18 @@ CTemplateCS *CtrlSliderGet()
|
||||
{
|
||||
CTemplateCSSlider *temps;
|
||||
U8 *st,pmt[STR_LEN];
|
||||
CTemplateCS *result=CAlloc(sizeof(CTemplateCS));
|
||||
CTemplateCS *res=CAlloc(sizeof(CTemplateCS));
|
||||
|
||||
"$$PURPLE$$Ctrl Slider$$FG$$\n\n";
|
||||
|
||||
result->glbl_name=GetStr("Glbl Struct Name (ENTER for No Glbl):");
|
||||
result->range=GetI64 ("Range (%4d):",30);
|
||||
result->spacing=GetI64("Spacing (%4d):",20);
|
||||
result->border=GetI64 ("Border (%4d):",2);
|
||||
res->glbl_name=GetStr("Glbl Struct Name (ENTER for No Glbl):");
|
||||
res->range=GetI64 ("Range (%4d):",30);
|
||||
res->spacing=GetI64("Spacing (%4d):",20);
|
||||
res->border=GetI64 ("Border (%4d):",2);
|
||||
|
||||
result->next_slider=result->last_slider=&result->next_slider;
|
||||
res->next_slider=res->last_slider=&res->next_slider;
|
||||
while (TRUE) {
|
||||
StrPrint(pmt,"Slider #%d Name:",result->num_sliders+1);
|
||||
StrPrint(pmt,"Slider #%d Name:",res->num_sliders+1);
|
||||
st=GetStr(pmt);
|
||||
if (!*st) {
|
||||
Free(st);
|
||||
@@ -35,10 +35,10 @@ CTemplateCS *CtrlSliderGet()
|
||||
}
|
||||
temps=CAlloc(sizeof(CTemplateCSSlider));
|
||||
temps->name=st;
|
||||
QueIns(temps,result->last_slider);
|
||||
temps->num=result->num_sliders++;
|
||||
QueIns(temps,res->last_slider);
|
||||
temps->num=res->num_sliders++;
|
||||
}
|
||||
return result;
|
||||
return res;
|
||||
}
|
||||
|
||||
U0 TemplateCtrlSlider(CDoc *doc)
|
||||
|
||||
Reference in new issue
Block a user