Adding:
Code: ags
doesn't work either.
Room.ProcessClick(mouse.x, mouse.y, eModeLookat/eModeInteract);
doesn't work either.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
Room.ProcessClick(mouse.x, mouse.y, eModeLookat/eModeInteract);
//move up and down throught inventory with mouse wheel:
if (button == eMouseWheelNorth) {
invCustomInv.ScrollUp();
}
if (button == eMouseWheelSouth) {
invCustomInv.ScrollDown();
}
//left click look, right click use
if (button == eMouseLeftInv) {
mouse.Mode=eModeLookat;
}
if (button == eMouseRightInv) {
mouse.Mode=eModeInteract;
}
if (button == eMouseMiddleInv) {
if (player.ActiveInventory!=null) mouse.Mode=eModeInteract;
}
if (gInventory.Visible) {
//move up and down throught inventory with mouse wheel:
if (event==eEventGUIMouseUp) { <-- works
invCustomInv.ScrollUp();
}
if (event==eEventGUIMouseDown) { <-- works
invCustomInv.ScrollDown();
}
//left click look, right click use
if (mouse.Click(eMouseLeft)) { <-- does nothing
mouse.Mode=eModeLookat;
}
if (mouse.Click(eMouseRight)) { <-- does nothing
mouse.Mode=eModeInteract;
}
if (mouse.Click(eMouseMiddle)) { <-- does work sometimes
Display("thasth");
}
}
function on_mouse_click(MouseButton button)
{
// Game paused?
if (IsGamePaused() == 1) { // do nothing if paused
} else
if (gInventory.Visible) { // if inventory is visible...
//move up and down throught inventory with mouse wheel:
if (button == eMouseWheelNorth) {
invCustomInv.ScrollUp();
}
if (button == eMouseWheelSouth) {
invCustomInv.ScrollDown();
}
//left click look, right click use
if (button == eMouseLeft) {
mouse.Mode=eModeLookat;
}
if (button == eMouseRight) {
mouse.Mode=eModeInteract;
}
if (mouse.IsButtonDown(eMouseMiddle) || button==eMouseMiddle) {
Display("thasth"); //NEVER DISPLAYS
}
int calculateDefaultTextWidth(Character* c)
{
int w = System.ViewportWidth * 2/3;
if(c.x - GetViewportX() <= System.ViewportWidth/4 || c.x - GetViewportX() >= System.ViewportWidth * 3/4)
w -= System.ViewportWidth/5;
return w;
}
QuoteAre the reported sprites actually ones you have imported?Yes, probably, but they don't exist anymore. My my sprite library is a little bit of a rats nest - imagine starting out knowing nothing and recovering from a stroke, and then 2.5 years later being on the verge of releasing a game -- it's like that, growing pains
[sound]
digiid=-1
midiid=-1
digiwin=-1
midiwin=-1
digiindx=0
midiindx=0
digiwinindx=0
midiwinindx=0
[misc]
game_width=1366
game_height=768
gamecolordepth=32
antialias=1
notruecolor=0
cachemax=4194304
user_data_dir=
shared_data_dir=
titletext='Lost on Cow Island' Setup
[graphics]
driver=OGL
windowed=1
screen_def=scaling
game_scale_fs=stretch
game_scale_win=max_round
filter=stdscale
vsync=1
render_at_screenres=0
[language]
translation=
[mouse]
auto_lock=0
speed=1
//----------------------------------------------------------------------------------------------------------------------
// DIALOGUE
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// Dialogue Options Get Dimensions
//----------------------------------------------------------------------------------------------------------------------
function dialog_options_get_dimensions(DialogOptionsRenderingInfo* info)
{
// Create a 1366x64 dialog options area at (0,704)
info.X = 0;
info.Y = 672;
info.Width = 1366;
info.Height = 96;
}
//----------------------------------------------------------------------------------------------------------------------
// Draw Dialog Options
//----------------------------------------------------------------------------------------------------------------------
function DrawDialogOptions(DrawingSurface* ds, DialogOptionsRenderingInfo* info)
{
int i = 1, ypos = 0, xpos = 0;
ds.Clear(COLOR_TRANSPARENT);
while (i <= info.DialogToRender.OptionCount)
{
if (info.DialogToRender.GetOptionState(i) == eOptionOn)
{
String str = info.DialogToRender.GetOptionText(i); //get glyph number from option text
int cur_img = str.AsInt; //current image is that number
ds.DrawImage(xpos, ypos, cur_img); //draw this glyph
xpos += 96; //xpos+=width of glyph
}
i++;
}
//if (MyDynamicSpriteForTheFakeGUI != null) MyDynamicSpriteForTheFakeGUI.Delete();
}
//----------------------------------------------------------------------------------------------------------------------
// Dialog Options Render
//----------------------------------------------------------------------------------------------------------------------
function dialog_options_render(DialogOptionsRenderingInfo* info)
{
DrawDialogOptions(info.Surface, info);
}
//----------------------------------------------------------------------------------------------------------------------
// Dialog Options Repeat Exec
//----------------------------------------------------------------------------------------------------------------------
function dialog_options_repexec(DialogOptionsRenderingInfo* info)
{
int i = 1, xpos = 0;
while (i <= info.DialogToRender.OptionCount)
{
if (info.DialogToRender.GetOptionState(i) == eOptionOn)
{
if (mouse.y >= info.Y && mouse.x >= xpos && mouse.x <= xpos+96)
{
info.ActiveOptionID = i;
//transplanted in from dialogue_options_mouse_click() to get rid of background/old buttons in real time
MyDynamicSpriteForTheFakeGUI = DynamicSprite.Create(info.Width, info.Height, true);
DrawingSurface* ds = MyDynamicSpriteForTheFakeGUI.GetDrawingSurface();
DrawDialogOptions(ds, info);
ds.Release();
return;
}
xpos += 96;
}
i++;
}
gFakeDialogOptions.Visible = false;
}
//----------------------------------------------------------------------------------------------------------------------
// Dialog Options Mouse Click
//----------------------------------------------------------------------------------------------------------------------
function dialog_options_mouse_click(DialogOptionsRenderingInfo* info, MouseButton button)
{
if (info.ActiveOptionID > 0)
{
MyDynamicSpriteForTheFakeGUI = DynamicSprite.Create(info.Width, info.Height, true);
DrawingSurface* ds = MyDynamicSpriteForTheFakeGUI.GetDrawingSurface();
DrawDialogOptions(ds, info);
ds.Release();
gFakeDialogOptions.BackgroundGraphic = MyDynamicSpriteForTheFakeGUI.Graphic;
gFakeDialogOptions.Visible = true;
info.RunActiveOption();
}
}
// END DIALOG FUNCTIONS
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.068 seconds with 14 queries.