Вверх ↑
Администрация
Ответов: 15295
Рейтинг: 1519
#1: 2009-04-05 21:19:30 ЛС | профиль | цитата
да действительно компактнее level up

вижу, что были попытки упростить еще... это действительно можно сделать вот так
code_12597.txt

вообще 11 элементов получим.
------------ Дoбавленo:

Ravilr, вот этот вариант должен быть тебе более менее понятен (коды прописал только для первых трех кнопок)


Add(MainForm,7996706,315,28)
{
Width=693
Height=334
link(onCreate,7723517:doRandom,[])
}
Add(Button,9910671,378,112)
{
Left=200
Top=145
Caption="0"
Data=Integer(11)
Point(doCaption)
link(onClick,10608246:doWork2,[])
}
Add(Counter,7539042,322,112)
{
Max=1
link(onNext,9910671:doCaption,[])
}
Add(Button,3914345,378,154)
{
Left=265
Top=145
Caption="1"
Data=Integer(19)
Point(doCaption)
link(onClick,5499789:doWork2,[])
}
Add(Counter,15539581,322,154)
{
Max=1
Default=1
link(onNext,3914345:doCaption,[])
}
Add(Button,8502037,378,196)
{
Left=330
Top=145
Caption="1"
Data=Integer(36)
Point(doCaption)
link(onClick,11447357:doWork2,[])
}
Add(Counter,7341583,322,196)
{
Max=1
Default=1
link(onNext,8502037:doCaption,[])
}
Add(Button,12165126,378,238)
{
Left=200
Top=170
Caption="1"
Point(doCaption)
link(onClick,14774347:doWork2,[])
}
Add(Counter,696636,322,238)
{
Max=1
Default=1
link(onNext,12165126:doCaption,[])
}
Add(Button,13907004,378,280)
{
Left=265
Top=170
Caption="1"
Point(doCaption)
link(onClick,15804162:doWork2,[])
}
Add(Counter,1614848,322,280)
{
Max=1
Default=1
link(onNext,13907004:doCaption,[])
}
Add(Button,14333610,378,322)
{
Left=330
Top=170
Caption="0"
Point(doCaption)
link(onClick,12211633:doWork2,[])
}
Add(Counter,14276382,322,322)
{
Max=1
link(onNext,14333610:doCaption,[])
}
Add(Button,10213655,378,364)
{
Left=200
Top=195
Caption="0"
Point(doCaption)
link(onClick,7308353:doWork2,[])
}
Add(Counter,4100475,322,364)
{
Max=1
link(onNext,10213655:doCaption,[])
}
Add(Button,12821504,378,406)
{
Left=265
Top=195
Caption="0"
Point(doCaption)
link(onClick,11684386:doWork2,[])
}
Add(Counter,14592896,322,406)
{
Max=1
link(onNext,12821504:doCaption,[])
}
Add(Button,2865012,378,448)
{
Left=330
Top=195
Caption="0"
Point(doCaption)
link(onClick,11684386:doWork3,[(431,454)])
}
Add(Counter,16663420,322,448)
{
Max=1
link(onNext,2865012:doCaption,[])
}
Add(IntToBits,10773944,252,112)
{
Count=9
ZeroBits=1
link(onBit1,7539042:doNext,[])
link(onBit2,15539581:doNext,[(303,125)(303,160)])
link(onBit3,7341583:doNext,[(303,132)(303,202)])
link(onBit4,696636:doNext,[(303,139)(303,244)])
link(onBit5,1614848:doNext,[(303,146)(303,286)])
link(onBit6,14276382:doNext,[(303,153)(303,328)])
link(onBit7,4100475:doNext,[(303,160)(303,370)])
link(onBit8,14592896:doNext,[(303,167)(303,412)])
link(onBit9,16663420:doNext,[(303,174)(303,454)])
}
Add(HubEx,10608246,427,105)
{
Angle=3
link(onEvent,10773944:doBits,[(431,93)(236,93)(236,118)])
}
Add(HubEx,11684386,427,399)
{
Angle=3
link(onEvent,7308353:doWork3,[])
}
Add(HubEx,7308353,427,357)
{
Angle=3
link(onEvent,12211633:doWork3,[])
}
Add(HubEx,12211633,427,315)
{
Angle=3
link(onEvent,15804162:doWork3,[])
}
Add(HubEx,15804162,427,273)
{
Angle=3
link(onEvent,14774347:doWork3,[])
}
Add(HubEx,14774347,427,231)
{
Angle=3
link(onEvent,11447357:doWork3,[])
}
Add(HubEx,11447357,427,189)
{
Angle=3
link(onEvent,5499789:doWork3,[])
}
Add(HubEx,5499789,427,147)
{
Angle=3
link(onEvent,10608246:doWork3,[])
}
Add(Random,7723517,399,42)
{
Min=1
Max=511
link(onRandom,10608246:doWork1,[(453,48)(453,118)])
}

а это код игрушки, со скриншота выше


Add(MainForm,7996706,175,77)
{
Width=205
Height=214
link(onCreate,10122084:doFor,[])
}
Add(IntToBits,10773944,497,91)
{
Count=9
ZeroBits=1
link(onBit1,5382413:doWork1,[])
link(onBit2,5382413:doWork2,[])
link(onBit3,5382413:doWork3,[])
link(onBit4,5382413:doWork4,[])
link(onBit5,5382413:doWork5,[])
link(onBit6,5382413:doWork6,[])
link(onBit7,5382413:doWork7,[])
link(onBit8,5382413:doWork8,[])
link(onBit9,5382413:doWork9,[])
}
Add(ToolBarLayout,12152669,364,42)
{
Name="grid"
Space=10
Padding=10
}
Add(ChildPanelEx,7955178,364,91)
{
Mode=1
link(onClick,16626606:doRead,[])
}
BEGIN_SDK
Add(EditMultiEx,1769767,21,21)
{
WorkCount=#5:##add|8:##select|
EventCount=#7:onClick|
VarCount=#12:##eventIndex|
Width=251
Height=158
Point(##add)
Point(##select)
Point(##eventIndex)
link(##select,10329479:doSwitch,[(63,34)(63,76)])
}
Add(Panel,2462700,70,112)
{
Top=20
Width=50
Name="panel"
Layout="parent.grid"
BevelInner=0
Point(onPaint)
Point(onDblClick)
link(onClick,8377294:doWork2,[])
link(onPaint,14271529:doDraw,[])
link(onDblClick,8377294:doWork3,[(116,132)])
}
Add(Img_Rectangle,14271529,126,119)
{
Point2=3276850
Point2AsOffset=0
DrawSource=2
Style=1
Point(BgColor)
link(BgColor,10329479:State,[])
}
Add(Switch,10329479,140,70)
{
DataOn=Integer(255)
DataOff=Integer(65535)
Point(State)
link(onSwitch,3864511:doRedraw,[])
}
Add(RedrawManager,3864511,189,70)
{
ControlManager="panel"
}
Add(HubEx,8377294,112,105)
{
link(onEvent,1769767:onClick,[(241,118)(241,27)])
}
END_SDK
Add(For,10122084,231,91)
{
End=8
link(onEvent,7955178:##add,[])
link(onStop,2995091:doRandom,[(278,104)(278,139)])
}
Add(ChanelToIndex,5382413,553,91)
{
Count=9
link(onIndex,7955178:##select,[(597,97)(597,167)(352,167)(352,104)])
}
Add(IntegerArray,8839943,420,42)
{
IntArray=['0'=79,'0'=151,'0'=295,'0'=121,'0'=186,'0'=316,'0'=457,'0'=466,'0'=484]
}
Add(ArrayRW,16626606,420,91)
{
link(onRead,10773944:doBits,[])
link(Array,8839943:Array,[])
link(Index,7955178:##eventIndex,[(433,81)(462,81)(462,133)(370,133)])
}
Add(Random,2995091,294,133)
{
Min=1
Max=255
link(onRandom,10773944:doBitsRev,[(471,139)(471,104)])
}

карма: 27
1
файлы: 1code_12597.txt [1.4KB] [188]
Голосовали:Ravilr