File confec.cpp changed (mode: 100644) (index fa42140..e37c22d) |
... |
... |
void DrawSettings(){ |
4967 |
4967 |
fgl::mouseX < button_x + button_width; |
fgl::mouseX < button_x + button_width; |
4968 |
4968 |
if( hover ) choiceIndex = button_index; |
if( hover ) choiceIndex = button_index; |
4969 |
4969 |
if( button_index == choiceIndex && !inputTarget |
if( button_index == choiceIndex && !inputTarget |
4970 |
|
&& ( interactButtonDown || ( hover && mouseDownLeft ) ) ){ |
|
|
4970 |
|
&& ( interactButtonDown || ( hover && mouseUpLeft ) ) ){ |
4971 |
4971 |
// Do not propagate the click or button press. |
// Do not propagate the click or button press. |
4972 |
|
mouseDownLeft = false; |
|
|
4972 |
|
mouseUpLeft = false; |
4973 |
4973 |
interactButtonDown = false; |
interactButtonDown = false; |
4974 |
4974 |
actionButtonDown = false; |
actionButtonDown = false; |
4975 |
4975 |
// Open an inline text input. |
// Open an inline text input. |
|
... |
... |
void DrawCharacterSelect(){ |
5133 |
5133 |
); |
); |
5134 |
5134 |
} |
} |
5135 |
5135 |
offset_x += increment_x; |
offset_x += increment_x; |
5136 |
|
if( ( hover && mouseDownLeft ) |
|
|
5136 |
|
if( ( hover && mouseUpLeft ) |
5137 |
5137 |
|| ( (size_t)choiceIndex == i && (actionButtonDown || interactButtonDown) ) ){ |
|| ( (size_t)choiceIndex == i && (actionButtonDown || interactButtonDown) ) ){ |
5138 |
5138 |
// Do not propagate the click or button press. |
// Do not propagate the click or button press. |
5139 |
|
mouseDownLeft = false; |
|
|
5139 |
|
mouseUpLeft = false; |
5140 |
5140 |
actionButtonDown = false; |
actionButtonDown = false; |
5141 |
5141 |
interactButtonDown = false; |
interactButtonDown = false; |
5142 |
5142 |
character_select_display = false; |
character_select_display = false; |
|
... |
... |
void GameLoop( double d ){ |
5854 |
5854 |
if( ent.task != fworld::TASK_SLEEP || ent.type != "regrow" ) |
if( ent.task != fworld::TASK_SLEEP || ent.type != "regrow" ) |
5855 |
5855 |
target_name = ent.name; |
target_name = ent.name; |
5856 |
5856 |
//vnDrawImage( tex_actions, fgl::mouseX - 36.0 * round_scale, fgl::mouseY - 36.0 * round_scale, 0.0, round_scale, round_scale ); |
//vnDrawImage( tex_actions, fgl::mouseX - 36.0 * round_scale, fgl::mouseY - 36.0 * round_scale, 0.0, round_scale, round_scale ); |
5857 |
|
if( mouseDownLeft ){ |
|
|
5857 |
|
if( mouseUpLeft ){ |
5858 |
5858 |
// If there is interaction, do not propagate the click. |
// If there is interaction, do not propagate the click. |
5859 |
|
mouseDownLeft = |
|
|
5859 |
|
mouseUpLeft = |
5860 |
5860 |
!WorldInteract( world.cursorOverEntity ); |
!WorldInteract( world.cursorOverEntity ); |
5861 |
5861 |
} |
} |
5862 |
5862 |
} |
} |
|
... |
... |
void GameLoop( double d ){ |
5865 |
5865 |
// to wherever the player is right-clicking or tapping. |
// to wherever the player is right-clicking or tapping. |
5866 |
5866 |
if( ( |
if( ( |
5867 |
5867 |
mouseRight |
mouseRight |
5868 |
|
|| ( mouse_on_world && mouseDownLeft ) |
|
|
5868 |
|
|| ( mouse_on_world && mouseUpLeft ) |
5869 |
5869 |
) && show_cursor && player.task != fworld::TASK_SLEEP ){ |
) && show_cursor && player.task != fworld::TASK_SLEEP ){ |
5870 |
5870 |
world.solveEntityPath( player, (long long)( world.cursorWorldX ), (long long)( world.cursorWorldY ), true ); |
world.solveEntityPath( player, (long long)( world.cursorWorldX ), (long long)( world.cursorWorldY ), true ); |
5871 |
5871 |
if( player.path.size() > 0 && !world.mapChanged ) |
if( player.path.size() > 0 && !world.mapChanged ) |
5872 |
5872 |
player.task = fworld::TASK_NONE; |
player.task = fworld::TASK_NONE; |
5873 |
|
if( mouseDownLeft ){ |
|
|
5873 |
|
if( mouseUpLeft ){ |
5874 |
5874 |
// Do not propagate the click. |
// Do not propagate the click. |
5875 |
|
mouseDownLeft = false; |
|
|
5875 |
|
mouseUpLeft = false; |
5876 |
5876 |
if( somethingSelected ){ |
if( somethingSelected ){ |
5877 |
5877 |
// Walk a path to the drop site. |
// Walk a path to the drop site. |
5878 |
5878 |
player.task = fworld::TASK_DROP; |
player.task = fworld::TASK_DROP; |
|
... |
... |
void GameLoop( double d ){ |
6072 |
6072 |
convo, |
convo, |
6073 |
6073 |
choiceIndex, |
choiceIndex, |
6074 |
6074 |
moveXDown + moveYDown, |
moveXDown + moveYDown, |
6075 |
|
show_cursor, |
|
6076 |
|
mouseDownLeft || actionButtonDown || interactButtonDown, |
|
|
6075 |
|
mouseLeft || mouseUpLeft, |
|
6076 |
|
mouseUpLeft || actionButtonDown || interactButtonDown, |
6077 |
6077 |
pauseButtonDown ) ){ |
pauseButtonDown ) ){ |
6078 |
6078 |
// Do not propagate the click or button press. |
// Do not propagate the click or button press. |
6079 |
|
mouseDownLeft = false; |
|
|
6079 |
|
mouseUpLeft = false; |
6080 |
6080 |
actionButtonDown = false; |
actionButtonDown = false; |
6081 |
6081 |
interactButtonDown = false; |
interactButtonDown = false; |
6082 |
6082 |
} |
} |